Change all ConfigMap to Secret

Change configmaps to secrets to maintain compatibility with [0].

[0] https://review.openstack.org/#/c/617039

Change-Id: Ie95aee1a4104008ca93c23ac9d19245a87fade20
This commit is contained in:
Anderson, Craig (ca846m) 2018-11-12 12:31:29 -08:00 committed by Vladyslav Drok
parent 7ed8c29f99
commit 461f4e93d5
10 changed files with 70 additions and 70 deletions

View File

@ -16,7 +16,7 @@
{{- define "divingbell.daemonset.ethtool" }} {{- define "divingbell.daemonset.ethtool" }}
{{- $daemonset := index . 0 }} {{- $daemonset := index . 0 }}
{{- $configMapName := index . 1 }} {{- $secretName := index . 1 }}
{{- $envAll := index . 2 }} {{- $envAll := index . 2 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
@ -46,7 +46,7 @@ spec:
volumeMounts: volumeMounts:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
mountPath: {{ .Values.conf.chroot_mnt_path }} mountPath: {{ .Values.conf.chroot_mnt_path }}
- name: {{ $configMapName }} - name: {{ $secretName }}
mountPath: /tmp/{{ $daemonset }}.sh mountPath: /tmp/{{ $daemonset }}.sh
subPath: {{ $daemonset }} subPath: {{ $daemonset }}
readOnly: true readOnly: true
@ -56,16 +56,16 @@ spec:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
hostPath: hostPath:
path: / path: /
- name: {{ $configMapName }} - name: {{ $secretName }}
configMap: secret:
name: {{ $configMapName }} secretName: {{ $secretName }}
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.manifests.daemonset_ethtool }} {{- if .Values.manifests.daemonset_ethtool }}
{{- $daemonset := "ethtool" }} {{- $daemonset := "ethtool" }}
{{- $configMapName := "divingbell-ethtool" }} {{- $secretName := "divingbell-ethtool" }}
{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.ethtool" | toString | fromYaml }} {{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.ethtool" | toString | fromYaml }}
{{- $configmap_include := "divingbell.configmap.ethtool" }} {{- $secret_include := "divingbell.secret.ethtool" }}
{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
{{- end }} {{- end }}

View File

@ -16,7 +16,7 @@
{{- define "divingbell.daemonset.limits" }} {{- define "divingbell.daemonset.limits" }}
{{- $daemonset := index . 0 }} {{- $daemonset := index . 0 }}
{{- $configMapName := index . 1 }} {{- $secretName := index . 1 }}
{{- $envAll := index . 2 }} {{- $envAll := index . 2 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
@ -46,7 +46,7 @@ spec:
volumeMounts: volumeMounts:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
mountPath: {{ .Values.conf.chroot_mnt_path }} mountPath: {{ .Values.conf.chroot_mnt_path }}
- name: {{ $configMapName }} - name: {{ $secretName }}
mountPath: /tmp/{{ $daemonset }}.sh mountPath: /tmp/{{ $daemonset }}.sh
subPath: {{ $daemonset }} subPath: {{ $daemonset }}
readOnly: true readOnly: true
@ -56,16 +56,16 @@ spec:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
hostPath: hostPath:
path: / path: /
- name: {{ $configMapName }} - name: {{ $secretName }}
configMap: secret:
name: {{ $configMapName }} secretName: {{ $secretName }}
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.manifests.daemonset_limits }} {{- if .Values.manifests.daemonset_limits }}
{{- $daemonset := "limits" }} {{- $daemonset := "limits" }}
{{- $configMapName := "divingbell-limits" }} {{- $secretName := "divingbell-limits" }}
{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.limits" | toString | fromYaml }} {{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.limits" | toString | fromYaml }}
{{- $configmap_include := "divingbell.configmap.limits" }} {{- $secret_include := "divingbell.secret.limits" }}
{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
{{- end }} {{- end }}

View File

@ -16,7 +16,7 @@
{{- define "divingbell.daemonset.mounts" }} {{- define "divingbell.daemonset.mounts" }}
{{- $daemonset := index . 0 }} {{- $daemonset := index . 0 }}
{{- $configMapName := index . 1 }} {{- $secretName := index . 1 }}
{{- $envAll := index . 2 }} {{- $envAll := index . 2 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
@ -46,7 +46,7 @@ spec:
volumeMounts: volumeMounts:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
mountPath: {{ .Values.conf.chroot_mnt_path }} mountPath: {{ .Values.conf.chroot_mnt_path }}
- name: {{ $configMapName }} - name: {{ $secretName }}
mountPath: /tmp/{{ $daemonset }}.sh mountPath: /tmp/{{ $daemonset }}.sh
subPath: {{ $daemonset }} subPath: {{ $daemonset }}
readOnly: true readOnly: true
@ -56,16 +56,16 @@ spec:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
hostPath: hostPath:
path: / path: /
- name: {{ $configMapName }} - name: {{ $secretName }}
configMap: secret:
name: {{ $configMapName }} secretName: {{ $secretName }}
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.manifests.daemonset_mounts }} {{- if .Values.manifests.daemonset_mounts }}
{{- $daemonset := "mounts" }} {{- $daemonset := "mounts" }}
{{- $configMapName := "divingbell-mounts" }} {{- $secretName := "divingbell-mounts" }}
{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.mounts" | toString | fromYaml }} {{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.mounts" | toString | fromYaml }}
{{- $configmap_include := "divingbell.configmap.mounts" }} {{- $secret_include := "divingbell.secret.mounts" }}
{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
{{- end }} {{- end }}

View File

@ -16,7 +16,7 @@
{{- define "divingbell.daemonset.sysctl" }} {{- define "divingbell.daemonset.sysctl" }}
{{- $daemonset := index . 0 }} {{- $daemonset := index . 0 }}
{{- $configMapName := index . 1 }} {{- $secretName := index . 1 }}
{{- $envAll := index . 2 }} {{- $envAll := index . 2 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
@ -46,7 +46,7 @@ spec:
volumeMounts: volumeMounts:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
mountPath: {{ .Values.conf.chroot_mnt_path }} mountPath: {{ .Values.conf.chroot_mnt_path }}
- name: {{ $configMapName }} - name: {{ $secretName }}
mountPath: /tmp/{{ $daemonset }}.sh mountPath: /tmp/{{ $daemonset }}.sh
subPath: {{ $daemonset }} subPath: {{ $daemonset }}
readOnly: true readOnly: true
@ -56,16 +56,16 @@ spec:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
hostPath: hostPath:
path: / path: /
- name: {{ $configMapName }} - name: {{ $secretName }}
configMap: secret:
name: {{ $configMapName }} secretName: {{ $secretName }}
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.manifests.daemonset_sysctl }} {{- if .Values.manifests.daemonset_sysctl }}
{{- $daemonset := "sysctl" }} {{- $daemonset := "sysctl" }}
{{- $configMapName := "divingbell-sysctl" }} {{- $secretName := "divingbell-sysctl" }}
{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.sysctl" | toString | fromYaml }} {{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.sysctl" | toString | fromYaml }}
{{- $configmap_include := "divingbell.configmap.sysctl" }} {{- $secret_include := "divingbell.secret.sysctl" }}
{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
{{- end }} {{- end }}

View File

@ -16,7 +16,7 @@
{{- define "divingbell.daemonset.uamlite" }} {{- define "divingbell.daemonset.uamlite" }}
{{- $daemonset := index . 0 }} {{- $daemonset := index . 0 }}
{{- $configMapName := index . 1 }} {{- $secretName := index . 1 }}
{{- $envAll := index . 2 }} {{- $envAll := index . 2 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
@ -46,7 +46,7 @@ spec:
volumeMounts: volumeMounts:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
mountPath: {{ .Values.conf.chroot_mnt_path }} mountPath: {{ .Values.conf.chroot_mnt_path }}
- name: {{ $configMapName }} - name: {{ $secretName }}
mountPath: /tmp/{{ $daemonset }}.sh mountPath: /tmp/{{ $daemonset }}.sh
subPath: {{ $daemonset }} subPath: {{ $daemonset }}
readOnly: true readOnly: true
@ -56,16 +56,16 @@ spec:
- name: rootfs-{{ $daemonset }} - name: rootfs-{{ $daemonset }}
hostPath: hostPath:
path: / path: /
- name: {{ $configMapName }} - name: {{ $secretName }}
configMap: secret:
name: {{ $configMapName }} secretName: {{ $secretName }}
defaultMode: 0555 defaultMode: 0555
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.manifests.daemonset_uamlite }} {{- if .Values.manifests.daemonset_uamlite }}
{{- $daemonset := "uamlite" }} {{- $daemonset := "uamlite" }}
{{- $configMapName := "divingbell-uamlite" }} {{- $secretName := "divingbell-uamlite" }}
{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.uamlite" | toString | fromYaml }} {{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.uamlite" | toString | fromYaml }}
{{- $configmap_include := "divingbell.configmap.uamlite" }} {{- $secret_include := "divingbell.secret.uamlite" }}
{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
{{- end }} {{- end }}

View File

@ -14,17 +14,17 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- define "divingbell.configmap.ethtool" }} {{- define "divingbell.secret.ethtool" }}
{{- $configMapName := index . 0 }} {{- $secretName := index . 0 }}
{{- $envAll := index . 1 }} {{- $envAll := index . 1 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: Secret
metadata: metadata:
name: {{ $configMapName }} name: {{ $secretName }}
data: data:
ethtool: |+ ethtool: |+
{{ tuple "bin/_ethtool.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_ethtool.sh.tpl" . | include "helm-toolkit.utils.template" | b64enc | indent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -14,17 +14,17 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- define "divingbell.configmap.limits" }} {{- define "divingbell.secret.limits" }}
{{- $configMapName := index . 0 }} {{- $secretName := index . 0 }}
{{- $envAll := index . 1 }} {{- $envAll := index . 1 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: Secret
metadata: metadata:
name: {{ $configMapName }} name: {{ $secretName }}
data: data:
limits: |+ limits: |+
{{ tuple "bin/_limits.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_limits.sh.tpl" . | include "helm-toolkit.utils.template" | b64enc | indent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -14,17 +14,17 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- define "divingbell.configmap.mounts" }} {{- define "divingbell.secret.mounts" }}
{{- $configMapName := index . 0 }} {{- $secretName := index . 0 }}
{{- $envAll := index . 1 }} {{- $envAll := index . 1 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: Secret
metadata: metadata:
name: {{ $configMapName }} name: {{ $secretName }}
data: data:
mounts: |+ mounts: |+
{{ tuple "bin/_mounts.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_mounts.sh.tpl" . | include "helm-toolkit.utils.template" | b64enc | indent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -14,17 +14,17 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- define "divingbell.configmap.sysctl" }} {{- define "divingbell.secret.sysctl" }}
{{- $configMapName := index . 0 }} {{- $secretName := index . 0 }}
{{- $envAll := index . 1 }} {{- $envAll := index . 1 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: Secret
metadata: metadata:
name: {{ $configMapName }} name: {{ $secretName }}
data: data:
sysctl: |+ sysctl: |+
{{ tuple "bin/_sysctl.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_sysctl.sh.tpl" . | include "helm-toolkit.utils.template" | b64enc | indent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -14,17 +14,17 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- define "divingbell.configmap.uamlite" }} {{- define "divingbell.secret.uamlite" }}
{{- $configMapName := index . 0 }} {{- $secretName := index . 0 }}
{{- $envAll := index . 1 }} {{- $envAll := index . 1 }}
{{- with $envAll }} {{- with $envAll }}
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: Secret
metadata: metadata:
name: {{ $configMapName }} name: {{ $secretName }}
data: data:
uamlite: |+ uamlite: |+
{{ tuple "bin/_uamlite.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_uamlite.sh.tpl" . | include "helm-toolkit.utils.template" | b64enc | indent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}