apiVersion: apps/v1 kind: Deployment metadata: {name: notification, namespace: enkly, labels: {app: notification}} spec: replicas: 1 selector: {matchLabels: {app: notification}} template: metadata: {labels: {app: notification}} spec: imagePullSecrets: [{name: enkly-registry}] initContainers: - name: wait-for-rabbitmq image: busybox:1.36 command: ["sh", "-c", "until nc -z rabbitmq 5672; do echo waiting for rabbitmq; sleep 2; done"] containers: - name: notification image: registry.enkly.org/enkly/notification:latest ports: [{name: http, containerPort: 9007}] envFrom: [{configMapRef: {name: enkly-config}}] env: - name: ENKLY_RABBITMQ_URL valueFrom: {secretKeyRef: {name: enkly-secrets, key: ENKLY_RABBITMQ_URL}} - name: ENKLY_SMTP_USERNAME valueFrom: {secretKeyRef: {name: enkly-secrets, key: ENKLY_SMTP_USERNAME}} - name: ENKLY_SMTP_PASSWORD valueFrom: {secretKeyRef: {name: enkly-secrets, key: ENKLY_SMTP_PASSWORD}} resources: requests: {cpu: 50m, memory: 64Mi} limits: {cpu: 300m, memory: 192Mi} readinessProbe: {httpGet: {path: /healthz, port: http}, initialDelaySeconds: 5, periodSeconds: 10, failureThreshold: 10} livenessProbe: {httpGet: {path: /healthz, port: http}, initialDelaySeconds: 15, periodSeconds: 20, failureThreshold: 6} --- apiVersion: v1 kind: Service metadata: {name: notification, namespace: enkly, labels: {app: notification}} spec: selector: {app: notification} ports: [{name: http, port: 9007, targetPort: http}]