apiVersion: apps/v1
kind: Deployment
metadata:
  name: goermis-deployment
  labels:
    app: goermis
spec:
  replicas: 2
  selector:
    matchLabels:
      app: goermis
  template:
    metadata:
      labels:
        app: goermis
    spec:
      containers:
        - name: goermis
          image: gitlab-registry.cern.ch/lb-experts/goermis:master
          imagePullPolicy: "Always"          
          volumeMounts:
          - name: ermis-certs
            mountPath: "/etc/ssl/certs/"
            readOnly: true
          - name: configfile
            mountPath: "/usr/local/etc/"
            readOnly: true
          ports:
          - containerPort: 8080
        - name: httpd
          image: gitlab-registry.cern.ch/lb-experts/k8s/httpd:master
          imagePullPolicy: "Always" 
          volumeMounts:
          - name: oidc
            mountPath: "/etc/httpd/conf_ssl/"
            readOnly: true
          - name: cluster-certs
            mountPath: "/etc/httpd/ssl/"
            readOnly: true
          ports:
          - containerPort: 443
          command: ["/bin/bash","-c", "cp /etc/httpd/conf_ssl/oidc_secrets.conf /etc/httpd/conf/; httpd -D FOREGROUND"]
      volumes:
        - name: ermis-certs
          secret:
            secretName: ermis-certs
        - name: configfile
          secret:
            secretName: config
        - name: cluster-certs
          secret:
            secretName: cluster-certs
        - name: oidc
          secret: 
            secretName: oidc-conf
            items: 
            - key: oidc_secrets.conf
              path: oidc_secrets.conf
      imagePullSecrets:
      - name: regcred-lb-experts


  
      

          

      
