mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-18 10:32:55 +02:00
Add secrets through env
This commit is contained in:
@@ -16,22 +16,30 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- env:
|
- env:
|
||||||
- name: ENTE_CREDENTIALS_FILE
|
- name: ENTE_DB_HOST
|
||||||
value: /credentials/credentials.yaml
|
value: helm-postgresql
|
||||||
|
- name: ENTE_DB_PORT
|
||||||
|
value: 5432
|
||||||
|
- name: ENTE_DB_NAME
|
||||||
|
value: ente_db
|
||||||
|
- name: ENTE_DB_USER
|
||||||
|
value: pguser
|
||||||
|
- name: ENTE_DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: ente-photos-config
|
||||||
|
key: pgpass
|
||||||
image: ghcr.io/ente-io/server
|
image: ghcr.io/ente-io/server
|
||||||
name: museum
|
name: museum
|
||||||
command: [ "sh", "-c"]
|
# command: [ "sh", "-c"]
|
||||||
# loop forever, outputting "yo" every 5 seconds
|
# # loop forever, outputting "yo" every 5 seconds
|
||||||
args: ["while true; do echo 'yo' && sleep 5; done;"]
|
# args: ["while true; do echo 'yo' && sleep 5; done;"]
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
- containerPort: 2112
|
- containerPort: 2112
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: credentials
|
|
||||||
mountPath: /credentials
|
|
||||||
readOnly: true
|
|
||||||
- mountPath: /var/logs
|
- mountPath: /var/logs
|
||||||
name: custom-logs
|
name: custom-logs
|
||||||
- mountPath: /museum.yaml
|
- mountPath: /museum.yaml
|
||||||
@@ -47,9 +55,6 @@ spec:
|
|||||||
# name: socat
|
# name: socat
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
volumes:
|
volumes:
|
||||||
- name: credentials
|
|
||||||
secret:
|
|
||||||
secretName: ente-photos-config
|
|
||||||
- name: custom-logs
|
- name: custom-logs
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: custom-logs
|
claimName: custom-logs
|
||||||
|
|||||||
@@ -9,33 +9,12 @@ spec:
|
|||||||
kind: ClusterSecretStore
|
kind: ClusterSecretStore
|
||||||
target:
|
target:
|
||||||
name: ente-photos-config
|
name: ente-photos-config
|
||||||
template:
|
|
||||||
engineVersion: v2
|
|
||||||
data:
|
|
||||||
credentials.yaml: |
|
|
||||||
db:
|
|
||||||
host: helm-postgresql
|
|
||||||
port: 5432
|
|
||||||
name: ente_db
|
|
||||||
user: pguser
|
|
||||||
password: "{{ .pgpass }}"
|
|
||||||
sslmode: disable
|
|
||||||
|
|
||||||
s3:
|
|
||||||
are_local_buckets: false
|
|
||||||
ente-photos:
|
|
||||||
key: ente-photos-user
|
|
||||||
secret: {{ .entepass }}
|
|
||||||
endpoint: minio.hensen.io:3200
|
|
||||||
region: nl
|
|
||||||
bucket: ente-photos
|
|
||||||
|
|
||||||
data:
|
data:
|
||||||
- secretKey: pgpass
|
- secretKey: pgpass
|
||||||
remoteRef:
|
remoteRef:
|
||||||
key: ente-photos-postgres
|
key: ente-photos-postgres
|
||||||
property: password
|
property: password
|
||||||
- secretKey: entepass
|
- secretKey: miniopass
|
||||||
remoteRef:
|
remoteRef:
|
||||||
key: minio-ente-photos-user
|
key: minio-ente-photos-user
|
||||||
property: password
|
property: password
|
||||||
|
|||||||
Reference in New Issue
Block a user