1+ {{- if .Values.grafanaUI.enabled }}
2+ apiVersion : apps/v1
3+ kind : StatefulSet
4+ metadata :
5+ name : grafana-ui
6+ namespace : {{ $.Release.Namespace }}
7+ labels :
8+ app : grafana-ui
9+ spec :
10+ replicas : {{ .Values.grafanaUI.replicas }}
11+ selector :
12+ matchLabels :
13+ app : grafana-ui
14+ serviceName : grafana-ui
15+ podManagementPolicy : OrderedReady
16+ updateStrategy :
17+ type : RollingUpdate
18+ rollingUpdate :
19+ partition : 0
20+ revisionHistoryLimit : 10
21+ persistentVolumeClaimRetentionPolicy :
22+ whenDeleted : Retain
23+ whenScaled : Retain
24+ template :
25+ metadata :
26+ labels :
27+ app : grafana-ui
28+ annotations :
29+ k8s_grafana_com_scrape : " true"
30+ k8s_grafana_com_job : " grafana-metrics"
31+ k8s_grafana_com_metrics_path : " /metrics"
32+ k8s_grafana_com_metrics_portNumber : " 3000"
33+ spec :
34+ containers :
35+ - name : grafana-ui
36+ image : " {{ .Values.grafanaUI.image }}:{{ .Values.grafanaUI.imageTag | default .Values.global.release }}"
37+ ports :
38+ - containerPort : 3000
39+ env :
40+ - name : GF_INSTALL_PLUGINS
41+ value : {{ .Values.grafanaUI.plugins | quote }}
42+ - name : GF_SERVER_ROOT_URL
43+ value : " {{ .Values.global.grafanaProxyUrl }}"
44+ - name : GF_SECURITY_ADMIN_USER
45+ valueFrom :
46+ secretKeyRef :
47+ name : grafanaui
48+ key : username
49+ - name : GF_SECURITY_ADMIN_PASSWORD
50+ valueFrom :
51+ secretKeyRef :
52+ name : grafanaui
53+ key : password
54+ - name : DOCKER_IMAGE
55+ value : " {{ .Values.grafanaUI.image }}:{{ .Values.grafanaUI.imageTag | default .Values.global.release }}"
56+ resources :
57+ {{- toYaml .Values.grafanaUI.resources | nindent 12 }}
58+ volumeMounts :
59+ - name : data
60+ mountPath : /var/lib/grafana
61+ securityContext :
62+ fsGroup : 472
63+ affinity :
64+ podAntiAffinity :
65+ preferredDuringSchedulingIgnoredDuringExecution :
66+ - weight : 1
67+ podAffinityTerm :
68+ labelSelector :
69+ matchLabels :
70+ app : grafana-ui
71+ topologyKey : kubernetes.io/hostname
72+ volumeClaimTemplates :
73+ - metadata :
74+ name : data
75+ spec :
76+ accessModes :
77+ - ReadWriteOnce
78+ resources :
79+ requests :
80+ storage : {{ .Values.grafanaUI.volume.size }}
81+ ---
82+ {{- end }}
83+ {{- if .Values.duploAutomation.enabled }}
84+ apiVersion : apps/v1
85+ kind : StatefulSet
86+ metadata :
87+ name : duplo-automation
88+ namespace : {{ $.Release.Namespace }}
89+ labels :
90+ app : duplo-automation
91+ spec :
92+ replicas : {{ .Values.duploAutomation.replicas }}
93+ selector :
94+ matchLabels :
95+ app : duplo-automation
96+ serviceName : duplo-automation
97+ podManagementPolicy : OrderedReady
98+ updateStrategy :
99+ type : RollingUpdate
100+ rollingUpdate :
101+ partition : 0
102+ revisionHistoryLimit : 10
103+ persistentVolumeClaimRetentionPolicy :
104+ whenDeleted : Retain
105+ whenScaled : Retain
106+ template :
107+ metadata :
108+ labels :
109+ app : duplo-automation
110+ spec :
111+ containers :
112+ - name : duplo-automation
113+ image : " {{ .Values.duploAutomation.image }}:{{ .Values.duploAutomation.imageTag | default .Values.global.release }}"
114+ ports :
115+ - containerPort : 5000
116+ env :
117+ - name : GRR_GRAFANA_URL
118+ value : " http://grafana-ui:3000"
119+ - name : GRR_GRAFANA_TOKEN
120+ valueFrom :
121+ secretKeyRef :
122+ name : grafanaui
123+ key : password
124+ - name : GRR_GRAFANA_USER
125+ valueFrom :
126+ secretKeyRef :
127+ name : grafanaui
128+ key : username
129+ - name : GRR_MIMIR_ADDRESS
130+ value : " http://duplo-metrics-ruler:8080"
131+ - name : GRR_MIMIR_TENANT_ID
132+ value : " anonymous"
133+ - name : GRR_TARGETS
134+ value : " Datasource,DashboardFolder,LibraryElement,Dashboard,AlertRuleGroup,AlertNotificationPolicy,AlertContactPoint,PrometheusRuleGroup"
135+ - name : GRR_OUTPUT_FORMAT
136+ value : " yaml"
137+ - name : GRR_ONLY_SPEC
138+ value : " false"
139+ - name : GRIZZLY_HTTP_TIMEOUT
140+ value : " 60"
141+ - name : MIMIR_RULER
142+ value : " http://duplo-metrics-ruler:8080"
143+ - name : MIMIR_ADDRESS
144+ value : " http://duplo-metrics-nginx"
145+ - name : MIMIR_ALERTMANAGER
146+ value : " http://duplo-metrics-alertmanager:8080"
147+ - name : MIMIR_TENANT_ID
148+ value : " anonymous"
149+ - name : DOCKER_IMAGE
150+ value : " {{ .Values.duploAutomation.image }}:{{ .Values.duploAutomation.imageTag | default .Values.global.release }}"
151+ volumeMounts :
152+ - name : data
153+ mountPath : /app/data
154+ securityContext :
155+ fsGroup : 472
156+ affinity :
157+ podAntiAffinity :
158+ preferredDuringSchedulingIgnoredDuringExecution :
159+ - weight : 1
160+ podAffinityTerm :
161+ labelSelector :
162+ matchLabels :
163+ app : duplo-automation
164+ topologyKey : kubernetes.io/hostname
165+ volumeClaimTemplates :
166+ - metadata :
167+ name : data
168+ spec :
169+ accessModes :
170+ - ReadWriteOnce
171+ resources :
172+ requests :
173+ storage : {{ .Values.duploAutomation.volume.size }}
174+ ---
175+ {{- end }}
0 commit comments