--- apiVersion: apps/v1 kind: Deployment metadata: name: encapi namespace: encapi annotations: configmap.reloader.stakater.com/auto: "true" secret.reloader.stakater.com/reload: "vault-ca-cert" spec: replicas: 2 selector: matchLabels: app: encapi strategy: rollingUpdate: maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app: encapi spec: automountServiceAccountToken: true initContainers: - name: combine-certs image: alpine:3 command: - sh - -c - cat /etc/ssl/certs/ca-certificates.crt /custom-ca/ca.crt > /combined-certs/ca-certificates.crt volumeMounts: - name: vault-ca-cert mountPath: /custom-ca readOnly: true - name: combined-certs mountPath: /combined-certs containers: - name: encapi image: ghcr.io/iuclabs/encapi:v0.3.3 imagePullPolicy: IfNotPresent ports: - containerPort: 8000 name: http protocol: TCP envFrom: # DBHOST/DBNAME/DBPORT/DBUSER/DBSSL/LISTEN_ADDR - configMapRef: name: encapi-env optional: false # DBPASS + ENCAPI_WRITE_TOKEN (seeded in Vault, see cutover notes) - secretRef: name: environment optional: false volumeMounts: - name: combined-certs mountPath: /etc/ssl/combined readOnly: true livenessProbe: httpGet: path: /healthz port: http initialDelaySeconds: 15 periodSeconds: 30 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /healthz port: http initialDelaySeconds: 5 periodSeconds: 5 timeoutSeconds: 5 failureThreshold: 3 resources: requests: cpu: 50m memory: 64Mi limits: cpu: 500m memory: 256Mi volumes: - name: vault-ca-cert secret: secretName: vault-ca-cert items: - key: ca.crt path: ca.crt - name: combined-certs emptyDir: {} restartPolicy: Always