Skip to content

Commit

Permalink
make volume and volume mounts configurable through helm
Browse files Browse the repository at this point in the history
  • Loading branch information
eljohnson92 committed Oct 16, 2024
1 parent 708ee98 commit 3e1a1e5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
10 changes: 8 additions & 2 deletions deploy/chart/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ spec:
volumeMounts:
- mountPath: /etc/kubernetes
name: k8s
{{- if .Values.volumeMounts}}
{{- toYaml .Values.volumeMounts | nindent 12 }}
{{- end}}
env:
- name: LINODE_API_TOKEN
valueFrom:
Expand All @@ -65,10 +68,13 @@ spec:
secretKeyRef:
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}}
{{- if .Values.env}}
{{- toYaml .Values.env | nindent 12 }}
{{end}}
{{- end}}
volumes:
- name: k8s
hostPath:
path: /etc/kubernetes
{{- if .Values.volumes}}
{{- toYaml .Values.volumes | nindent 8 }}
{{- end}}
17 changes: 14 additions & 3 deletions deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ tolerations:
# This section adds the ability to pass environment variables to adjust CCM defaults
# https://github.com/linode/linode-cloud-controller-manager/blob/master/cloud/linode/loadbalancers.go
# LINODE_HOSTNAME_ONLY_INGRESS type bool is supported
# env:
# - name: EXAMPLE_ENV_VAR
# value: "true"
env:
# - name: EXAMPLE_ENV_VAR
# value: "true"

# This section adds the ability to pass volumes to the CCM DaemonSet
volumes:
# - name: test-volume
# emptyDir:
# sizeLimit: 500Mi

# this section adds the ability to pass volumeMounts to the CCM container
volumeMounts:
# - mountPath: /tmp/
# name: test-volume

Check failure on line 74 in deploy/chart/values.yaml

View workflow job for this annotation

GitHub Actions / helm-test

74:24 [new-line-at-end-of-file] no new line character at the end of file

0 comments on commit 3e1a1e5

Please sign in to comment.