Skip to content

Commit

Permalink
Add support for clusterIdSecretKeyRef.key
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivangi Pandey authored and Shivangi Pandey committed Nov 28, 2024
1 parent 9da9db0 commit b7f1b30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions charts/egressd/templates/exporter/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions charts/egressd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
Expand Down

0 comments on commit b7f1b30

Please sign in to comment.