Skip to content

Commit 3b70141

Browse files
simonostendorfmandre
authored andcommitted
[occm] add secret enabled option (kubernetes#2239)
* feat(occm): add secret enabled option * fix(occm): helm template operator * feat(occm): update chart version * fix(occm): use newer chart version * fix(occm): remove trailing spaces
1 parent e5c590c commit 3b70141

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

charts/openstack-cloud-controller-manager/templates/daemonset.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ spec:
6868
name: http
6969
protocol: TCP
7070
{{- end }}
71+
{{- if or (.Values.extraVolumeMounts) (.Values.secret.enabled) }}
7172
volumeMounts:
73+
{{- end }}
74+
{{- if .Values.secret.enabled }}
7275
- mountPath: /etc/config
7376
name: cloud-config-volume
7477
readOnly: true
78+
{{- end }}
7579
{{- if .Values.extraVolumeMounts }}
7680
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
7781
{{- end }}
@@ -99,10 +103,15 @@ spec:
99103
{{- if .Values.priorityClassName }}
100104
priorityClassName: {{ .Values.priorityClassName }}
101105
{{- end }}
106+
107+
{{- if or (.Values.extraVolumes) (.Values.secret.enabled) }}
102108
volumes:
109+
{{- end }}
110+
{{- if .Values.secret.enabled }}
103111
- name: cloud-config-volume
104112
secret:
105113
secretName: {{ .Values.secret.name }}
114+
{{- end }}
106115
{{- if .Values.extraVolumes }}
107116
{{ toYaml .Values.extraVolumes | nindent 6 }}
108117
{{- end }}

charts/openstack-cloud-controller-manager/templates/secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.secret.create }}
1+
{{- if and (.Values.secret.create) (.Values.secret.enabled) }}
22
apiVersion: v1
33
kind: Secret
44
metadata:

charts/openstack-cloud-controller-manager/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ serviceMonitor: {}
8282
# Create a secret resource cloud-config (or other name) to store credentials and settings from cloudConfig
8383
# You can also provide your own secret (not created by the Helm chart), in this case set create to false
8484
# and adjust the name of the secret as necessary
85+
# If you dont want to use a secret (because you are using something like an agent injector to inject the cloud config file)
86+
# you can disable the secret usage by setting enabled to false.
87+
# If you disable the secret, you have to insert the cloud config file into the path /etc/cloud/config.
8588
secret:
89+
enabled: true
8690
create: true
8791
name: cloud-config
8892

0 commit comments

Comments
 (0)