57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: backend-api-internal
|
|
namespace: app-notifications
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: backend-api-internal
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: backend-api-internal
|
|
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-api-internal-secrets
|
|
mountPath: /secrets
|
|
- name: writable-secrets
|
|
mountPath: /etc/secrets
|
|
containers:
|
|
- name: backend-api-internal
|
|
image: ghcr.io/gansejunge/app-notifications-backend-api-internal:11
|
|
ports:
|
|
- containerPort: 8101
|
|
env:
|
|
- name: BACKEND_API_INTERNAL_RMQ_HOST
|
|
value: "rabbitmq.app-notifications.svc.cluster.local"
|
|
- name: BACKEND_API_INTERNAL_DB_HOST
|
|
value: "mysql.app-notifications.svc.cluster.local"
|
|
- name: LOG_LEVEL
|
|
value: "INFO"
|
|
volumeMounts:
|
|
- name: writable-secrets
|
|
mountPath: /etc/secrets
|
|
readOnly: true
|
|
volumes:
|
|
- name: backend-api-internal-secrets
|
|
secret:
|
|
secretName: backend-api-internal
|
|
- name: writable-secrets
|
|
emptyDir: {}
|
|
|