Skip to content

Commit

Permalink
Allow passing linodeApitoken and region as secretRef
Browse files Browse the repository at this point in the history
  • Loading branch information
tchinmai7 committed Aug 30, 2023
1 parent 4930728 commit b6badd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion deploy/chart/templates/ccm-linode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ stringData:
apiToken: {{ required ".Values.apiToken required" .Values.apiToken }}
region: {{ required ".Values.region required" .Values.region }}
type: Opaque
{{- end }}
{{- end }}

12 changes: 7 additions & 5 deletions deploy/chart/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ spec:
- name: LINODE_API_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.secretRef.name | default "ccm-linode"}}
key: {{ .Values.secretRef.apiTokenRef | default "apiToken"}}
name: {{ if .Values.secretRef }}{{ .Values.secretRef.name | default "ccm-linode" }}{{ else }}"ccm-linode"{{ end }}
key: {{ if .Values.secretRef }}{{ .Values.secretRef.apiTokenRef | default "apiToken" }}{{ else }}"apiToken"{{ end }}
- name: LINODE_REGION
valueFrom:
secretKeyRef:
name: {{ .Values.secretRef.name | default "ccm-linode"}}
key: {{ .Values.secretRef.regionRef | default "region"}}
name: {{ if .Values.secretRef }}{{ .Values.secretRef.name | default "ccm-linode" }}{{ else }}"ccm-linode"{{ end }}
key: {{ if .Values.secretRef }}{{ .Values.secretRef.regionRef | default "region" }}{{ else }}"region"{{ end }}
{{if .Values.env}}
{{- toYaml .Values.env | nindent 12 }}
{{end}}
volumes:
- name: k8s
hostPath:
path: /etc/kubernetes
path: /etc/kubernetes

0 comments on commit b6badd4

Please sign in to comment.