Skip to content

Commit ae9f71f

Browse files
authored
Merge pull request #28 from jordanbean-msft/main
fix for AKS deployment (#11)
2 parents 713c0c5 + a2b2148 commit ae9f71f

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

deploy/aks-deployment.yml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,6 @@ spec:
4747
labels:
4848
app: elasticsearch
4949
spec:
50-
initContainers:
51-
- name: init-elasticsearch
52-
image: busybox:1.28
53-
command: ["/bin/sh", "-c"]
54-
args:
55-
- chown -R 1000:1000 /usr/share/elasticsearch/data && chown -R 1000:1000 /usr/share/elasticsearch/logs
56-
volumeMounts:
57-
- name: elasticsearch
58-
mountPath: /usr/share/elasticsearch/data
59-
- name: elasticsearch
60-
mountPath: /usr/share/elasticsearch/logs
6150
containers:
6251
- name: elasticsearch
6352
image: ghcr.io/satomic/copilot-usage-advanced-dashboard/elastic-search:main
@@ -122,24 +111,6 @@ spec:
122111
labels:
123112
app: grafana
124113
spec:
125-
initContainers:
126-
- name: update-grafana
127-
image: ghcr.io/satomic/copilot-usage-advanced-dashboard/grafana-updater:main
128-
envFrom:
129-
- secretRef:
130-
name: grafana-credentials
131-
env:
132-
- name: ELASTICSEARCH_URL
133-
value: "http://elasticsearch:9200"
134-
- name: GRAFANA_URL
135-
value: "http://grafana:80"
136-
resources:
137-
requests:
138-
cpu: "0.25"
139-
memory: "256Mi"
140-
limits:
141-
cpu: "0.5"
142-
memory: "512Mi"
143114
containers:
144115
- name: grafana
145116
image: ghcr.io/satomic/copilot-usage-advanced-dashboard/grafana:main
@@ -178,13 +149,14 @@ spec:
178149
httpGet:
179150
path: /api/health
180151
port: 80
181-
initialDelaySeconds: 30
182-
periodSeconds: 10
152+
initialDelaySeconds: 90
153+
periodSeconds: 30
154+
failureThreshold: 5
183155
readinessProbe:
184156
httpGet:
185157
path: /api/health
186158
port: 80
187-
initialDelaySeconds: 10
159+
initialDelaySeconds: 30
188160
periodSeconds: 10
189161
volumes:
190162
- name: grafana-data
@@ -263,3 +235,32 @@ spec:
263235
- name: cpuad-updater-logs
264236
persistentVolumeClaim:
265237
claimName: shared-pvc
238+
239+
# --- update-grafana Job (runs once) ---
240+
---
241+
apiVersion: batch/v1
242+
kind: Job
243+
metadata:
244+
name: update-grafana-once
245+
spec:
246+
template:
247+
spec:
248+
containers:
249+
- name: update-grafana
250+
image: ghcr.io/satomic/copilot-usage-advanced-dashboard/grafana-updater:main
251+
envFrom:
252+
- secretRef:
253+
name: grafana-credentials
254+
env:
255+
- name: ELASTICSEARCH_URL
256+
value: "http://elasticsearch:9200"
257+
- name: GRAFANA_URL
258+
value: "http://grafana:80"
259+
resources:
260+
requests:
261+
cpu: "0.25"
262+
memory: "256Mi"
263+
limits:
264+
cpu: "0.5"
265+
memory: "512Mi"
266+
restartPolicy: Never

0 commit comments

Comments
 (0)