Browse Source

Change all ConfigMap to Secret

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

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

Change-Id: Ie95aee1a4104008ca93c23ac9d19245a87fade20
Anderson, Craig (ca846m) 5 months ago
parent
commit
461f4e93d5

+ 9
- 9
divingbell/templates/daemonset-ethtool.yaml View File

@@ -16,7 +16,7 @@
16 16
 
17 17
 {{- define "divingbell.daemonset.ethtool" }}
18 18
   {{- $daemonset := index . 0 }}
19
-  {{- $configMapName := index . 1 }}
19
+  {{- $secretName := index . 1 }}
20 20
   {{- $envAll := index . 2 }}
21 21
   {{- with $envAll }}
22 22
 ---
@@ -46,7 +46,7 @@ spec:
46 46
         volumeMounts:
47 47
         - name: rootfs-{{ $daemonset }}
48 48
           mountPath: {{ .Values.conf.chroot_mnt_path }}
49
-        - name: {{ $configMapName }}
49
+        - name: {{ $secretName }}
50 50
           mountPath: /tmp/{{ $daemonset }}.sh
51 51
           subPath: {{ $daemonset }}
52 52
           readOnly: true
@@ -56,16 +56,16 @@ spec:
56 56
       - name: rootfs-{{ $daemonset }}
57 57
         hostPath:
58 58
           path: /
59
-      - name: {{ $configMapName }}
60
-        configMap:
61
-          name: {{ $configMapName }}
59
+      - name: {{ $secretName }}
60
+        secret:
61
+          secretName: {{ $secretName }}
62 62
           defaultMode: 0555
63 63
   {{- end }}
64 64
 {{- end }}
65 65
 {{- if .Values.manifests.daemonset_ethtool }}
66 66
 {{- $daemonset := "ethtool" }}
67
-{{- $configMapName := "divingbell-ethtool" }}
68
-{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.ethtool" | toString | fromYaml }}
69
-{{- $configmap_include := "divingbell.configmap.ethtool" }}
70
-{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }}
67
+{{- $secretName := "divingbell-ethtool" }}
68
+{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.ethtool" | toString | fromYaml }}
69
+{{- $secret_include := "divingbell.secret.ethtool" }}
70
+{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
71 71
 {{- end }}

+ 9
- 9
divingbell/templates/daemonset-limits.yaml View File

@@ -16,7 +16,7 @@
16 16
 
17 17
 {{- define "divingbell.daemonset.limits" }}
18 18
   {{- $daemonset := index . 0 }}
19
-  {{- $configMapName := index . 1 }}
19
+  {{- $secretName := index . 1 }}
20 20
   {{- $envAll := index . 2 }}
21 21
   {{- with $envAll }}
22 22
 ---
@@ -46,7 +46,7 @@ spec:
46 46
         volumeMounts:
47 47
         - name: rootfs-{{ $daemonset }}
48 48
           mountPath: {{ .Values.conf.chroot_mnt_path }}
49
-        - name: {{ $configMapName }}
49
+        - name: {{ $secretName }}
50 50
           mountPath: /tmp/{{ $daemonset }}.sh
51 51
           subPath: {{ $daemonset }}
52 52
           readOnly: true
@@ -56,16 +56,16 @@ spec:
56 56
       - name: rootfs-{{ $daemonset }}
57 57
         hostPath:
58 58
           path: /
59
-      - name: {{ $configMapName }}
60
-        configMap:
61
-          name: {{ $configMapName }}
59
+      - name: {{ $secretName }}
60
+        secret:
61
+          secretName: {{ $secretName }}
62 62
           defaultMode: 0555
63 63
   {{- end }}
64 64
 {{- end }}
65 65
 {{- if .Values.manifests.daemonset_limits }}
66 66
 {{- $daemonset := "limits" }}
67
-{{- $configMapName := "divingbell-limits" }}
68
-{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.limits" | toString | fromYaml }}
69
-{{- $configmap_include := "divingbell.configmap.limits" }}
70
-{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }}
67
+{{- $secretName := "divingbell-limits" }}
68
+{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.limits" | toString | fromYaml }}
69
+{{- $secret_include := "divingbell.secret.limits" }}
70
+{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
71 71
 {{- end }}

+ 9
- 9
divingbell/templates/daemonset-mounts.yaml View File

@@ -16,7 +16,7 @@
16 16
 
17 17
 {{- define "divingbell.daemonset.mounts" }}
18 18
   {{- $daemonset := index . 0 }}
19
-  {{- $configMapName := index . 1 }}
19
+  {{- $secretName := index . 1 }}
20 20
   {{- $envAll := index . 2 }}
21 21
   {{- with $envAll }}
22 22
 ---
@@ -46,7 +46,7 @@ spec:
46 46
         volumeMounts:
47 47
         - name: rootfs-{{ $daemonset }}
48 48
           mountPath: {{ .Values.conf.chroot_mnt_path }}
49
-        - name: {{ $configMapName }}
49
+        - name: {{ $secretName }}
50 50
           mountPath: /tmp/{{ $daemonset }}.sh
51 51
           subPath: {{ $daemonset }}
52 52
           readOnly: true
@@ -56,16 +56,16 @@ spec:
56 56
       - name: rootfs-{{ $daemonset }}
57 57
         hostPath:
58 58
           path: /
59
-      - name: {{ $configMapName }}
60
-        configMap:
61
-          name: {{ $configMapName }}
59
+      - name: {{ $secretName }}
60
+        secret:
61
+          secretName: {{ $secretName }}
62 62
           defaultMode: 0555
63 63
   {{- end }}
64 64
 {{- end }}
65 65
 {{- if .Values.manifests.daemonset_mounts }}
66 66
 {{- $daemonset := "mounts" }}
67
-{{- $configMapName := "divingbell-mounts" }}
68
-{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.mounts" | toString | fromYaml }}
69
-{{- $configmap_include := "divingbell.configmap.mounts" }}
70
-{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }}
67
+{{- $secretName := "divingbell-mounts" }}
68
+{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.mounts" | toString | fromYaml }}
69
+{{- $secret_include := "divingbell.secret.mounts" }}
70
+{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
71 71
 {{- end }}

+ 9
- 9
divingbell/templates/daemonset-sysctl.yaml View File

@@ -16,7 +16,7 @@
16 16
 
17 17
 {{- define "divingbell.daemonset.sysctl" }}
18 18
   {{- $daemonset := index . 0 }}
19
-  {{- $configMapName := index . 1 }}
19
+  {{- $secretName := index . 1 }}
20 20
   {{- $envAll := index . 2 }}
21 21
   {{- with $envAll }}
22 22
 ---
@@ -46,7 +46,7 @@ spec:
46 46
         volumeMounts:
47 47
         - name: rootfs-{{ $daemonset }}
48 48
           mountPath: {{ .Values.conf.chroot_mnt_path }}
49
-        - name: {{ $configMapName }}
49
+        - name: {{ $secretName }}
50 50
           mountPath: /tmp/{{ $daemonset }}.sh
51 51
           subPath: {{ $daemonset }}
52 52
           readOnly: true
@@ -56,16 +56,16 @@ spec:
56 56
       - name: rootfs-{{ $daemonset }}
57 57
         hostPath:
58 58
           path: /
59
-      - name: {{ $configMapName }}
60
-        configMap:
61
-          name: {{ $configMapName }}
59
+      - name: {{ $secretName }}
60
+        secret:
61
+          secretName: {{ $secretName }}
62 62
           defaultMode: 0555
63 63
   {{- end }}
64 64
 {{- end }}
65 65
 {{- if .Values.manifests.daemonset_sysctl }}
66 66
 {{- $daemonset := "sysctl" }}
67
-{{- $configMapName := "divingbell-sysctl" }}
68
-{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.sysctl" | toString | fromYaml }}
69
-{{- $configmap_include := "divingbell.configmap.sysctl" }}
70
-{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }}
67
+{{- $secretName := "divingbell-sysctl" }}
68
+{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.sysctl" | toString | fromYaml }}
69
+{{- $secret_include := "divingbell.secret.sysctl" }}
70
+{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
71 71
 {{- end }}

+ 9
- 9
divingbell/templates/daemonset-uamlite.yaml View File

@@ -16,7 +16,7 @@
16 16
 
17 17
 {{- define "divingbell.daemonset.uamlite" }}
18 18
   {{- $daemonset := index . 0 }}
19
-  {{- $configMapName := index . 1 }}
19
+  {{- $secretName := index . 1 }}
20 20
   {{- $envAll := index . 2 }}
21 21
   {{- with $envAll }}
22 22
 ---
@@ -46,7 +46,7 @@ spec:
46 46
         volumeMounts:
47 47
         - name: rootfs-{{ $daemonset }}
48 48
           mountPath: {{ .Values.conf.chroot_mnt_path }}
49
-        - name: {{ $configMapName }}
49
+        - name: {{ $secretName }}
50 50
           mountPath: /tmp/{{ $daemonset }}.sh
51 51
           subPath: {{ $daemonset }}
52 52
           readOnly: true
@@ -56,16 +56,16 @@ spec:
56 56
       - name: rootfs-{{ $daemonset }}
57 57
         hostPath:
58 58
           path: /
59
-      - name: {{ $configMapName }}
60
-        configMap:
61
-          name: {{ $configMapName }}
59
+      - name: {{ $secretName }}
60
+        secret:
61
+          secretName: {{ $secretName }}
62 62
           defaultMode: 0555
63 63
   {{- end }}
64 64
 {{- end }}
65 65
 {{- if .Values.manifests.daemonset_uamlite }}
66 66
 {{- $daemonset := "uamlite" }}
67
-{{- $configMapName := "divingbell-uamlite" }}
68
-{{- $daemonset_yaml := list $daemonset $configMapName . | include "divingbell.daemonset.uamlite" | toString | fromYaml }}
69
-{{- $configmap_include := "divingbell.configmap.uamlite" }}
70
-{{- list $daemonset $daemonset_yaml $configmap_include $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }}
67
+{{- $secretName := "divingbell-uamlite" }}
68
+{{- $daemonset_yaml := list $daemonset $secretName . | include "divingbell.daemonset.uamlite" | toString | fromYaml }}
69
+{{- $secret_include := "divingbell.secret.uamlite" }}
70
+{{- list $daemonset $daemonset_yaml $secret_include $secretName . | include "helm-toolkit.utils.daemonset_overrides" }}
71 71
 {{- end }}

divingbell/templates/configmap-ethtool.yaml → divingbell/templates/secret-ethtool.yaml View File

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

divingbell/templates/configmap-limits.yaml → divingbell/templates/secret-limits.yaml View File

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

divingbell/templates/configmap-mounts.yaml → divingbell/templates/secret-mounts.yaml View File

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

divingbell/templates/configmap-sysctl.yaml → divingbell/templates/secret-sysctl.yaml View File

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

divingbell/templates/configmap-uamlite.yaml → divingbell/templates/secret-uamlite.yaml View File

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

Loading…
Cancel
Save