helmfile.yaml
2.35 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
environments:
default:
values:
- namespace: nfs-server
namePrefix: "test-"
images:
debian: "debian:bullseye-20211220"
volume-nfs: k8s.gcr.io/volume-nfs:0.8
nfs_server:
jsonPatches: []
strategicMergePatches: []
service:
nfs_server:
clusterIP: 0
storageClassName: ""
affinity: null
tolerations: null
---
releases:
- name: {{ .Values.namePrefix }}nfs-server
namespace: {{ .Values.namespace }}
chart: charts/nfs-server
values:
- set-common-values.yaml.gotmpl
jsonPatches:
{{- if .Values.nfs_server.service.nfs_server.clusterIP }}
- target:
kind: Service
name: {{ .Values.namePrefix }}nfs-server
namespace: {{ .Values.namespace }}
version: v1
patch:
- op: add
path: /spec/clusterIP
value: {{ .Values.nfs_server.service.nfs_server.clusterIP }}
{{- end }}
{{- if .Values.nfs_server.storageClassName }}
- target:
kind: PersistentVolumeClaim
name: {{ .Values.namePrefix }}nfs-data
namespace: {{ .Values.namespace }}
version: v1
patch:
- op: add
path: /spec/storageClassName
value: {{ .Values.nfs_server.storageClassName }}
{{- end }}
{{- if not (empty (.Values.nfs_server.jsonPatches)) }}
{{- .Values.nfs_server.jsonPatches | toYaml | indent 6 }}
{{- end }}
strategicMergePatches:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.namePrefix }}nfs-server
namespace: {{ .Values.namespace }}
spec:
template:
spec:
volumes:
- name: nfs-data
persistentVolumeClaim:
claimName: {{ .Values.namePrefix }}nfs-data
{{- if .Values.nfs_server.affinity }}
affinity:
{{- .Values.nfs_server.affinity | toYaml | nindent 16 }}
{{- end }}
{{- if .Values.nfs_server.tolerations }}
tolerations:
{{- .Values.nfs_server.tolerations | toYaml | nindent 16 }}
{{- end }}
{{- if not (empty (.Values.nfs_server.strategicMergePatches)) }}
{{- .Values.nfs_server.strategicMergePatches | toYaml | indent 6 }}
{{- end }}