From 53d4a6d2559b1af509134a9e75deb1ae0bb4e143 Mon Sep 17 00:00:00 2001 From: yuvalg Date: Wed, 7 Feb 2024 10:21:15 +0200 Subject: [PATCH] allow controlling the creation of the cluster api secret --- weaviate/templates/weaviateSecretClusterAPI.yaml | 4 +++- weaviate/templates/weaviateStatefulset.yaml | 4 ++-- weaviate/values.yaml | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/weaviate/templates/weaviateSecretClusterAPI.yaml b/weaviate/templates/weaviateSecretClusterAPI.yaml index 8256dc88..78404175 100644 --- a/weaviate/templates/weaviateSecretClusterAPI.yaml +++ b/weaviate/templates/weaviateSecretClusterAPI.yaml @@ -1,7 +1,9 @@ +{{- if .Values.cluster_api.secret.create }} apiVersion: v1 kind: Secret metadata: - name: weaviate-cluster-api-basic-auth + name: {{ .Values.cluster_api.secret.name }} type: kubernetes.io/basic-auth data: {{- ( include "cluster_api.secret" . ) | indent 2 -}} +{{- end }} \ No newline at end of file diff --git a/weaviate/templates/weaviateStatefulset.yaml b/weaviate/templates/weaviateStatefulset.yaml index 7cee1b20..47aec3fb 100644 --- a/weaviate/templates/weaviateStatefulset.yaml +++ b/weaviate/templates/weaviateStatefulset.yaml @@ -84,12 +84,12 @@ spec: - name: CLUSTER_BASIC_AUTH_USERNAME valueFrom: secretKeyRef: - name: weaviate-cluster-api-basic-auth + name: {{ .Values.cluster_api.secret.name }} key: username - name: CLUSTER_BASIC_AUTH_PASSWORD valueFrom: secretKeyRef: - name: weaviate-cluster-api-basic-auth + name: {{ .Values.cluster_api.secret.name }} key: password - name: STANDALONE_MODE value: 'true' diff --git a/weaviate/values.yaml b/weaviate/values.yaml index 932a7dbe..dbc6c55a 100644 --- a/weaviate/values.yaml +++ b/weaviate/values.yaml @@ -1564,3 +1564,7 @@ affinity: ## priorityClassName: "" globalPriorityClassName: "" +cluster_api: + secret: + create: true + name: "weaviate-cluster-api-basic-auth" \ No newline at end of file