diff --git a/charts/egressd/templates/exporter/deployment.yaml b/charts/egressd/templates/exporter/deployment.yaml index 740171ec..44710612 100644 --- a/charts/egressd/templates/exporter/deployment.yaml +++ b/charts/egressd/templates/exporter/deployment.yaml @@ -62,20 +62,20 @@ spec: fieldRef: fieldPath: metadata.namespace {{- if .Values.castai.clusterID }} - {{- if ne .Values.castai.clusterIDSecretRef "" }} - {{- fail "clusterID and clusterIDSecretRef are mutually exclusive" }} + {{- if ne .Values.castai.clusterIdSecretKeyRef.name "" }} + {{- fail "clusterID and clusterIdSecretKeyRef are mutually exclusive" }} {{- end }} - name: CLUSTER_ID value: {{ .Values.castai.clusterID | quote }} {{- else }} - {{- if not .Values.castai.clusterIDSecretRef }} - {{- fail "either clusterID or clusterIDSecretRef should be passed" }} + {{- if not .Values.castai.clusterIdSecretKeyRef.name }} + {{- fail "either clusterID or clusterIdSecretKeyRef should be passed" }} {{- end }} - name: CLUSTER_ID valueFrom: secretKeyRef: - name: {{ .Values.castai.clusterIDSecretRef }} - key: CLUSTER_ID + name: {{ .Values.castai.clusterIdSecretKeyRef.name }} + key: {{ .Values.castai.clusterIdSecretKeyRef.key }} {{- end }} {{- if or .Values.castai.apiKey .Values.castai.apiKeySecretRef }} - name: API_KEY diff --git a/charts/egressd/values.yaml b/charts/egressd/values.yaml index 1113609c..43fad7b6 100644 --- a/charts/egressd/values.yaml +++ b/charts/egressd/values.yaml @@ -15,11 +15,13 @@ castai: apiURL: "https://api.cast.ai" # CASTAI Cluster unique identifier. - # clusterID and clusterIDSecretRef are mutually exclusive + # clusterID and clusterIdSecretKeyRef are mutually exclusive clusterID: "" - # clusterIDSecretRef -- Name of secret with ClusterID - # The referenced secret must provide the token in .data["CLUSTER_ID"] - clusterIDSecretRef: "" + # clusterIdSecretKeyRef -- Name of secret with ClusterID + # The referenced secret must provide the ClusterID in .data[<<.Values.castai.clusterIdSecretKeyRef.key>>] + clusterIdSecretKeyRef: + name: "" + key: "CLUSTER_ID" imagePullSecrets: [] nameOverride: ""