Update helmrelease
This commit is contained in:
parent
726f2e98cf
commit
c520ba3a5c
@ -1,17 +1,17 @@
|
||||
{{- if .Values.config.plain }}
|
||||
{{- if .Values.config.raw }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "helmrelease.fullname" . }}-config
|
||||
name: {{ include "helmrelease.fullname" . }}-raw-config
|
||||
labels:
|
||||
{{- include "helmrelease.labels" $ | nindent 4 }}
|
||||
data:
|
||||
stringData:
|
||||
config: |-
|
||||
{{- .Values.config | toYaml | nindent 6 }}
|
||||
{{- .Values.config.raw | toYaml | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.config.sensitive }}
|
||||
{{- if .Values.config.pretty }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
@ -20,8 +20,9 @@ metadata:
|
||||
labels:
|
||||
{{- include "helmrelease.labels" $ | nindent 4 }}
|
||||
stringData:
|
||||
config: |-
|
||||
{{- .Values.config | toYaml | nindent 6 }}
|
||||
{{- range .Values.config.pretty }}
|
||||
{{ .key }}: {{ .value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
---
|
||||
@ -33,7 +34,8 @@ metadata:
|
||||
{{- include "helmrelease.labels" $ | nindent 4 }}
|
||||
spec:
|
||||
interval: 5m
|
||||
url: {{ .Values.helm.repo }}
|
||||
url: {{ .Values.helm.repo.url }}
|
||||
type: {{ .Values.helm.repo.type }}
|
||||
---
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
@ -63,16 +65,17 @@ spec:
|
||||
enable: true
|
||||
driftDetection:
|
||||
mode: enabled
|
||||
{{- if or .Values.config.plain .Values.config.sensitive }}
|
||||
{{- if or .Values.config.pretty .Values.config.raw }}
|
||||
valuesFrom:
|
||||
{{- if .Values.config.plain }}
|
||||
- kind: ConfigMap
|
||||
name: {{ include "helmrelease.fullname" . }}-config
|
||||
{{- if .Values.config.raw }}
|
||||
- kind: Secret
|
||||
name: {{ include "helmrelease.fullname" . }}-raw-config
|
||||
valuesKey: config
|
||||
{{- end }}
|
||||
{{- if .Values.config.sensitive }}
|
||||
{{- range .Values.config.pretty }}
|
||||
- kind: Secret
|
||||
name: {{ include "helmrelease.fullname" . }}-config
|
||||
valuesKey: config
|
||||
name: {{ include "helmrelease.fullname" $ }}-config
|
||||
valuesKey: {{ .key }}
|
||||
targetPath: {{ .path }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -3,11 +3,12 @@ helm:
|
||||
chart:
|
||||
name: test
|
||||
version: test
|
||||
repo: test
|
||||
repo:
|
||||
url: test
|
||||
type: oci
|
||||
config:
|
||||
plain:
|
||||
test: test
|
||||
test2: test2
|
||||
secret:
|
||||
test: test
|
||||
test2: test2
|
||||
pretty:
|
||||
- key: encryption_method
|
||||
path: env.environment.data.METHOD
|
||||
value: test
|
||||
raw: ""
|
Loading…
Reference in New Issue
Block a user