---
apiVersion: v1
kind: Endpoints
metadata:
  name: db
subsets:
  - addresses:
      - ip: 172.28.28.28
    ports:
      - port: 5432

---
apiVersion: v1
kind: Service
metadata:
  name: db
spec:
  ports:
    - port: 5432

---
apiVersion: v1
kind: Service
metadata:
  name: web
spec:
  selector:
    app: auth
  ports:
    - port: 8080
      targetPort: 5000
  type: ClusterIP

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  hostPath:
    path: /files

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-certs
spec:
  capacity:
    storage: 100Mi
  accessModes:
    - ReadWriteMany
  hostPath:
    path: /etc/ssl

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: ""
  volumeName: pv
  resources:
    requests:
      storage: 1Gi

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-certs
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: ""
  volumeName: pv-certs
  resources:
    requests:
      storage: 100Mi

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth
spec:
  selector:
    matchLabels:
      app: auth
  template:
    metadata:
      labels:
        app: auth
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:  
        - name: wait-for-db
          image: busybox:latest
          command: ['sh', '-c', 'until nc -z db:5432; do echo waiting for db; sleep 5; done;'] 
      containers:
        - name: auth
          image: registry.gitlab.com/cyte_icsf/backlog/auth:v2.13.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: URL_DNS
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: URL_DNS
            - name: RES_PROTOCOL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: RES_PROTOCOL
            - name: DB_USER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_USER
            - name: ENC_DB_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: sec
                  key: ENC_DB_PASSWORD
            - name: DB_AUTH_USER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_AUTH_USER
            - name: ENC_DB_AUTH_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: sec
                  key: ENC_DB_AUTH_PASSWORD
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: auth
spec:
  selector:
    app: auth
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: core
spec:
  selector:
    matchLabels:
      app: core
  template:
    metadata:
      labels:
        app: core
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: core
          image: registry.gitlab.com/cyte_icsf/backlog/core:v2.13.2
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: URL_DNS
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: URL_DNS
            - name: RES_PROTOCOL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: RES_PROTOCOL
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: core
spec:
  selector:
    app: core
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: logs
spec:
  selector:
    matchLabels:
      app: logs
  template:
    metadata:
      labels:
        app: logs
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: logs
          image: registry.gitlab.com/cyte_icsf/backlog/logs:v2.11.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: logs
spec:
  selector:
    app: logs
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mail
spec:
  selector:
    matchLabels:
      app: mail
  template:
    metadata:
      labels:
        app: mail
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: mail
          image: registry.gitlab.com/cyte_icsf/backlog/mail:v2.11.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: mail
spec:
  selector:
    app: mail
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: schedule
spec:
  selector:
    matchLabels:
      app: schedule
  template:
    metadata:
      labels:
        app: schedule
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: schedule
          image: registry.gitlab.com/cyte_icsf/backlog/schedule:v2.12.3
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: schedule
spec:
  selector:
    app: schedule
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: report
spec:
  selector:
    matchLabels:
      app: report
  template:
    metadata:
      labels:
        app: report
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: report
          image: registry.gitlab.com/cyte_icsf/backlog/report:v2.13.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: report
spec:
  selector:
    app: report
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: phishing
spec:
  selector:
    matchLabels:
      app: phishing
  template:
    metadata:
      labels:
        app: phishing
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: phishing
          image: registry.gitlab.com/cyte_icsf/backlog/phishing:v2.11.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: phishing
spec:
  selector:
    app: phishing
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: training
spec:
  selector:
    matchLabels:
      app: training
  template:
    metadata:
      labels:
        app: training
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: training
          image: registry.gitlab.com/cyte_icsf/backlog/training:v2.11.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: training
spec:
  selector:
    app: training
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: console
spec:
  selector:
    matchLabels:
      app: console
  template:
    metadata:
      labels:
        app: console
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: console
          image: registry.gitlab.com/cyte_icsf/backlog/console:v2.13.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: console
spec:
  selector:
    app: console
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: policy
spec:
  selector:
    matchLabels:
      app: policy
  template:
    metadata:
      labels:
        app: policy
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-dnsinteg
          image: busybox:latest
          command: ['sh', '-c', 'until nc -z dnsintegration:5000; do echo waiting for db; sleep 60; done;'] 
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
        - name: wait-for-agents
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://agents:5000/json/policy_schema; then exit 0; fi; done; exit 1']
        - name: wait-for-dnsintegration
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://dnsintegration:5000/json/policy_schema; then exit 0; fi; done; exit 1']
        - name: wait-for-phishing
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://phishing:5000/json/policy_schema; then exit 0; fi; done; exit 1']
      containers:
        - name: policy
          image: registry.gitlab.com/cyte_icsf/backlog/policy:v2.13.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: policy
spec:
  selector:
    app: policy
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mailer
spec:
  selector:
    matchLabels:
      app: mailer
  template:
    metadata:
      labels:
        app: mailer
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: mailer
          image: registry.gitlab.com/cyte_icsf/backlog/mailer:v2.12.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: mailer
spec:
  selector:
    app: mailer
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sms
spec:
  selector:
    matchLabels:
      app: sms
  template:
    metadata:
      labels:
        app: sms
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: sms
          image: registry.gitlab.com/cyte_icsf/backlog/sms:v2.12.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: syslog
spec:
  selector:
    app: syslog
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: syslog
spec:
  selector:
    matchLabels:
      app: syslog
  template:
    metadata:
      labels:
        app: syslog
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: syslog
          image: registry.gitlab.com/cyte_icsf/backlog/syslog:v2.12.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: sms
spec:
  selector:
    app: sms
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: adservice
spec:
  selector:
    matchLabels:
      app: adservice
  template:
    metadata:
      labels:
        app: adservice
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: adservice
          image: registry.gitlab.com/cyte_icsf/backlog/adservice:v2.13.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: adservice
spec:
  selector:
    app: adservice
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: puppeteer
spec:
  selector:
    matchLabels:
      app: puppeteer
  template:
    metadata:
      labels:
        app: puppeteer
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: puppeteer
          image: registry.gitlab.com/cyte_icsf/backlog/puppeteer:v2.12.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: HUNTER_FORM_ANALYSIS_EXTRA_PAGE_WAIT_TIME_SECS
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HUNTER_FORM_ANALYSIS_EXTRA_PAGE_WAIT_TIME_SECS
            - name: HUNTER_FORM_ANALYSIS_DEFAULT_TIMEOUT_SECS
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HUNTER_FORM_ANALYSIS_DEFAULT_TIMEOUT_SECS
            - name: HUNTER_FORM_ANALYSIS_ABORT_AT_MAX_TIMEOUT_SECS
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HUNTER_FORM_ANALYSIS_ABORT_AT_MAX_TIMEOUT_SECS
            - name: HUNTER_FORM_ANALYSIS_KEEP_BROWSER_OPEN_FOR_SECS
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HUNTER_FORM_ANALYSIS_KEEP_BROWSER_OPEN_FOR_SECS
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: puppeteer
spec:
  selector:
    app: puppeteer
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: dnsintegration
spec:
  selector:
    matchLabels:
      app: dnsintegration
  template:
    metadata:
      labels:
        app: dnsintegration
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: dnsintegration
          image: registry.gitlab.com/cyte_icsf/backlog/dnsintegration:v2.13.2
          ports:
            - containerPort: 5000
          env:
            - name: ENC_FORENSICS_API_CLIENT_AUTH_KEY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ENC_FORENSICS_API_CLIENT_AUTH_KEY
            - name: INTELLIGENCE_API_ROOT_FOR_CLIENT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: INTELLIGENCE_API_ROOT_FOR_CLIENT
            - name: FORENSICS_API_ROOT_FOR_CLIENT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: FORENSICS_API_ROOT_FOR_CLIENT
            - name: ANALYSIS_API_ROOT_FOR_CLIENT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ANALYSIS_API_ROOT_FOR_CLIENT
            - name: INTELLIGENCE_FALLBACK_ROKSIT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: INTELLIGENCE_FALLBACK_ROKSIT
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: dnsintegration
spec:
  selector:
    app: dnsintegration
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: agents
spec:
  selector:
    matchLabels:
      app: agents
  replicas: 3
  template:
    metadata:
      labels:
        app: agents
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: agents
          image: registry.gitlab.com/cyte_icsf/backlog/agents:v2.13.1
          imagePullPolicy: Always
          resources:
            limits:
              memory: 2Gi
          ports:
            - containerPort: 5000
          env:
            - name: GRAPH_DB_URI
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: GRAPH_DB_URI
            - name: GRAPH_DB_USER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: GRAPH_DB_USER
            - name: ENC_GRAPH_DB_PASSWORD
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ENC_GRAPH_DB_PASSWORD
            - name: ELASTIC_URL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ELASTIC_URL
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: agents
spec:
  selector:
    app: agents
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: osslsigncode
spec:
  selector:
    matchLabels:
      app: osslsigncode
  template:
    metadata:
      labels:
        app: osslsigncode
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: osslsigncode
          image: registry.gitlab.com/cyte_icsf/backlog/osslsigncode:v2.12.0
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: osslsigncode
spec:
  selector:
    app: osslsigncode
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: fetch
spec:
  selector:
    matchLabels:
      app: fetch
  template:
    metadata:
      labels:
        app: fetch
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: fetch
          image: registry.gitlab.com/cyte_icsf/backlog/fetch:v2.11.0
          ports:
            - containerPort: 5000
          env:
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: servicedesk
spec:
  selector:
    matchLabels:
      app: servicedesk
  template:
    metadata:
      labels:
        app: servicedesk
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: servicedesk
          image: registry.gitlab.com/cyte_icsf/backlog/servicedesk:v2.13.0
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: servicedesk
spec:
  selector:
    app: servicedesk
  ports:
    - port: 5000
  type: NodePort

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: download
spec:
  selector:
    matchLabels:
      app: download
  template:
    metadata:
      labels:
        app: download
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: download
          image: registry.gitlab.com/cyte_icsf/backlog/download:v2.12.0
          ports:
            - containerPort: 5000
          env:
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: download
spec:
  selector:
    app: download
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: intelextintegration
spec:
  selector:
    matchLabels:
      app: intelextintegration
  template:
    metadata:
      labels:
        app: intelextintegration
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: intelextintegration
          image: registry.gitlab.com/cyte_icsf/backlog/intelextintegration:v2.13.0
          ports:
            - containerPort: 5000
          env:
            - name: INTELLIGENCE_API_ROOT_FOR_CLIENT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: INTELLIGENCE_API_ROOT_FOR_CLIENT
            - name: FORENSICS_API_ROOT_FOR_CLIENT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: FORENSICS_API_ROOT_FOR_CLIENT
            - name: ANALYSIS_API_ROOT_FOR_CLIENT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ANALYSIS_API_ROOT_FOR_CLIENT
            - name: VULNERABILITY_API_ENDPOINT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: VULNERABILITY_API_ENDPOINT
            - name: ENC_FORENSICS_API_CLIENT_AUTH_KEY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ENC_FORENSICS_API_CLIENT_AUTH_KEY
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: https_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: https_proxy
            - name: HTTPS_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTPS_PROXY
            - name: http_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: http_proxy
            - name: HTTP_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: HTTP_PROXY
            - name: NO_PROXY
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: NO_PROXY
            - name: no_proxy
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: no_proxy
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: intelextintegration
spec:
  selector:
    app: intelextintegration
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: extdatasync
spec:
  selector:
    matchLabels:
      app: extdatasync
  replicas: 1
  template:
    metadata:
      labels:
        app: extdatasync
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: extdatasync
          image: registry.gitlab.com/cyte_icsf/backlog/extdatasync:v2.12.3
          imagePullPolicy: Always
          ports:
            - containerPort: 5000
          env:
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: DEBUG
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUG
            - name: GRAPH_DB_URI
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: GRAPH_DB_URI
            - name: GRAPH_DB_USER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: GRAPH_DB_USER
            - name: ENC_GRAPH_DB_PASSWORD
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ENC_GRAPH_DB_PASSWORD
            - name: ELASTIC_URL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ELASTIC_URL
            - name: ELASTIC_HOSTNAME
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ELASTIC_HOSTNAME
            - name: ELASTIC_PORT
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ELASTIC_PORT
            - name: ELASTIC_USE_TLS
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ELASTIC_USE_TLS
            - name: ELASTIC_TLS_ALLOW_INVALID
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ELASTIC_TLS_ALLOW_INVALID
            - name: ELASTIC_DISABLE_COMPRESSION
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ELASTIC_DISABLE_COMPRESSION
            - name: ENC_ELASTIC_PASSWORD
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: ENC_ELASTIC_PASSWORD
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: extdatasync
spec:
  selector:
    app: extdatasync
  ports:
    - port: 5000
  type: ClusterIP

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: notactions
spec:
  selector:
    matchLabels:
      app: notactions
  template:
    metadata:
      labels:
        app: notactions
    spec:
      imagePullSecrets:
        - name: gitlab
      initContainers:
        - name: wait-for-auth
          image: alpine:latest
          # restartPolicy: Never
          command: ['sh', '-c', 'for i in $(seq 10); do sleep 1; if wget --spider http://auth:5000/info; then exit 0; fi; done; exit 1']
      containers:
        - name: notactions
          image: registry.gitlab.com/cyte_icsf/backlog/notactions:v2.13.2
          ports:
            - containerPort: 5000
          env:
            - name: DEBUG
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUG
            - name: DEBUGGING
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DEBUGGING
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: LOG_SQL
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: LOG_SQL
            - name: DB_DRIVER
              valueFrom:
                configMapKeyRef:
                  name: cfg
                  key: DB_DRIVER
          volumeMounts:
            - mountPath: /etc/ssl
              name: vol-certs
            - mountPath: /usr/src/file
              name: vol
      volumes:
        - name: vol
          persistentVolumeClaim:
            claimName: pvc
            readOnly: false
        - name: vol-certs
          persistentVolumeClaim:
            claimName: pvc-certs
            readOnly: false

---
apiVersion: v1
kind: Service
metadata:
  name: notactions
spec:
  selector:
    app: notactions
  ports:
    - port: 5000
  type: ClusterIP
