@leverege/build-tools 2.34.0 → 2.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -197,12 +197,12 @@ serverFiles:
|
|
|
197
197
|
|
|
198
198
|
- alert: KubernetesPodNotHealthy
|
|
199
199
|
expr: kube_pod_status_phase{phase=~"Pending|Unknown|Failed"} == 1
|
|
200
|
-
for:
|
|
200
|
+
for: 20m
|
|
201
201
|
labels:
|
|
202
202
|
severity: error
|
|
203
203
|
annotations:
|
|
204
204
|
summary: "Kubernetes Pod not healthy"
|
|
205
|
-
description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than
|
|
205
|
+
description: "Pod {{ $labels.pod }} has been in a non-ready state for longer than 20 minutes."
|
|
206
206
|
dashboard: "Check the pod status using the Kubernetes UI"
|
|
207
207
|
|
|
208
208
|
- alert: KubernetesPodCrashLooping
|
package/src/helmup
CHANGED
|
@@ -317,40 +317,35 @@ function installPreemptibleKiller() {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
function installCronZombieKiller() {
|
|
320
|
-
local BATCH_SYNTAX='batch/v1' # GKE 1.21 and beyond
|
|
321
|
-
[ ! -z "$PRE_GKE_21" ] && BATCH_SYNTAX='batch/v1beta1'
|
|
322
320
|
cat<<END_OF_ZOMBIE | kubectl apply -f -
|
|
323
321
|
apiVersion: v1
|
|
324
322
|
kind: ServiceAccount
|
|
325
323
|
metadata:
|
|
326
324
|
name: cron-zombie-sa
|
|
327
|
-
namespace: default
|
|
328
325
|
---
|
|
329
326
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
330
|
-
kind:
|
|
327
|
+
kind: ClusterRole
|
|
331
328
|
metadata:
|
|
332
|
-
name:
|
|
333
|
-
namespace: default
|
|
329
|
+
name: cron-zombie-role
|
|
334
330
|
rules:
|
|
335
331
|
- apiGroups: [""]
|
|
336
332
|
resources: ["pods"]
|
|
337
|
-
verbs: ["
|
|
333
|
+
verbs: ["list", "delete"]
|
|
338
334
|
---
|
|
339
335
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
340
|
-
kind:
|
|
336
|
+
kind: ClusterRoleBinding
|
|
341
337
|
metadata:
|
|
342
|
-
name:
|
|
343
|
-
|
|
338
|
+
name: cron-zombie-role-binding
|
|
339
|
+
roleRef:
|
|
340
|
+
apiGroup: rbac.authorization.k8s.io
|
|
341
|
+
kind: ClusterRole
|
|
342
|
+
name: cron-zombie-role
|
|
344
343
|
subjects:
|
|
345
344
|
- kind: ServiceAccount
|
|
346
345
|
name: cron-zombie-sa
|
|
347
346
|
namespace: default
|
|
348
|
-
roleRef:
|
|
349
|
-
kind: Role
|
|
350
|
-
name: pod-accessor-role
|
|
351
|
-
apiGroup: ""
|
|
352
347
|
---
|
|
353
|
-
apiVersion:
|
|
348
|
+
apiVersion: batch/v1
|
|
354
349
|
kind: CronJob
|
|
355
350
|
metadata:
|
|
356
351
|
namespace: default
|
|
@@ -375,22 +370,9 @@ spec:
|
|
|
375
370
|
- "/bin/sh"
|
|
376
371
|
args:
|
|
377
372
|
- "-c"
|
|
378
|
-
- "echo
|
|
373
|
+
- "echo 'Hunting Zombies' ; kubectl get pods --all-namespaces --field-selector=status.phase=Failed -o json | kubectl delete -f - 2> /dev/null"
|
|
379
374
|
status: {}
|
|
380
375
|
END_OF_ZOMBIE
|
|
381
|
-
|
|
382
|
-
if [[ $? -eq 1 ]];
|
|
383
|
-
then
|
|
384
|
-
cat<<OLDER_GKE
|
|
385
|
-
|
|
386
|
-
Deployment failed is the GKE version pre 1.21? Try rerunning with PRE_GKE_21 defined:
|
|
387
|
-
|
|
388
|
-
$ `color y "PRE_GKE_21=1 helmup zombie-killer"`
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
OLDER_GKE
|
|
392
|
-
exit 1
|
|
393
|
-
fi
|
|
394
376
|
}
|
|
395
377
|
|
|
396
378
|
function installCertManagerSecret() {
|