From f437dd2bfb2aa668bad8de944a72fe3bfe577b0f Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Fri, 18 Apr 2025 18:15:15 -0700 Subject: [PATCH 1/3] fix auth overlay --- kustomize/auth/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kustomize/auth/kustomization.yaml b/kustomize/auth/kustomization.yaml index b97c178748..8552c3dba9 100644 --- a/kustomize/auth/kustomization.yaml +++ b/kustomize/auth/kustomization.yaml @@ -1,5 +1,5 @@ bases: - - ../../base + - ../base patchesStrategicMerge: - patches.yaml From 0320874d345210be5847129c5452b24454c45c28 Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Sat, 19 Apr 2025 06:49:40 -0700 Subject: [PATCH 2/3] secret generator from .env file --- kustomize/auth/kustomization.yaml | 6 ++++++ kustomize/auth/patches.yaml | 13 ++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/kustomize/auth/kustomization.yaml b/kustomize/auth/kustomization.yaml index 8552c3dba9..c9cb0be4e0 100644 --- a/kustomize/auth/kustomization.yaml +++ b/kustomize/auth/kustomization.yaml @@ -3,3 +3,9 @@ bases: patchesStrategicMerge: - patches.yaml + +secretGenerator: +- name: phoenix-secret + envs: + - .env + type: Opaque diff --git a/kustomize/auth/patches.yaml b/kustomize/auth/patches.yaml index bb60a2cfc0..a29ff3747f 100644 --- a/kustomize/auth/patches.yaml +++ b/kustomize/auth/patches.yaml @@ -10,13 +10,8 @@ spec: env: - name: PHOENIX_ENABLE_AUTH value: "true" - # When enabling Auth, you must provide a secret - # For example, set a Kubernetes Secret with: - # kubectl create secret generic phoenix-secret --from-literal=secret-key='[YOUR-SECRET]' - # then use - # valueFrom: - # secretKeyRef: - # name: phoenix-secret - # key: secret-key - name: PHOENIX_SECRET - value: "3413f9a7735bb780c6b8e4db7d946a492b64d26112a955cdea6a797f4c833593" \ No newline at end of file + valueFrom: + secretKeyRef: + name: phoenix-secret + key: PHOENIX_SECRET From c97e1f46f32d1290c9712e83e01c5ef68f7a6c20 Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Sat, 19 Apr 2025 12:33:01 -0700 Subject: [PATCH 3/3] update --- kustomize/auth/.env.secret | 1 + kustomize/auth/kustomization.yaml | 18 +++++++++--------- kustomize/backends/postgres/kustomization.yaml | 13 ++++++------- kustomize/base/kustomization.yaml | 4 +++- 4 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 kustomize/auth/.env.secret diff --git a/kustomize/auth/.env.secret b/kustomize/auth/.env.secret new file mode 100644 index 0000000000..03227c0ffc --- /dev/null +++ b/kustomize/auth/.env.secret @@ -0,0 +1 @@ +# PHOENIX_SECRET=your-secret-here diff --git a/kustomize/auth/kustomization.yaml b/kustomize/auth/kustomization.yaml index c9cb0be4e0..05e8cd2ccc 100644 --- a/kustomize/auth/kustomization.yaml +++ b/kustomize/auth/kustomization.yaml @@ -1,11 +1,11 @@ -bases: - - ../base - -patchesStrategicMerge: - - patches.yaml - +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ../base +patches: +- path: patches.yaml secretGenerator: -- name: phoenix-secret - envs: - - .env +- envs: + - .env.secret + name: phoenix-secret type: Opaque diff --git a/kustomize/backends/postgres/kustomization.yaml b/kustomize/backends/postgres/kustomization.yaml index 0bc0d68e5c..c079b70b31 100644 --- a/kustomize/backends/postgres/kustomization.yaml +++ b/kustomize/backends/postgres/kustomization.yaml @@ -1,8 +1,7 @@ -bases: - - ../../base - +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization resources: - - postgres.yaml - -patchesStrategicMerge: - - patches.yaml +- postgres.yaml +- ../../base +patches: +- path: patches.yaml diff --git a/kustomize/base/kustomization.yaml b/kustomize/base/kustomization.yaml index 1445dd52ba..6b1a159f28 100644 --- a/kustomize/base/kustomization.yaml +++ b/kustomize/base/kustomization.yaml @@ -1,2 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization resources: - - phoenix.yaml +- phoenix.yaml