Skip to content

Commit bde0dcb

Browse files
authored
DRIVERS-2882 Enable AKS local test (#532)
1 parent c5418bb commit bde0dcb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.evergreen/config.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff 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"]

.evergreen/k8s/configure-pod.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ fi
1515
# Delete pods over one hour old in case they were not torn down.
1616
echo "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.
2126
kubectl 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
2227
echo "Deleting old pods... done."

0 commit comments

Comments
 (0)