Merge "Helm-Toolkit: Move sensitive config data to secrets."
This commit is contained in:
commit
fbf957e5b1
@ -32,6 +32,7 @@
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
- openstack-helm-infra-kubernetes-keystone-auth:
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
@ -55,6 +56,7 @@
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
- openstack-helm-infra-kubernetes-keystone-auth:
|
||||
voting: false
|
||||
irrelevant-files:
|
||||
- ^.*\.rst$
|
||||
- ^doc/.*$
|
||||
|
@ -92,8 +92,8 @@ spec:
|
||||
- name: etc-service
|
||||
emptyDir: {}
|
||||
- name: bootstrap-conf
|
||||
configMap:
|
||||
name: {{ $configMapEtc | quote }}
|
||||
secret:
|
||||
secretName: {{ $configMapEtc | quote }}
|
||||
defaultMode: 0444
|
||||
{{- if $podVols }}
|
||||
{{ $podVols | toYaml | indent 8 }}
|
||||
|
@ -118,8 +118,8 @@ spec:
|
||||
- name: etc-service
|
||||
emptyDir: {}
|
||||
- name: db-drop-conf
|
||||
configMap:
|
||||
name: {{ $configMapEtc | quote }}
|
||||
secret:
|
||||
secretName: {{ $configMapEtc | quote }}
|
||||
defaultMode: 0444
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
@ -115,8 +115,8 @@ spec:
|
||||
- name: etc-service
|
||||
emptyDir: {}
|
||||
- name: db-init-conf
|
||||
configMap:
|
||||
name: {{ $configMapEtc | quote }}
|
||||
secret:
|
||||
secretName: {{ $configMapEtc | quote }}
|
||||
defaultMode: 0444
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
@ -88,8 +88,8 @@ spec:
|
||||
- name: etc-service
|
||||
emptyDir: {}
|
||||
- name: db-sync-conf
|
||||
configMap:
|
||||
name: {{ $configMapEtc | quote }}
|
||||
secret:
|
||||
secretName: {{ $configMapEtc | quote }}
|
||||
defaultMode: 0444
|
||||
{{- if $podVols }}
|
||||
{{ $podVols | toYaml | indent 8 }}
|
||||
|
@ -67,13 +67,23 @@ return: |
|
||||
{{- $envAll := index . "envAll" -}}
|
||||
{{- $template := index . "template" -}}
|
||||
{{- $key := index . "key" -}}
|
||||
{{- $format := index . "format" | default "configMap" -}}
|
||||
{{- with $envAll -}}
|
||||
{{- $templateRendered := tpl ( $template | toYaml ) . }}
|
||||
{{- if hasPrefix "|\n" $templateRendered }}
|
||||
{{ $key }}: {{ $templateRendered }}
|
||||
{{- 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 }}
|
||||
{{- else }}
|
||||
{{ $key }}: |
|
||||
{{ $templateRendered | indent 2 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
@ -13,15 +13,16 @@ 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: ConfigMap
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ldap-etc
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
sample_data.ldif: |
|
||||
{{ .Values.data.sample | indent 4 }}
|
||||
sample_data.ldif: {{ .Values.data.sample | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user