diff --git a/.github/workflows/test-kind.yaml b/.github/workflows/test-kind.yaml index 7e2353d02e..33f2b2c7b3 100644 --- a/.github/workflows/test-kind.yaml +++ b/.github/workflows/test-kind.yaml @@ -1,4 +1,4 @@ -name: presubmit +name: test-kind on: push: branches: [main] diff --git a/Makefile b/Makefile index f0b04b4263..66391133be 100644 --- a/Makefile +++ b/Makefile @@ -19,12 +19,26 @@ install-kwok: ## Install kwok provider uninstall-kwok: ## Uninstall kwok provider UNINSTALL_KWOK=true ./hack/install-kwok.sh +build-with-kind: + $(eval CONTROLLER_IMG=$(shell $(WITH_GOFLAGS) KO_DOCKER_REPO="$(KWOK_REPO)" ko build -B sigs.k8s.io/karpenter/kwok)) + $(eval IMG_REPOSITORY=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 1 | cut -d ":" -f 1)) + $(eval IMG_TAG=latest) + build: ## Build the Karpenter KWOK controller images using ko build $(eval CONTROLLER_IMG=$(shell $(WITH_GOFLAGS) KO_DOCKER_REPO="$(KWOK_REPO)" ko build -B sigs.k8s.io/karpenter/kwok)) $(eval IMG_REPOSITORY=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 1 | cut -d ":" -f 1)) $(eval IMG_TAG=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 1 | cut -d ":" -f 2 -s)) $(eval IMG_DIGEST=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 2)) +apply-with-kind: verify build-with-kind ## Deploy the kwok controller from the current state of your git repository into your ~/.kube/config cluster + hack/validation/kwok-requirements.sh + kubectl apply -f pkg/apis/crds + helm upgrade --install karpenter kwok/charts --namespace $(KARPENTER_NAMESPACE) --skip-crds \ + $(HELM_OPTS) \ + --set controller.image.repository=$(IMG_REPOSITORY) \ + --set controller.image.tag=$(IMG_TAG) \ + --set-string controller.env[0].name=ENABLE_PROFILING \ + --set-string controller.env[0].value=true # Run make install-kwok to install the kwok controller in your cluster first # Webhooks are currently not supported in the kwok provider. @@ -35,7 +49,6 @@ apply: verify build ## Deploy the kwok controller from the current state of your $(HELM_OPTS) \ --set controller.image.repository=$(IMG_REPOSITORY) \ --set controller.image.tag=$(IMG_TAG) \ - --set controller.image.digest=$(IMG_DIGEST) \ --set-string controller.env[0].name=ENABLE_PROFILING \ --set-string controller.env[0].value=true