apiVersion: apps/v1 kind: Deployment metadata: name: backend-push-notifications namespace: app-notifications spec: replicas: 1 selector: matchLabels: app: backend-push-notifications template: metadata: labels: app: backend-push-notifications spec: imagePullSecrets: - name: ghcr-secret initContainers: - name: copy-secrets image: busybox command: - sh - -c - | for f in /secrets/*; do cp "$f" /etc/secrets/ chmod 666 "/etc/secrets/$(basename $f)" done volumeMounts: - name: backend-push-notifications-secrets mountPath: /secrets - name: writable-secrets mountPath: /etc/secrets containers: - name: backend-push-notifications image: ghcr.io/gansejunge/app-notifications-backend-push-notifications:8 ports: - containerPort: 9000 name: metrics env: - name: BACKEND_PN_RMQ_HOST value: "rabbitmq.app-notifications.svc.cluster.local" - name: BACKEND_PN_DB_HOST value: "mysql.app-notifications.svc.cluster.local" volumeMounts: - name: writable-secrets mountPath: /etc/secrets readOnly: true volumes: - name: backend-push-notifications-secrets secret: secretName: backend-push-notifications - name: writable-secrets emptyDir: {}