diff --git a/.github/workflows/operator-ci.yaml b/.github/workflows/operator-ci.yaml index d776bea7..f3a8147b 100644 --- a/.github/workflows/operator-ci.yaml +++ b/.github/workflows/operator-ci.yaml @@ -79,9 +79,10 @@ jobs: id: kind uses: helm/kind-action@v1 with: - version: v0.26.0 - kubernetes_version: v${{ matrix.k8s-version }} - install_only: true + version: v0.29.0 + node_image: kindest/node:v${{ matrix.k8s-version }} + config: operator/config/local-dev/kind-config.yaml + cluster_name: kind # Cache build tools and dependencies for faster builds - name: Restore cached Binaries id: cached-binaries @@ -110,7 +111,7 @@ jobs: - name: end-to-end-tests run: | cd operator - GITHUB_TOKEN=${{ secrets.github_token }} make create-kind-cluster + make setup-kind-cluster make test # Build multi-platform container image and push to registry diff --git a/operator/Makefile b/operator/Makefile index 184906c2..d2a48056 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -192,18 +192,17 @@ else DOCKER_AUTH_FILE=${HOME}/.config/containers/auth.json endif -create-kind-cluster: ## deletes and creates a new kind cluster. versions is set via KIND_VERSION -ifdef CI - @echo $(GITHUB_TOKEN) | docker login ghcr.io -u $(GITHUB_ACTOR) --password-stdin -endif - kind delete cluster && kind create cluster --image=kindest/node:v$(KIND_VERSION) --config config/local-dev/kind-config.yaml - $(KUBECTL) label node/kind-worker skyhook.nvidia.com/test-node=skyhooke2e - +setup-kind-cluster: ## setup kind cluster with local docker creds and skyhook namespace ## sets you local $(DOCKER_CMD) creds into a secret in kind in the skyhook namespace + $(KUBECTL) label node/kind-worker skyhook.nvidia.com/test-node=skyhooke2e $(KUBECTL) create namespace $(SKYHOOK_NAMESPACE) --dry-run=client -o yaml | kubectl apply -f - $(KUBECTL) create secret generic node-init-secret --type=kubernetes.io/dockerconfigjson -n $(SKYHOOK_NAMESPACE) \ --from-file=.dockerconfigjson=$(DOCKER_AUTH_FILE) +create-kind-cluster: ## deletes and creates a new kind cluster. versions is set via KIND_VERSION + kind delete cluster && kind create cluster --image=kindest/node:v$(KIND_VERSION) --config config/local-dev/kind-config.yaml + $(MAKE) setup-kind-cluster + podman-create-machine: ## creates a podman machine podman machine stop podman-machine-default || true podman machine rm -f podman-machine-default || true