
There are 3 patches for openstack-helm-infra based on upstream SHA 5ec85a5d70fab468160d2fdafed1a2a7a5151405 There are 3 patches for openstack-helm based on upstream SHA add7a9bc1175f6fafa8ea2918bc1d62209aaf243 Those patches will be removed as the commits are squashed and merged by the containerization team. Story: 2003909 Task: 27632 Depends-On: I5c761b9261e72783f1771492d653e641193f7c52 Depends-On: I57c5ec5f3565e9e585f0935af745e495699aa28c Change-Id: I566f5f841397195024db7c636c1db2be7b2c8f4d Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
141 lines
5.3 KiB
Diff
141 lines
5.3 KiB
Diff
From 82c8a765764c034365ba487b3abbd1da542b0a4c Mon Sep 17 00:00:00 2001
|
|
From: Gerry Kopec <gerry.kopec@windriver.com>
|
|
Date: Tue, 2 Oct 2018 17:11:54 +0000
|
|
Subject: [PATCH 2/3] Revert "Helm-Toolkit: Move sensitive config data to
|
|
secrets."
|
|
|
|
This reverts commit 6186fb6675d57235c22b88d9b3b2215d4c06b082.
|
|
|
|
Conflicts:
|
|
.zuul.yaml
|
|
|
|
To allow per host overrides to work we need to temporarily revert this
|
|
commit. This should be put back once upstream has fixed the issue:
|
|
https://storyboard.openstack.org/#!/story/2003873
|
|
---
|
|
helm-toolkit/templates/manifests/_job-bootstrap.yaml | 4 ++--
|
|
.../templates/manifests/_job-db-drop-mysql.yaml.tpl | 4 ++--
|
|
.../templates/manifests/_job-db-init-mysql.yaml.tpl | 4 ++--
|
|
helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl | 4 ++--
|
|
.../templates/snippets/_values_template_renderer.tpl | 14 ++------------
|
|
ldap/templates/configmap-etc.yaml | 7 +++----
|
|
6 files changed, 13 insertions(+), 24 deletions(-)
|
|
|
|
diff --git a/helm-toolkit/templates/manifests/_job-bootstrap.yaml b/helm-toolkit/templates/manifests/_job-bootstrap.yaml
|
|
index 8afc50e..a3276d5 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-bootstrap.yaml
|
|
+++ b/helm-toolkit/templates/manifests/_job-bootstrap.yaml
|
|
@@ -92,8 +92,8 @@ spec:
|
|
- name: etc-service
|
|
emptyDir: {}
|
|
- name: bootstrap-conf
|
|
- secret:
|
|
- secretName: {{ $configMapEtc | quote }}
|
|
+ configMap:
|
|
+ name: {{ $configMapEtc | quote }}
|
|
defaultMode: 0444
|
|
{{- if $podVols }}
|
|
{{ $podVols | toYaml | indent 8 }}
|
|
diff --git a/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl
|
|
index e813c32..27b347a 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-db-drop-mysql.yaml.tpl
|
|
@@ -118,8 +118,8 @@ spec:
|
|
- name: etc-service
|
|
emptyDir: {}
|
|
- name: db-drop-conf
|
|
- secret:
|
|
- secretName: {{ $configMapEtc | quote }}
|
|
+ configMap:
|
|
+ name: {{ $configMapEtc | quote }}
|
|
defaultMode: 0444
|
|
{{- end -}}
|
|
{{- end -}}
|
|
diff --git a/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl
|
|
index dea5864..8e7e436 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-db-init-mysql.yaml.tpl
|
|
@@ -115,8 +115,8 @@ spec:
|
|
- name: etc-service
|
|
emptyDir: {}
|
|
- name: db-init-conf
|
|
- secret:
|
|
- secretName: {{ $configMapEtc | quote }}
|
|
+ configMap:
|
|
+ name: {{ $configMapEtc | quote }}
|
|
defaultMode: 0444
|
|
{{- end -}}
|
|
{{- end -}}
|
|
diff --git a/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl b/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl
|
|
index 134e99b..df64ecf 100644
|
|
--- a/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl
|
|
+++ b/helm-toolkit/templates/manifests/_job-db-sync.yaml.tpl
|
|
@@ -88,8 +88,8 @@ spec:
|
|
- name: etc-service
|
|
emptyDir: {}
|
|
- name: db-sync-conf
|
|
- secret:
|
|
- secretName: {{ $configMapEtc | quote }}
|
|
+ configMap:
|
|
+ name: {{ $configMapEtc | quote }}
|
|
defaultMode: 0444
|
|
{{- if $podVols }}
|
|
{{ $podVols | toYaml | indent 8 }}
|
|
diff --git a/helm-toolkit/templates/snippets/_values_template_renderer.tpl b/helm-toolkit/templates/snippets/_values_template_renderer.tpl
|
|
index 88a279d..67f099d 100644
|
|
--- a/helm-toolkit/templates/snippets/_values_template_renderer.tpl
|
|
+++ b/helm-toolkit/templates/snippets/_values_template_renderer.tpl
|
|
@@ -67,23 +67,13 @@ return: |
|
|
{{- $envAll := index . "envAll" -}}
|
|
{{- $template := index . "template" -}}
|
|
{{- $key := index . "key" -}}
|
|
-{{- $format := index . "format" | default "configMap" -}}
|
|
{{- with $envAll -}}
|
|
{{- $templateRendered := tpl ( $template | toYaml ) . }}
|
|
-{{- if eq $format "Secret" }}
|
|
-{{- if hasPrefix "|\n" $templateRendered }}
|
|
-{{ $key }}: {{ regexReplaceAllLiteral "\n " ( $templateRendered | trimPrefix "|\n" | trimPrefix " " ) "\n" | b64enc }}
|
|
-{{- else }}
|
|
-{{ $key }}: {{ $templateRendered | b64enc }}
|
|
-{{- end -}}
|
|
-{{- else }}
|
|
-{{- if hasPrefix "|\n" $templateRendered }}
|
|
-{{ $key }}: |
|
|
-{{ regexReplaceAllLiteral "\n " ( $templateRendered | trimPrefix "|\n" | trimPrefix " " ) "\n" | indent 2 }}
|
|
+{{- if hasPrefix "|\n" $templateRendered }}
|
|
+{{ $key }}: {{ $templateRendered }}
|
|
{{- else }}
|
|
{{ $key }}: |
|
|
{{ $templateRendered | indent 2 }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
-{{- end -}}
|
|
diff --git a/ldap/templates/configmap-etc.yaml b/ldap/templates/configmap-etc.yaml
|
|
index 3fa7c37..e724e6d 100644
|
|
--- a/ldap/templates/configmap-etc.yaml
|
|
+++ b/ldap/templates/configmap-etc.yaml
|
|
@@ -13,16 +13,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
-
|
|
{{- if .Values.manifests.configmap_etc }}
|
|
---
|
|
apiVersion: v1
|
|
-kind: Secret
|
|
+kind: ConfigMap
|
|
metadata:
|
|
name: ldap-etc
|
|
-type: Opaque
|
|
data:
|
|
{{- if .Values.bootstrap.enabled }}
|
|
- sample_data.ldif: {{ .Values.data.sample | b64enc }}
|
|
+ sample_data.ldif: |
|
|
+{{ .Values.data.sample | indent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
--
|
|
1.8.3.1
|
|
|