-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelmfile.yaml
195 lines (192 loc) · 5.63 KB
/
helmfile.yaml
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
repositories:
- name: rook-release
url: https://charts.rook.io/release
- name: vmware-tanzu
url: https://vmware-tanzu.github.io/helm-charts
- name: prometheus-community
url: https://prometheus-community.github.io/helm-charts
# Waiting does not help with the kvm2/minikube/helm crd timing issue
#helmDefaults:
# #syncArgs:
# #- "--wait"
# wait: true
# https://github.com/roboll/helmfile/issues/1247
environments:
mini-aio:
values:
- velero:
enabled: true
- rook-ceph-cluster-external:
enabled: true
- rook-ceph-service:
enabled: true
- openshift: false
mini-consumer:
values:
- velero:
enabled: true
- rook-ceph-cluster-external:
enabled: true
- rook-ceph-service:
enabled: false
- openshift: false
mini-service:
values:
- velero:
enabled: false
- rook-ceph-cluster-external:
enabled: false
- rook-ceph-service:
enabled: true
- openshift: false
openshift-aio:
values:
- velero:
enabled: true
- rook-ceph-cluster-external:
enabled: true
- rook-ceph-service:
enabled: true
- openshift: true
openshift-consumer:
values:
- velero:
enabled: true
- rook-ceph-cluster-external:
enabled: true
- rook-ceph-service:
enabled: false
- openshift: true
openshift-service:
values:
- velero:
enabled: false
- rook-ceph-cluster-external:
enabled: false
- rook-ceph-service:
enabled: true
- openshift: true
#
# Advanced Configuration: Layering
#
# Helmfile merges all the "base" state files and this state file before processing.
#
# Assuming this state file is named `helmfile.yaml`, all the files are merged in the order of:
# environments.yaml <- defaults.yaml <- templates.yaml <- helmfile.yaml
#bases:
#- environments.yaml
#- defaults.yaml
#- templates.yaml
releases:
{{- if not .Environment.Values.openshift }}
- name: olm
chart: oci://ghcr.io/cloudtooling/helm-charts/olm
namespace: default
version: 0.30.0
values:
- apps/olm/values.yaml
{{- end }}
- name: operators
chart: ./apps/operators
namespace: openshift-operators
createNamespace: true
values:
{{- if .Environment.Values.openshift }}
- apps/{{`{{ .Release.Name }}`}}/envs/openshift/values.yaml
{{- else }}
- apps/{{`{{ .Release.Name }}`}}/envs/default/values.yaml
{{- end }}
{{- if not .Environment.Values.openshift }}
needs:
- default/olm
{{- end }}
- name: rook-ceph
chart: rook-release/rook-ceph
version: ~1.16.0
namespace: rook-ceph
createNamespace: true
values:
#- apps/{{`{{ .Release.Name }}`}}/values.yaml
- apps/{{`{{ .Release.Name }}`}}/envs/{{`{{ .Environment.Name }}`}}/values.yaml
{{- if not .Environment.Values.openshift }}
needs:
- openshift-user-workload-monitoring/kube-prometheus-stack
{{- end}}
- name: rook-ceph-cluster
chart: rook-release/rook-ceph-cluster
version: ~1.16.0
namespace: rook-ceph
values:
- apps/{{`{{ .Release.Name }}`}}/envs/{{`{{ .Environment.Name }}`}}/values.yaml
needs:
- rook-ceph/rook-ceph
labels:
wave: 2
{{- if (index .Environment.Values "rook-ceph-service").enabled }}
hooks:
# prepare preapply presync preuninstall postuninstall postsync cleanup
- events: ["postsync"]
showlogs: false
# TODO:: Wait for resources, run ./setup-rbd.sh or ./export-config.sh (aio or external)
# command: "echo"
command: "sh" # prepare-consumer.sh"
args: ["-c", "./tools/prepare-consumer.sh {{ splitList "-" .Environment.Name | last }}"]
# args: ["{{`{{.Environment.Name}}`}}", "{{`{{.Release.Name}}`}}", "{{`{{.HelmfileCommand}}`}}"]
{{- end }}
{{- if (index .Environment.Values "rook-ceph-cluster-external").enabled }}
- name: rook-ceph-cluster-external
chart: ./apps/rook-ceph-cluster-external
namespace: rook-ceph
values:
- apps/{{`{{ .Release.Name }}`}}/envs/{{`{{ .Environment.Name }}`}}/values.yaml
needs:
- rook-ceph/rook-ceph-cluster
labels:
wave: 2
hooks:
# prepare preapply presync preuninstall postuninstall postsync cleanup
- events: ["postsync"]
showlogs: false
command: "sh"
args: ["-c", "./tools/prepare-velero.sh"]
{{- end}}
- name: openshift-user-workload-monitoring
chart: ./apps/openshift-user-workload-monitoring
namespace: openshift-user-workload-monitoring
{{- if not .Environment.Values.openshift }}
hooks:
# prepare preapply presync preuninstall postuninstall postsync cleanup
- events: ["presync"]
showlogs: false
command: "sh"
args: ["-c", "kubectl -n openshift-operators wait --timeout=180s --for=jsonpath='{.status.state}'=AtLatestKnown subscription/grafana-operator"]
{{- end }}
values:
- apps/{{`{{ .Release.Name }}`}}/values.yaml
{{- if .Environment.Values.openshift }}
- apps/{{`{{ .Release.Name }}`}}/envs/openshift/values.yaml
{{- else }}
- apps/{{`{{ .Release.Name }}`}}/envs/default/values.yaml
needs:
- openshift-operators/operators
{{- end }}
{{- if .Environment.Values.velero.enabled }}
- name: velero
chart: vmware-tanzu/velero
namespace: velero
values:
- apps/{{`{{ .Release.Name }}`}}/values.yaml
- apps/{{`{{ .Release.Name }}`}}/values-dynamic.yaml
labels:
wave: 2
needs:
- rook-ceph/rook-ceph-cluster-external
{{- end }}
{{- if not .Environment.Values.openshift }}
- name: kube-prometheus-stack
chart: prometheus-community/kube-prometheus-stack
version: ~67.4.0
namespace: openshift-user-workload-monitoring
values:
- apps/{{`{{ .Release.Name }}`}}/envs/default/values.yaml
{{- end }}