outline: migrate to envFrom with per-container InfisicalSecrets
All 31 env entries, secrets and literals alike, now live in Infisical under /outline/outline and /outline/postgres. Manifest rationale carried across as Infisical secret comments.
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: secrets.infisical.com/v1alpha1
|
||||||
|
kind: InfisicalSecret
|
||||||
|
metadata:
|
||||||
|
name: outline-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: "/outline/outline"
|
||||||
|
# Non-recursive: keys are already named as the container expects.
|
||||||
|
recursive: false
|
||||||
|
managedSecretReference:
|
||||||
|
secretName: outline-app-secrets
|
||||||
|
secretNamespace: outline
|
||||||
|
secretType: Opaque
|
||||||
@@ -27,92 +27,6 @@ spec:
|
|||||||
cpu: "2000m"
|
cpu: "2000m"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
env:
|
envFrom:
|
||||||
- name: TZ
|
- secretRef:
|
||||||
value: "Europe/Brussels"
|
name: outline-app-secrets
|
||||||
- name: NODE_ENV
|
|
||||||
value: "production"
|
|
||||||
- name: URL
|
|
||||||
value: "https://outline.jsme.be"
|
|
||||||
- name: PORT
|
|
||||||
value: "3000"
|
|
||||||
# TLS is terminated at the gateway and X-Forwarded-Proto is set to
|
|
||||||
# https on the HTTPRoute, so Outline must not force an https redirect.
|
|
||||||
- name: FORCE_HTTPS
|
|
||||||
value: "false"
|
|
||||||
|
|
||||||
# --- Database (PostgreSQL) ---
|
|
||||||
- name: DATABASE_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: database_url
|
|
||||||
# In-cluster Postgres has no TLS; disable SSL on the connection.
|
|
||||||
- name: PGSSLMODE
|
|
||||||
value: "disable"
|
|
||||||
|
|
||||||
# --- Cache / queue (Redis-compatible Valkey) ---
|
|
||||||
- name: REDIS_URL
|
|
||||||
value: "redis://outline-redis.outline.svc.cluster.local:6379"
|
|
||||||
|
|
||||||
# --- Secrets ---
|
|
||||||
- name: SECRET_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: secret_key
|
|
||||||
- name: UTILS_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: utils_secret
|
|
||||||
|
|
||||||
# --- File storage (MinIO / S3) ---
|
|
||||||
- name: FILE_STORAGE
|
|
||||||
value: "s3"
|
|
||||||
- name: AWS_REGION
|
|
||||||
value: "us-east-1"
|
|
||||||
- name: AWS_S3_UPLOAD_BUCKET_URL
|
|
||||||
value: "https://s3.jsme.be"
|
|
||||||
- name: AWS_S3_UPLOAD_BUCKET_NAME
|
|
||||||
value: "outline"
|
|
||||||
- name: AWS_S3_FORCE_PATH_STYLE
|
|
||||||
value: "true"
|
|
||||||
- name: AWS_S3_ACL
|
|
||||||
value: "private"
|
|
||||||
- name: AWS_ACCESS_KEY_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: s3_access_key
|
|
||||||
- name: AWS_SECRET_ACCESS_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: s3_secret_key
|
|
||||||
|
|
||||||
# --- Authentication (Authentik OIDC) ---
|
|
||||||
- name: OIDC_DISPLAY_NAME
|
|
||||||
value: "Authentik"
|
|
||||||
- name: OIDC_AUTH_URI
|
|
||||||
value: "https://auth.jsme.be/application/o/authorize/"
|
|
||||||
- name: OIDC_TOKEN_URI
|
|
||||||
value: "https://auth.jsme.be/application/o/token/"
|
|
||||||
- name: OIDC_USERINFO_URI
|
|
||||||
value: "https://auth.jsme.be/application/o/userinfo/"
|
|
||||||
- name: OIDC_LOGOUT_URI
|
|
||||||
value: "https://auth.jsme.be/application/o/outline/end-session/"
|
|
||||||
- name: OIDC_USERNAME_CLAIM
|
|
||||||
value: "preferred_username"
|
|
||||||
- name: OIDC_SCOPES
|
|
||||||
value: "openid profile email"
|
|
||||||
- name: OIDC_CLIENT_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: oidc_client_id
|
|
||||||
- name: OIDC_CLIENT_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: oidc_client_secret
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: secrets.infisical.com/v1alpha1
|
||||||
|
kind: InfisicalSecret
|
||||||
|
metadata:
|
||||||
|
name: outline-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: "/outline/postgres"
|
||||||
|
# Non-recursive: keys are already named as the container expects.
|
||||||
|
recursive: false
|
||||||
|
managedSecretReference:
|
||||||
|
secretName: outline-postgres-secrets
|
||||||
|
secretNamespace: outline
|
||||||
|
secretType: Opaque
|
||||||
@@ -31,24 +31,9 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: outline-postgres-data
|
- name: outline-postgres-data
|
||||||
mountPath: /var/lib/postgresql/data
|
mountPath: /var/lib/postgresql/data
|
||||||
env:
|
envFrom:
|
||||||
- name: PGDATA
|
- secretRef:
|
||||||
value: "/var/lib/postgresql/data/pgdata"
|
name: outline-postgres-secrets
|
||||||
- name: POSTGRES_USER
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: db_user
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: db_password
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: outline-secrets
|
|
||||||
key: db_name
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: outline-postgres-data
|
- name: outline-postgres-data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
|
|||||||
Reference in New Issue
Block a user