zipline: migrate to envFrom with per-container InfisicalSecrets
Flat CR narrowed to recursive: false so it keeps serving the SMB mount credentials that zipline-uploads-pv references by name.
This commit is contained in:
@@ -8,7 +8,7 @@ spec:
|
|||||||
resyncInterval: 30
|
resyncInterval: 30
|
||||||
authentication:
|
authentication:
|
||||||
kubernetesAuth:
|
kubernetesAuth:
|
||||||
identityId: "9f65814e-bf4c-42fc-b382-26be15b11416"
|
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||||
serviceAccountRef:
|
serviceAccountRef:
|
||||||
name: infisical-auth
|
name: infisical-auth
|
||||||
namespace: infisical
|
namespace: infisical
|
||||||
@@ -17,7 +17,9 @@ spec:
|
|||||||
projectSlug: "kubernetes"
|
projectSlug: "kubernetes"
|
||||||
envSlug: "prod"
|
envSlug: "prod"
|
||||||
secretsPath: "/zipline"
|
secretsPath: "/zipline"
|
||||||
recursive: true
|
# Root only: /zipline holds the SMB mount credentials (username, password)
|
||||||
|
# consumed by zipline-uploads-pv. Per-container env lives in subfolders.
|
||||||
|
recursive: false
|
||||||
managedSecretReference:
|
managedSecretReference:
|
||||||
secretName: zipline-secrets
|
secretName: zipline-secrets
|
||||||
secretNamespace: zipline
|
secretNamespace: zipline
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: secrets.infisical.com/v1alpha1
|
||||||
|
kind: InfisicalSecret
|
||||||
|
metadata:
|
||||||
|
name: zipline-postgres-secrets
|
||||||
|
namespace: infisical
|
||||||
|
spec:
|
||||||
|
hostAPI: https://infisical.jsme.be
|
||||||
|
resyncInterval: 30
|
||||||
|
authentication:
|
||||||
|
kubernetesAuth:
|
||||||
|
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||||
|
serviceAccountRef:
|
||||||
|
name: infisical-auth
|
||||||
|
namespace: infisical
|
||||||
|
autoCreateServiceAccountToken: true
|
||||||
|
secretsScope:
|
||||||
|
projectSlug: "kubernetes"
|
||||||
|
envSlug: "prod"
|
||||||
|
secretsPath: "/zipline/postgres"
|
||||||
|
# Non-recursive: keys are already named as the container expects.
|
||||||
|
recursive: false
|
||||||
|
managedSecretReference:
|
||||||
|
secretName: zipline-postgres-secrets
|
||||||
|
secretNamespace: zipline
|
||||||
|
secretType: Opaque
|
||||||
@@ -31,22 +31,10 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: zipline-postgresql-database
|
- name: zipline-postgresql-database
|
||||||
mountPath: /var/lib/postgres
|
mountPath: /var/lib/postgres
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: zipline-postgres-secrets
|
||||||
env:
|
env:
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: zipline-secrets
|
|
||||||
key: db_password
|
|
||||||
- name: POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: zipline-secrets
|
|
||||||
key: db_user
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: zipline-secrets
|
|
||||||
key: db_name
|
|
||||||
- name: PGDATA
|
- name: PGDATA
|
||||||
value: /var/lib/postgres/data
|
value: /var/lib/postgres/data
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: secrets.infisical.com/v1alpha1
|
||||||
|
kind: InfisicalSecret
|
||||||
|
metadata:
|
||||||
|
name: zipline-app-secrets
|
||||||
|
namespace: infisical
|
||||||
|
spec:
|
||||||
|
hostAPI: https://infisical.jsme.be
|
||||||
|
resyncInterval: 30
|
||||||
|
authentication:
|
||||||
|
kubernetesAuth:
|
||||||
|
identityId: "5458def7-7c63-40d2-95da-41c614d0933a"
|
||||||
|
serviceAccountRef:
|
||||||
|
name: infisical-auth
|
||||||
|
namespace: infisical
|
||||||
|
autoCreateServiceAccountToken: true
|
||||||
|
secretsScope:
|
||||||
|
projectSlug: "kubernetes"
|
||||||
|
envSlug: "prod"
|
||||||
|
secretsPath: "/zipline/zipline"
|
||||||
|
# Non-recursive: keys are already named as the container expects.
|
||||||
|
recursive: false
|
||||||
|
managedSecretReference:
|
||||||
|
secretName: zipline-app-secrets
|
||||||
|
secretNamespace: zipline
|
||||||
|
secretType: Opaque
|
||||||
@@ -35,17 +35,10 @@ spec:
|
|||||||
mountPath: /zipline/public
|
mountPath: /zipline/public
|
||||||
- name: themes
|
- name: themes
|
||||||
mountPath: /zipline/themes
|
mountPath: /zipline/themes
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: zipline-app-secrets
|
||||||
env:
|
env:
|
||||||
- name: DATABASE_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: zipline-secrets
|
|
||||||
key: database_url
|
|
||||||
- name: CORE_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: zipline-secrets
|
|
||||||
key: core_secret
|
|
||||||
- name: CORE_TRUSTED_PROXIES
|
- name: CORE_TRUSTED_PROXIES
|
||||||
value: "10.42.0.0/16"
|
value: "10.42.0.0/16"
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
|
|||||||
Reference in New Issue
Block a user