From 7fa5916d2afb5507e38d35415731bb7ee4ff6a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Wed, 27 Sep 2023 12:11:30 +0200 Subject: [PATCH 1/4] adds target for convenient (re)building and (re)deployments --- Makefile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile b/Makefile index c53e5231..cbe64444 100644 --- a/Makefile +++ b/Makefile @@ -129,6 +129,19 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - +.PHONY: k3d-import-img +k3d-import-img: + k3d image import $(IMG) -c im + +.PHONY: apply-sample-cr +apply-sample-cr: + kubectl apply -f config/samples/infrastructuremanager_v1_gardenercluster.yaml + +.PHONE: local-build-and-deploy +local-build-and-deploy: docker-build k3d-import-img deploy gardener-secret-deploy apply-sample-cr + +.PHONY: local-rebuild-and-redeploy +local-rebuild-and-redeploy: undeploy local-build-and-deploy: ##@ Build Dependencies ## Location to install dependencies to From cec68253c62adcca57bd660c21baa442407774d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Wed, 27 Sep 2023 12:19:12 +0200 Subject: [PATCH 2/4] removes invalid colon --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cbe64444..227f9fce 100644 --- a/Makefile +++ b/Makefile @@ -141,7 +141,7 @@ apply-sample-cr: local-build-and-deploy: docker-build k3d-import-img deploy gardener-secret-deploy apply-sample-cr .PHONY: local-rebuild-and-redeploy -local-rebuild-and-redeploy: undeploy local-build-and-deploy: +local-rebuild-and-redeploy: undeploy local-build-and-deploy ##@ Build Dependencies ## Location to install dependencies to From d349dae81c0f193da372e6624a62350224cd49db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Tue, 24 Oct 2023 12:09:29 +0200 Subject: [PATCH 3/4] fixes Makefile so it will work on current main --- Makefile | 5 +++-- config/manager/kustomization.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 227f9fce..5bb4ebef 100644 --- a/Makefile +++ b/Makefile @@ -131,11 +131,12 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi .PHONY: k3d-import-img k3d-import-img: - k3d image import $(IMG) -c im + k3d cluster create $(K3D_CLUSTER_NAME) + k3d image import $(IMG) -c $(K3D_CLUSTER_NAME) .PHONY: apply-sample-cr apply-sample-cr: - kubectl apply -f config/samples/infrastructuremanager_v1_gardenercluster.yaml + kubectl apply -f config/samples/clusterinventory_v1_gardenercluster.yaml .PHONE: local-build-and-deploy local-build-and-deploy: docker-build k3d-import-img deploy gardener-secret-deploy apply-sample-cr diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 8af8ea33..4cde9b19 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: infrastructure-manager + newName: custom-infrastructure-manager newTag: 0.0.1 From 7af5cda8f7f27b9f9818547a4ec748b4bba4e8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Drzewiecki?= Date: Tue, 24 Oct 2023 15:21:21 +0200 Subject: [PATCH 4/4] updates readme regarding manual cluster creation on k3d --- Makefile | 1 - README.md | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5bb4ebef..2d609e98 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,6 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi .PHONY: k3d-import-img k3d-import-img: - k3d cluster create $(K3D_CLUSTER_NAME) k3d image import $(IMG) -c $(K3D_CLUSTER_NAME) .PHONY: apply-sample-cr diff --git a/README.md b/README.md index bd52147a..c7f5df69 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,9 @@ make docker-build k3d + ```bash + k3d cluster create $K3D_CLUSTER_NAME k3d image import $IMG -c $K3D_CLUSTER_NAME ```