Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): validate that pulling from an acr registry attached to aks via --attach-acr with karpenter nodes works #457

Merged
merged 8 commits into from
Aug 22, 2024
2 changes: 1 addition & 1 deletion .github/workflows/e2e-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
fail-fast: false
matrix:
suite: [Nonbehavioral, Utilization, GPU, Drift, Integration, NodeClaim, Chaos, Acr]
suite: [Nonbehavioral, Utilization, GPU, Drift, Integration, NodeClaim, Chaos, ACR]
permissions:
contents: read
id-token: write
Expand Down
9 changes: 3 additions & 6 deletions Makefile-az.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ az-mkacr: az-mkrg ## Create test ACR
az-acrimport: ## Imports an image to an acr registry
Bryce-Soghigian marked this conversation as resolved.
Show resolved Hide resolved
az acr import --name $(AZURE_ACR_NAME) --source "mcr.microsoft.com/oss/kubernetes/pause:3.6" --image "pause:3.6"

az-cleanenv:
az-cleanenv: az-rmnodeclaims-fin ## Deletes a few common karpenter testing resources(pods, nodepools, nodeclaims, aksnodeclasses)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To enforce the order that Charlie was suggesting, one can call make target explicitly in the right place, rather than making it a dependency

kubectl delete pods -n default --all
kubectl delete nodeclaims --all
kubectl delete nodepools --all
Bryce-Soghigian marked this conversation as resolved.
Show resolved Hide resolved
for nodeclaim in $$(kubectl get nodeclaims --output=jsonpath={.items..metadata.name}); do \
kubectl patch nodeclaim $$nodeclaim --type=json -p '[{"op": "remove", "path": "/metadata/finalizers"}]'; \
done
kubectl delete nodeclaims --all
kubectl delete aksnodeclasses --all
kubectl delete pods -n default --all

az-mkaks: az-mkacr ## Create test AKS cluster (with --vm-set-type AvailabilitySet for compatibility with standalone VMs)
az aks create --name $(AZURE_CLUSTER_NAME) --resource-group $(AZURE_RESOURCE_GROUP) --attach-acr $(AZURE_ACR_NAME) --location $(AZURE_LOCATION) \
Expand Down
2 changes: 1 addition & 1 deletion test/suites/acr/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var _ = Describe("Acr", func() {
Describe("Image Pull", func() {
It("should allow karpenter user pool nodes to pull images from the clusters attached acr", func() {
deployment := test.Deployment(test.DeploymentOptions{
Replicas: 10,
Replicas: 1,
PodOptions: test.PodOptions{
ResourceRequirements: v1.ResourceRequirements{
Requests: v1.ResourceList{
Expand Down
Loading