1+ {{- range $name, $spec := .Values.instances }}
2+ apiVersion : apps/v1
3+ kind : StatefulSet
4+ metadata :
5+ name : {{ include "esgf-sync.fullname" $ }}
6+ labels :
7+ {{- include "esgf-sync.labels" $ | nindent 4 }}
8+ app.kubernetes.io/component : {{ $name }}
9+ spec :
10+ replicas : 1
11+ selector :
12+ matchLabels :
13+ {{- include "esgf-sync.selectorLabels" $ | nindent 6 }}
14+ app.kubernetes.io/component : {{ $name }}
15+ template :
16+ metadata :
17+ {{- with $.Values.podAnnotations }}
18+ annotations :
19+ {{- toYaml . | nindent 8 }}
20+ {{- end }}
21+ labels :
22+ {{- include "esgf-sync.labels" $ | nindent 8 }}
23+ app.kubernetes.io/component : {{ $name }}
24+ {{- with $.Values.podLabels }}
25+ {{- toYaml . | nindent 8 }}
26+ {{- end }}
27+ spec :
28+ {{- with $.Values.imagePullSecrets }}
29+ imagePullSecrets :
30+ {{- toYaml . | nindent 8 }}
31+ {{- end }}
32+ serviceAccountName : {{ include "esgf-sync.serviceAccountName" $ }}
33+ {{- with $.Values.podSecurityContext }}
34+ securityContext :
35+ {{- toYaml . | nindent 8 }}
36+ {{- end }}
37+ containers :
38+ - name : {{ $name }}
39+ env :
40+ - name : GLOBUS_CLIENT_ID
41+ value : {{ $.Values.GLOBUS_CLIENT_ID | quote }}
42+ - name : GLOBUS_CLIENT_SECRET
43+ value : {{ $.Values.GLOBUS_CLIENT_SECRET | quote }}
44+ command : ["/bin/sh", "-c"]
45+ args :
46+ - {{ $spec.command | quote }}
47+ {{- with $.Values.securityContext }}
48+ securityContext :
49+ {{- toYaml . | nindent 12 }}
50+ {{- end }}
51+ image : " {{ $.Values.image.repository }}:{{ $.Values.image.tag | default $.Chart.AppVersion }}"
52+ imagePullPolicy : {{ $.Values.image.pullPolicy }}
53+ {{- with $.Values.resources }}
54+ resources :
55+ {{- toYaml . | nindent 12 }}
56+ {{- end }}
57+ volumeMounts :
58+ - name : {{ include "esgf-sync.fullname" $ }}
59+ mountPath : /data
60+ {{- with $.Values.nodeSelector }}
61+ nodeSelector :
62+ {{- toYaml . | nindent 8 }}
63+ {{- end }}
64+ {{- with $.Values.affinity }}
65+ affinity :
66+ {{- toYaml . | nindent 8 }}
67+ {{- end }}
68+ {{- with $.Values.tolerations }}
69+ tolerations :
70+ {{- toYaml . | nindent 8 }}
71+ {{- end }}
72+ volumeClaimTemplates :
73+ - metadata :
74+ name : {{ include "esgf-sync.fullname" $ }}-{{ $name }}
75+ labels :
76+ {{- include "esgf-sync.labels" $ | nindent 8 }}
77+ app.kubernetes.io/component : {{ $name }}
78+ spec :
79+ accessModes : ["ReadWriteOnce"]
80+ resources :
81+ requests :
82+ storage : 5G
83+ ---
84+ {{- end }}
0 commit comments