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

makefile #2

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-kind.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: presubmit
name: test-kind
on:
push:
branches: [main]
Expand Down Expand Up @@ -38,7 +38,7 @@
chmod +x profilecli
sudo mv profilecli /usr/local/bin
- name: test
run: |

Check failure on line 41 in .github/workflows/test-kind.yaml

View workflow job for this annotation

GitHub Actions / presubmit (1.29.x)

shellcheck reported issue in this script: SC2086:info:4:6: Double quote to prevent globbing and word splitting

Check failure on line 41 in .github/workflows/test-kind.yaml

View workflow job for this annotation

GitHub Actions / presubmit (1.23.x)

shellcheck reported issue in this script: SC2086:info:4:6: Double quote to prevent globbing and word splitting

Check failure on line 41 in .github/workflows/test-kind.yaml

View workflow job for this annotation

GitHub Actions / presubmit (1.24.x)

shellcheck reported issue in this script: SC2086:info:4:6: Double quote to prevent globbing and word splitting

Check failure on line 41 in .github/workflows/test-kind.yaml

View workflow job for this annotation

GitHub Actions / presubmit (1.25.x)

shellcheck reported issue in this script: SC2086:info:4:6: Double quote to prevent globbing and word splitting

Check failure on line 41 in .github/workflows/test-kind.yaml

View workflow job for this annotation

GitHub Actions / presubmit (1.26.x)

shellcheck reported issue in this script: SC2086:info:4:6: Double quote to prevent globbing and word splitting

Check failure on line 41 in .github/workflows/test-kind.yaml

View workflow job for this annotation

GitHub Actions / presubmit (1.27.x)

shellcheck reported issue in this script: SC2086:info:4:6: Double quote to prevent globbing and word splitting

Check failure on line 41 in .github/workflows/test-kind.yaml

View workflow job for this annotation

GitHub Actions / presubmit (1.28.x)

shellcheck reported issue in this script: SC2086:info:4:6: Double quote to prevent globbing and word splitting
kubectl cluster-info
kubectl get storageclass standard
ls
Expand Down
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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

Expand Down
Loading