helmfile.yaml
1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
environments:
default:
values:
- namespace: wordpress
namePrefix: "test-"
wordpress:
jsonPatches: []
strategicMergePatches: []
database:
name: "wordpress"
user: "wordpress"
password: "wordpress"
prefix: "wp_"
mariadbServer:
rootPassword: "CHANGEME"
---
helmfiles:
- path: ../mariadb-server/helmfile.yaml
values:
- namespace: {{ .Values.namespace }}
namePrefix: {{ .Values.namePrefix }}wordpress-
- mariadbServer:
rootPassword: {{ .Values.mariadbServer.rootPassword }}
database: {{ .Values.wordpress.database.name }}
user: {{ .Values.wordpress.database.user }}
password: {{ .Values.wordpress.database.password }}
releases:
- name: {{ .Values.namePrefix }}wordpress
namespace: {{ .Values.namespace }}
chart: .
values:
- set-common-values.yaml.gotmpl
jsonPatches:
{{- if not (empty (.Values.wordpress.jsonPatches)) }}
{{- .Values.wordpress.jsonPatches | toYaml | indent 6 }}
{{- end }}
strategicMergePatches:
- apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.namePrefix }}wordpress-config
namespace: {{ .Values.namespace }}
data:
WORDPRESS_DB_HOST: {{ .Values.namePrefix }}wordpress-mariadb
WORDPRESS_DB_NAME: {{ .Values.wordpress.database.name }}
WORDPRESS_DB_USER: {{ .Values.wordpress.database.user }}
- apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.namePrefix }}wordpress-secret
namespace: {{ .Values.namespace }}
stringData:
WORDPRESS_DB_PASSWORD: {{ .Values.wordpress.database.password }}
WORDPRESS_TABLE_PREFIX: {{ .Values.wordpress.database.prefix }}
{{- if not (empty (.Values.wordpress.strategicMergePatches)) }}
{{- .Values.wordpress.strategicMergePatches | toYaml | indent 6 }}
{{- end }}