From 461f4e93d5e56c2327005aa13f7660b377704a4d Mon Sep 17 00:00:00 2001 From: "Anderson, Craig (ca846m)" Date: Mon, 12 Nov 2018 12:31:29 -0800 Subject: [PATCH] Change all ConfigMap to Secret Change configmaps to secrets to maintain compatibility with [0]. [0] https://review.openstack.org/#/c/617039 Change-Id: Ie95aee1a4104008ca93c23ac9d19245a87fade20 --- divingbell/templates/daemonset-ethtool.yaml | 18 +++++++++--------- divingbell/templates/daemonset-limits.yaml | 18 +++++++++--------- divingbell/templates/daemonset-mounts.yaml | 18 +++++++++--------- divingbell/templates/daemonset-sysctl.yaml | 18 +++++++++--------- divingbell/templates/daemonset-uamlite.yaml | 18 +++++++++--------- ...figmap-ethtool.yaml => secret-ethtool.yaml} | 10 +++++----- ...onfigmap-limits.yaml => secret-limits.yaml} | 10 +++++----- ...onfigmap-mounts.yaml => secret-mounts.yaml} | 10 +++++----- ...onfigmap-sysctl.yaml => secret-sysctl.yaml} | 10 +++++----- ...figmap-uamlite.yaml => secret-uamlite.yaml} | 10 +++++----- 10 files changed, 70 insertions(+), 70 deletions(-) rename divingbell/templates/{configmap-ethtool.yaml => secret-ethtool.yaml} (83%) rename divingbell/templates/{configmap-limits.yaml => secret-limits.yaml} (83%) rename divingbell/templates/{configmap-mounts.yaml => secret-mounts.yaml} (83%) rename divingbell/templates/{configmap-sysctl.yaml => secret-sysctl.yaml} (83%) rename divingbell/templates/{configmap-uamlite.yaml => secret-uamlite.yaml} (84%) diff --git a/divingbell/templates/daemonset-ethtool.yaml b/divingbell/templates/daemonset-ethtool.yaml index 3f21328..f58b5d1 100644 --- a/divingbell/templates/daemonset-ethtool.yaml +++ b/divingbell/templates/daemonset-ethtool.yaml @@ -16,7 +16,7 @@ {{- define "divingbell.daemonset.ethtool" }} {{- $daemonset := index . 0 }} - {{- $configMapName := index . 1 }} + {{- $secretName := index . 1 }} {{- $envAll := index . 2 }} {{- with $envAll }} --- @@ -46,7 +46,7 @@ spec: volumeMounts: - name: rootfs-{{ $daemonset }} mountPath: {{ .Values.conf.chroot_mnt_path }} - - name: {{ $configMapName }} + - name: {{ $secretName }} mountPath: /tmp/{{ $daemonset }}.sh subPath: {{ $daemonset }} readOnly: true @@ -56,16 +56,16 @@ spec: - name: rootfs-{{ $daemonset }} hostPath: path: / - - name: {{ $configMapName }} - configMap: - name: {{ $configMapName }} + - name: {{ $secretName }} + secret: + secretName: {{ $secretName }} defaultMode: 0555 {{- end }} {{- end }} {{- if .Values.manifests.daemonset_ethtool }} {{- $daemonset := "ethtool" }} -{{- $configMapName := "divingbell-ethtool" }} -{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.ethtool" | toString | fromYaml }} -{{- $configmap_include := "divingbell.configmap.ethtool" }} -{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} +{{- $secretName := "divingbell-ethtool" }} +{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.ethtool" | toString | fromYaml }} +{{- $secret_include := "divingbell.secret.ethtool" }} +{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- end }} diff --git a/divingbell/templates/daemonset-limits.yaml b/divingbell/templates/daemonset-limits.yaml index fd239d3..fa7c767 100644 --- a/divingbell/templates/daemonset-limits.yaml +++ b/divingbell/templates/daemonset-limits.yaml @@ -16,7 +16,7 @@ {{- define "divingbell.daemonset.limits" }} {{- $daemonset := index . 0 }} - {{- $configMapName := index . 1 }} + {{- $secretName := index . 1 }} {{- $envAll := index . 2 }} {{- with $envAll }} --- @@ -46,7 +46,7 @@ spec: volumeMounts: - name: rootfs-{{ $daemonset }} mountPath: {{ .Values.conf.chroot_mnt_path }} - - name: {{ $configMapName }} + - name: {{ $secretName }} mountPath: /tmp/{{ $daemonset }}.sh subPath: {{ $daemonset }} readOnly: true @@ -56,16 +56,16 @@ spec: - name: rootfs-{{ $daemonset }} hostPath: path: / - - name: {{ $configMapName }} - configMap: - name: {{ $configMapName }} + - name: {{ $secretName }} + secret: + secretName: {{ $secretName }} defaultMode: 0555 {{- end }} {{- end }} {{- if .Values.manifests.daemonset_limits }} {{- $daemonset := "limits" }} -{{- $configMapName := "divingbell-limits" }} -{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.limits" | toString | fromYaml }} -{{- $configmap_include := "divingbell.configmap.limits" }} -{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} +{{- $secretName := "divingbell-limits" }} +{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.limits" | toString | fromYaml }} +{{- $secret_include := "divingbell.secret.limits" }} +{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- end }} diff --git a/divingbell/templates/daemonset-mounts.yaml b/divingbell/templates/daemonset-mounts.yaml index fb4fc19..cf7addc 100644 --- a/divingbell/templates/daemonset-mounts.yaml +++ b/divingbell/templates/daemonset-mounts.yaml @@ -16,7 +16,7 @@ {{- define "divingbell.daemonset.mounts" }} {{- $daemonset := index . 0 }} - {{- $configMapName := index . 1 }} + {{- $secretName := index . 1 }} {{- $envAll := index . 2 }} {{- with $envAll }} --- @@ -46,7 +46,7 @@ spec: volumeMounts: - name: rootfs-{{ $daemonset }} mountPath: {{ .Values.conf.chroot_mnt_path }} - - name: {{ $configMapName }} + - name: {{ $secretName }} mountPath: /tmp/{{ $daemonset }}.sh subPath: {{ $daemonset }} readOnly: true @@ -56,16 +56,16 @@ spec: - name: rootfs-{{ $daemonset }} hostPath: path: / - - name: {{ $configMapName }} - configMap: - name: {{ $configMapName }} + - name: {{ $secretName }} + secret: + secretName: {{ $secretName }} defaultMode: 0555 {{- end }} {{- end }} {{- if .Values.manifests.daemonset_mounts }} {{- $daemonset := "mounts" }} -{{- $configMapName := "divingbell-mounts" }} -{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.mounts" | toString | fromYaml }} -{{- $configmap_include := "divingbell.configmap.mounts" }} -{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} +{{- $secretName := "divingbell-mounts" }} +{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.mounts" | toString | fromYaml }} +{{- $secret_include := "divingbell.secret.mounts" }} +{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- end }} diff --git a/divingbell/templates/daemonset-sysctl.yaml b/divingbell/templates/daemonset-sysctl.yaml index b869935..7731302 100644 --- a/divingbell/templates/daemonset-sysctl.yaml +++ b/divingbell/templates/daemonset-sysctl.yaml @@ -16,7 +16,7 @@ {{- define "divingbell.daemonset.sysctl" }} {{- $daemonset := index . 0 }} - {{- $configMapName := index . 1 }} + {{- $secretName := index . 1 }} {{- $envAll := index . 2 }} {{- with $envAll }} --- @@ -46,7 +46,7 @@ spec: volumeMounts: - name: rootfs-{{ $daemonset }} mountPath: {{ .Values.conf.chroot_mnt_path }} - - name: {{ $configMapName }} + - name: {{ $secretName }} mountPath: /tmp/{{ $daemonset }}.sh subPath: {{ $daemonset }} readOnly: true @@ -56,16 +56,16 @@ spec: - name: rootfs-{{ $daemonset }} hostPath: path: / - - name: {{ $configMapName }} - configMap: - name: {{ $configMapName }} + - name: {{ $secretName }} + secret: + secretName: {{ $secretName }} defaultMode: 0555 {{- end }} {{- end }} {{- if .Values.manifests.daemonset_sysctl }} {{- $daemonset := "sysctl" }} -{{- $configMapName := "divingbell-sysctl" }} -{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.sysctl" | toString | fromYaml }} -{{- $configmap_include := "divingbell.configmap.sysctl" }} -{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} +{{- $secretName := "divingbell-sysctl" }} +{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.sysctl" | toString | fromYaml }} +{{- $secret_include := "divingbell.secret.sysctl" }} +{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- end }} diff --git a/divingbell/templates/daemonset-uamlite.yaml b/divingbell/templates/daemonset-uamlite.yaml index 460cd10..b298973 100644 --- a/divingbell/templates/daemonset-uamlite.yaml +++ b/divingbell/templates/daemonset-uamlite.yaml @@ -16,7 +16,7 @@ {{- define "divingbell.daemonset.uamlite" }} {{- $daemonset := index . 0 }} - {{- $configMapName := index . 1 }} + {{- $secretName := index . 1 }} {{- $envAll := index . 2 }} {{- with $envAll }} --- @@ -46,7 +46,7 @@ spec: volumeMounts: - name: rootfs-{{ $daemonset }} mountPath: {{ .Values.conf.chroot_mnt_path }} - - name: {{ $configMapName }} + - name: {{ $secretName }} mountPath: /tmp/{{ $daemonset }}.sh subPath: {{ $daemonset }} readOnly: true @@ -56,16 +56,16 @@ spec: - name: rootfs-{{ $daemonset }} hostPath: path: / - - name: {{ $configMapName }} - configMap: - name: {{ $configMapName }} + - name: {{ $secretName }} + secret: + secretName: {{ $secretName }} defaultMode: 0555 {{- end }} {{- end }} {{- if .Values.manifests.daemonset_uamlite }} {{- $daemonset := "uamlite" }} -{{- $configMapName := "divingbell-uamlite" }} -{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.uamlite" | toString | fromYaml }} -{{- $configmap_include := "divingbell.configmap.uamlite" }} -{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} +{{- $secretName := "divingbell-uamlite" }} +{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.uamlite" | toString | fromYaml }} +{{- $secret_include := "divingbell.secret.uamlite" }} +{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }} {{- end }} diff --git a/divingbell/templates/configmap-ethtool.yaml b/divingbell/templates/secret-ethtool.yaml similarity index 83% rename from divingbell/templates/configmap-ethtool.yaml rename to divingbell/templates/secret-ethtool.yaml index a6ae896..63d7d2d 100644 --- a/divingbell/templates/configmap-ethtool.yaml +++ b/divingbell/templates/secret-ethtool.yaml @@ -14,17 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- define "divingbell.configmap.ethtool" }} -{{- $configMapName := index . 0 }} +{{- define "divingbell.secret.ethtool" }} +{{- $secretName := index . 0 }} {{- $envAll := index . 1 }} {{- with $envAll }} --- apiVersion: v1 -kind: ConfigMap +kind: Secret metadata: - name: {{ $configMapName }} + name: {{ $secretName }} data: 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 }} diff --git a/divingbell/templates/configmap-limits.yaml b/divingbell/templates/secret-limits.yaml similarity index 83% rename from divingbell/templates/configmap-limits.yaml rename to divingbell/templates/secret-limits.yaml index d79c59f..7d98e89 100644 --- a/divingbell/templates/configmap-limits.yaml +++ b/divingbell/templates/secret-limits.yaml @@ -14,17 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- define "divingbell.configmap.limits" }} -{{- $configMapName := index . 0 }} +{{- define "divingbell.secret.limits" }} +{{- $secretName := index . 0 }} {{- $envAll := index . 1 }} {{- with $envAll }} --- apiVersion: v1 -kind: ConfigMap +kind: Secret metadata: - name: {{ $configMapName }} + name: {{ $secretName }} data: 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 }} diff --git a/divingbell/templates/configmap-mounts.yaml b/divingbell/templates/secret-mounts.yaml similarity index 83% rename from divingbell/templates/configmap-mounts.yaml rename to divingbell/templates/secret-mounts.yaml index de5541c..fbcad72 100644 --- a/divingbell/templates/configmap-mounts.yaml +++ b/divingbell/templates/secret-mounts.yaml @@ -14,17 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- define "divingbell.configmap.mounts" }} -{{- $configMapName := index . 0 }} +{{- define "divingbell.secret.mounts" }} +{{- $secretName := index . 0 }} {{- $envAll := index . 1 }} {{- with $envAll }} --- apiVersion: v1 -kind: ConfigMap +kind: Secret metadata: - name: {{ $configMapName }} + name: {{ $secretName }} data: 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 }} diff --git a/divingbell/templates/configmap-sysctl.yaml b/divingbell/templates/secret-sysctl.yaml similarity index 83% rename from divingbell/templates/configmap-sysctl.yaml rename to divingbell/templates/secret-sysctl.yaml index 939b192..f504739 100644 --- a/divingbell/templates/configmap-sysctl.yaml +++ b/divingbell/templates/secret-sysctl.yaml @@ -14,17 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- define "divingbell.configmap.sysctl" }} -{{- $configMapName := index . 0 }} +{{- define "divingbell.secret.sysctl" }} +{{- $secretName := index . 0 }} {{- $envAll := index . 1 }} {{- with $envAll }} --- apiVersion: v1 -kind: ConfigMap +kind: Secret metadata: - name: {{ $configMapName }} + name: {{ $secretName }} data: 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 }} diff --git a/divingbell/templates/configmap-uamlite.yaml b/divingbell/templates/secret-uamlite.yaml similarity index 84% rename from divingbell/templates/configmap-uamlite.yaml rename to divingbell/templates/secret-uamlite.yaml index 3302c48..46c19a1 100644 --- a/divingbell/templates/configmap-uamlite.yaml +++ b/divingbell/templates/secret-uamlite.yaml @@ -14,17 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */}} -{{- define "divingbell.configmap.uamlite" }} -{{- $configMapName := index . 0 }} +{{- define "divingbell.secret.uamlite" }} +{{- $secretName := index . 0 }} {{- $envAll := index . 1 }} {{- with $envAll }} --- apiVersion: v1 -kind: ConfigMap +kind: Secret metadata: - name: {{ $configMapName }} + name: {{ $secretName }} data: 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 }}