File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,4 +122,134 @@ spec:
122122 restartPolicy : OnFailure
123123 volumes :
124124 - name : cpuad-updater-logs
125- emptyDir : {}
125+ emptyDir : {}
126+
127+
128+ # --- Grafana Deployment ---
129+
130+ ---
131+ apiVersion : apps/v1
132+ kind : Deployment
133+ metadata :
134+ name : grafana
135+ spec :
136+ replicas : 1
137+ selector :
138+ matchLabels :
139+ app : grafana
140+ template :
141+ metadata :
142+ labels :
143+ app : grafana
144+ spec :
145+ containers :
146+ - name : grafana
147+ image : ghcr.io/satomic/copilot-usage-advanced-dashboard/grafana:main
148+ ports :
149+ - containerPort : 80
150+ envFrom :
151+ - secretRef :
152+ name : grafana-credentials
153+ env :
154+ - name : GF_LOG_LEVEL
155+ value : debug
156+ - name : GF_SERVER_HTTP_PORT
157+ value : " 80"
158+ - name : GF_SECURITY_ADMIN_USER
159+ valueFrom :
160+ secretKeyRef :
161+ name : grafana-credentials
162+ key : GRAFANA_USERNAME
163+ - name : GF_SECURITY_ADMIN_PASSWORD
164+ valueFrom :
165+ secretKeyRef :
166+ name : grafana-credentials
167+ key : GRAFANA_PASSWORD
168+ volumeMounts :
169+ - name : grafana-data
170+ mountPath : /var/lib/grafana
171+ subPath : grafana
172+ resources :
173+ requests :
174+ cpu : " 0.5"
175+ memory : " 512Mi"
176+ limits :
177+ cpu : " 1"
178+ memory : " 1Gi"
179+ livenessProbe :
180+ httpGet :
181+ path : /api/health
182+ port : 8080
183+ initialDelaySeconds : 90
184+ periodSeconds : 30
185+ failureThreshold : 5
186+ readinessProbe :
187+ httpGet :
188+ path : /api/health
189+ port : 8080
190+ initialDelaySeconds : 30
191+ periodSeconds : 10
192+ securityContext :
193+ runAsUser : 472
194+ runAsGroup : 472
195+ volumes :
196+ - name : grafana-data
197+ emptyDir : {}
198+ ---
199+ apiVersion : v1
200+ kind : Service
201+ metadata :
202+ name : grafana
203+ spec :
204+ selector :
205+ app : grafana
206+ ports :
207+ - protocol : TCP
208+ port : 80
209+ targetPort : 8080
210+ ---
211+ apiVersion : networking.k8s.io/v1
212+ kind : Ingress
213+ metadata :
214+ name : grafana-ingress
215+ spec :
216+ ingressClassName : nginx
217+ rules :
218+ - http :
219+ paths :
220+ - backend :
221+ service :
222+ name : grafana
223+ port :
224+ number : 80
225+ path : /
226+ pathType : Prefix
227+
228+ # --- update-grafana Job (runs once) ---
229+ ---
230+ apiVersion : batch/v1
231+ kind : Job
232+ metadata :
233+ name : update-grafana-once
234+ spec :
235+ template :
236+ spec :
237+ containers :
238+ - name : update-grafana
239+ image : ghcr.io/satomic/copilot-usage-advanced-dashboard/grafana-updater:main
240+ envFrom :
241+ - secretRef :
242+ name : grafana-credentials
243+ env :
244+ - name : ELASTICSEARCH_URL
245+ value : " http://elasticsearch:9200"
246+ - name : GRAFANA_URL
247+ value : " http://grafana:80"
248+ resources :
249+ requests :
250+ cpu : " 0.25"
251+ memory : " 256Mi"
252+ limits :
253+ cpu : " 0.5"
254+ memory : " 512Mi"
255+ restartPolicy : Never
You can’t perform that action at this time.
0 commit comments