Skip to content

Commit f4fdb50

Browse files
authored
make volume and volume mounts configurable through helm (#238)
1 parent 54beb05 commit f4fdb50

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

deploy/chart/templates/daemonset.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ spec:
5454
volumeMounts:
5555
- mountPath: /etc/kubernetes
5656
name: k8s
57+
{{- with .Values.volumeMounts}}
58+
{{- toYaml . | nindent 12 }}
59+
{{- end}}
5760
env:
5861
- name: LINODE_API_TOKEN
5962
valueFrom:
@@ -65,10 +68,13 @@ spec:
6568
secretKeyRef:
6669
name: {{ if .Values.secretRef }}{{ .Values.secretRef.name | default "ccm-linode" }}{{ else }}"ccm-linode"{{ end }}
6770
key: {{ if .Values.secretRef }}{{ .Values.secretRef.regionRef | default "region" }}{{ else }}"region"{{ end }}
68-
{{if .Values.env}}
69-
{{- toYaml .Values.env | nindent 12 }}
70-
{{end}}
71+
{{- with .Values.env}}
72+
{{- toYaml . | nindent 12 }}
73+
{{- end}}
7174
volumes:
7275
- name: k8s
7376
hostPath:
7477
path: /etc/kubernetes
78+
{{- with .Values.volumes}}
79+
{{- toYaml . | nindent 8 }}
80+
{{- end}}

deploy/chart/values.yaml

+14-3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ tolerations:
5858
# This section adds the ability to pass environment variables to adjust CCM defaults
5959
# https://github.com/linode/linode-cloud-controller-manager/blob/master/cloud/linode/loadbalancers.go
6060
# LINODE_HOSTNAME_ONLY_INGRESS type bool is supported
61-
# env:
62-
# - name: EXAMPLE_ENV_VAR
63-
# value: "true"
61+
env:
62+
# - name: EXAMPLE_ENV_VAR
63+
# value: "true"
64+
65+
# This section adds the ability to pass volumes to the CCM DaemonSet
66+
volumes:
67+
# - name: test-volume
68+
# emptyDir:
69+
# sizeLimit: 500Mi
70+
71+
# this section adds the ability to pass volumeMounts to the CCM container
72+
volumeMounts:
73+
# - mountPath: /tmp/
74+
# name: test-volume

0 commit comments

Comments
 (0)