diff --git a/applications/outline/outline/infisicalsecret.yaml b/applications/outline/outline/infisicalsecret.yaml new file mode 100644 index 0000000..9f7ac1e --- /dev/null +++ b/applications/outline/outline/infisicalsecret.yaml @@ -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 diff --git a/applications/outline/outline/outline-deployment.yaml b/applications/outline/outline/outline-deployment.yaml index efeb081..7123e0c 100644 --- a/applications/outline/outline/outline-deployment.yaml +++ b/applications/outline/outline/outline-deployment.yaml @@ -27,92 +27,6 @@ spec: cpu: "2000m" ports: - containerPort: 3000 - env: - - name: TZ - value: "Europe/Brussels" - - 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 + envFrom: + - secretRef: + name: outline-app-secrets \ No newline at end of file diff --git a/applications/outline/postgres/infisicalsecret.yaml b/applications/outline/postgres/infisicalsecret.yaml new file mode 100644 index 0000000..1e37940 --- /dev/null +++ b/applications/outline/postgres/infisicalsecret.yaml @@ -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 diff --git a/applications/outline/postgres/outline-postgres-statefulset.yaml b/applications/outline/postgres/outline-postgres-statefulset.yaml index 4d27096..01f1907 100644 --- a/applications/outline/postgres/outline-postgres-statefulset.yaml +++ b/applications/outline/postgres/outline-postgres-statefulset.yaml @@ -31,24 +31,9 @@ spec: volumeMounts: - name: outline-postgres-data mountPath: /var/lib/postgresql/data - env: - - name: PGDATA - value: "/var/lib/postgresql/data/pgdata" - - 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 + envFrom: + - secretRef: + name: outline-postgres-secrets volumes: - name: outline-postgres-data persistentVolumeClaim: