File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ apiVersion: v2
2
2
name : csdp-installer
3
3
description : A Helm chart used for installing a CSDP runtime
4
4
type : application
5
- version : 0.1.12
5
+ version : 0.1.13
6
6
appVersion : v0.0.6
Original file line number Diff line number Diff line change 11
11
template :
12
12
metadata :
13
13
labels :
14
+ app : {{ .Chart.Name }}
14
15
{{- include "csdp-installer.selectorLabels" . | nindent 8 }}
15
16
spec :
16
17
serviceAccount : {{ .Values.csdpInstaller.installer.serviceAccount }}
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ check_required_param() {
12
12
fi
13
13
}
14
14
15
+ # Clean leftover pods from the csdp-installer job
16
+ clean_failed_pods () {
17
+ res=$( kubectl get pods -A --sort-by=.status.startTime --label-selector=app==csdp-installer | grep Failed | awk ' {print $1}' | tail -n +2 | xargs kubectl delete pods)
18
+ echo res
19
+ }
20
+
15
21
# Constants:
16
22
CODEFRESH_SECRET_NAME=" codefresh-token"
17
23
CODEFRESH_CM_NAME=" codefresh-cm"
@@ -304,6 +310,9 @@ echo " ingress controller: ${CSDP_INGRESS_CONTROLLER}"
304
310
echo " #######################################"
305
311
echo " "
306
312
313
+ echo " Cleaning previous job pods"
314
+ clean_failed_pods ()
315
+
307
316
# 1. Check codefresh secret
308
317
echo " Checking secret $CODEFRESH_SECRET_NAME ..."
309
318
if kubectl -n " $NAMESPACE " get secret " $CODEFRESH_SECRET_NAME " ; then
Original file line number Diff line number Diff line change 7
7
backoffLimit : 20
8
8
template :
9
9
metadata :
10
+ labels :
11
+ app : csdp-installer
10
12
name : csdp-installation-job
11
13
spec :
12
14
serviceAccount : argocd-server
You can’t perform that action at this time.
0 commit comments