helmfile.yaml
3.9 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
environments:
{{ .Environment.Name }}:
missingFileHandler: Debug
values:
- environments/default-values.yaml
{{- if ne .Environment.Name "default" }}
- environments/{{ .Environment.Name }}-values.yaml
{{- end }}
---
releases:
- name: {{ .Values.name }}-moqui-elasticsearch
condition: elasticsearch.enabled
chart: charts/elasticsearch
namespace: {{ .Values.namespace }}
values:
- namePrefix: {{ .Values.name }}-
- name: {{ .Values.name }}-moqui-postgresql
condition: postgresql.enabled
chart: charts/postgresql
namespace: {{ .Values.namespace }}
values:
- namePrefix: {{ .Values.name }}-
strategicMergePatches:
- apiVersion: acid.zalan.do/v1
kind: postgresql
metadata:
name: {{ .Values.name }}-moqui-postgresql
namespace: {{ .Values.namespace }}
spec:
teamId: {{ .Values.name }}-moqui
volume:
size: {{ .Values.postgresql.volume.size | quote }}
postgresql:
version: {{ .Values.postgresql.version | quote }}
{{- if .Values | get "postgresql.clone.uid" nil }}
clone:
{{ merge .Values.postgresql.clone ( dict "cluster" ( print .Values.name "-moqui-postgresql" ) ) | toYaml | nindent 12 }}
{{- end }}
- name: {{ .Values.name }}-moqui-app
chart: charts/moqui
namespace: {{ .Values.namespace }}
values:
- namePrefix: {{ .Values.name }}-
images:
- name: moqui-app
newName: localhost:31234/moqui-app
newTag: test-latest
- name: moqui-jdbc-drivers
newName: localhost:31234/moqui-jdbc-drivers
newTag: test-latest
strategicMergePatches:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.name }}-moqui
namespace: {{ .Values.namespace }}
labels:
app: {{ .Values.name }}-moqui
spec:
selector:
matchLabels:
app: {{ .Values.name }}-moqui
template:
metadata:
labels:
app: {{ .Values.name }}-moqui
spec:
restartPolicy: Always
securityContext:
runAsUser: 0
runAsGroup: 0
containers:
- name: moqui
env:
{{- if .Values.elasticsearch.enabled }}
- name: elasticsearch_url
value: https://{{ .Values.name }}-moqui-es-http:9200
- name: elasticsearch_user
value: elastic
- name: elasticsearch_password
valueFrom:
secretKeyRef:
name: {{ .Values.name }}-moqui-es-elastic-user
key: elastic
{{- end }}
{{- if .Values.postgresql.enabled }}
- name: entity_ds_db_conf
value: postgres
- name: entity_ds_host
value: {{ .Values.name }}-moqui-postgresql
- name: entity_ds_port
value: "5432"
- name: entity_ds_user
valueFrom:
secretKeyRef:
name: moqui.{{ .Values.name }}-moqui-postgresql.credentials.postgresql.acid.zalan.do
key: username
- name: entity_ds_password
valueFrom:
secretKeyRef:
name: moqui.{{ .Values.name }}-moqui-postgresql.credentials.postgresql.acid.zalan.do
key: password
- name: entity_ds_database
value: moqui
- name: entity_ds_schema
value: public
{{- end }}