File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -965,10 +965,9 @@ tasks:
965965 - func : " run oidc k8s local test"
966966 vars :
967967 VARIANT : gke
968- # TODO: This still has to be implemented.
969- # - func: "run oidc k8s local test"
970- # vars:
971- # VARIANT: aks
968+ - func : " run oidc k8s local test"
969+ vars :
970+ VARIANT : aks
972971
973972 - name : " test-install-binaries"
974973 tags : ["pr"]
Original file line number Diff line number Diff line change 1515# Delete pods over one hour old in case they were not torn down.
1616echo " Deleting old pods..."
1717# Delete successful pods more than an hour old.
18+ if [ " $( uname -s) " = " Darwin" ]; then
19+ DATE=" gdate"
20+ else
21+ DATE=" date"
22+ fi
1823# shellcheck disable=SC2046
19- kubectl get pods -l app=test-pod -o go-template --template ' {{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{"\n"}}{{end}}' | awk ' $2 <= "' $( date -d' now-1 hours' -Ins --utc | sed ' s/+0000/Z/' ) ' " { print $1 }' | xargs --no-run-if-empty kubectl delete pod
24+ kubectl get pods -l app=test-pod -o go-template --template ' {{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{"\n"}}{{end}}' | awk ' $2 <= "' $( $DATE -d' now-1 hours' -Ins --utc | sed ' s/+0000/Z/' ) ' " { print $1 }' | xargs --no-run-if-empty kubectl delete pod
2025# Delete pending (stuck) pods more than 5 minutes old.
2126kubectl get pods --all-namespaces -l app=test-pod --field-selector=status.phase=Pending -o json | jq ' .items[] | select((now - (.metadata.creationTimestamp | fromdateiso8601)) > 600) | .metadata.name' | xargs -I{} kubectl delete pod {} --force --grace-period=0
2227echo " Deleting old pods... done."
You can’t perform that action at this time.
0 commit comments