From 1d80e226f07e50cfd59f017448a4f161d36170cf Mon Sep 17 00:00:00 2001 From: amnk Date: Wed, 6 Apr 2022 22:26:48 +0000 Subject: [PATCH] Make it possible to override secretRef for configConnector --- charts/helm-microservice/Chart.yaml | 2 +- charts/helm-microservice/templates/deployment.yaml | 4 ++-- charts/helm-microservice/values.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/helm-microservice/Chart.yaml b/charts/helm-microservice/Chart.yaml index 79e1024..5a1c131 100644 --- a/charts/helm-microservice/Chart.yaml +++ b/charts/helm-microservice/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Kubernetes name: helm-microservice -version: 0.1.19 +version: 0.1.20 home: https://github.com/skaeladmin/infra sources: - https://github.com/skaeladmin/infra/charts/helm-microservice diff --git a/charts/helm-microservice/templates/deployment.yaml b/charts/helm-microservice/templates/deployment.yaml index c26fa6e..ed1028f 100644 --- a/charts/helm-microservice/templates/deployment.yaml +++ b/charts/helm-microservice/templates/deployment.yaml @@ -63,12 +63,12 @@ spec: - name: CONNECTION_NAME valueFrom: secretKeyRef: - name: cloudsql-db-credentials + name: "{{ .Values.useConfigConnector.secretRef }}" key: connectionName - name: PROJECT_ID valueFrom: secretKeyRef: - name: cloudsql-db-credentials + name: "{{ .Values.useConfigConnector.secretRef }}" key: projectId command: ["/cloud_sql_proxy", "-instances=$(PROJECT_ID):$(CONNECTION_NAME)=tcp:3306"] diff --git a/charts/helm-microservice/values.yaml b/charts/helm-microservice/values.yaml index 86906cd..5685e60 100644 --- a/charts/helm-microservice/values.yaml +++ b/charts/helm-microservice/values.yaml @@ -121,6 +121,7 @@ useConfigConnector: google: region: us-east1-c projectId: skael-hydra + secretRef: cloudsql-db-credentials minikube: enabled: false