|
47 | 47 | labels: |
48 | 48 | app: elasticsearch |
49 | 49 | 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 |
61 | 50 | containers: |
62 | 51 | - name: elasticsearch |
63 | 52 | image: ghcr.io/satomic/copilot-usage-advanced-dashboard/elastic-search:main |
@@ -122,24 +111,6 @@ spec: |
122 | 111 | labels: |
123 | 112 | app: grafana |
124 | 113 | 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" |
143 | 114 | containers: |
144 | 115 | - name: grafana |
145 | 116 | image: ghcr.io/satomic/copilot-usage-advanced-dashboard/grafana:main |
@@ -178,13 +149,14 @@ spec: |
178 | 149 | httpGet: |
179 | 150 | path: /api/health |
180 | 151 | port: 80 |
181 | | - initialDelaySeconds: 30 |
182 | | - periodSeconds: 10 |
| 152 | + initialDelaySeconds: 90 |
| 153 | + periodSeconds: 30 |
| 154 | + failureThreshold: 5 |
183 | 155 | readinessProbe: |
184 | 156 | httpGet: |
185 | 157 | path: /api/health |
186 | 158 | port: 80 |
187 | | - initialDelaySeconds: 10 |
| 159 | + initialDelaySeconds: 30 |
188 | 160 | periodSeconds: 10 |
189 | 161 | volumes: |
190 | 162 | - name: grafana-data |
@@ -263,3 +235,32 @@ spec: |
263 | 235 | - name: cpuad-updater-logs |
264 | 236 | persistentVolumeClaim: |
265 | 237 | 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