From 21544f86cba00ea9f2d2fc6ce7079dacedcf11cf Mon Sep 17 00:00:00 2001 From: Ignas Baranauskas Date: Fri, 7 Jul 2023 09:08:21 +0100 Subject: [PATCH] Only local deployment needs and image --- Makefile | 2 +- config/local/kustomization.yaml | 12 +++++++++++- config/local/manager_config_patch.yaml | 11 +++++++++++ config/manager/kustomization.yaml | 4 ++-- 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 config/local/manager_config_patch.yaml diff --git a/Makefile b/Makefile index faf67f3..6d44459 100644 --- a/Makefile +++ b/Makefile @@ -121,7 +121,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi .PHONY: deploy-local deploy-local: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. - cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + cd config/local && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) --load-restrictor LoadRestrictionsNone build config/local | kubectl apply -f - .PHONY: undeploy-local diff --git a/config/local/kustomization.yaml b/config/local/kustomization.yaml index 43ef133..e46e2b8 100644 --- a/config/local/kustomization.yaml +++ b/config/local/kustomization.yaml @@ -1,7 +1,17 @@ resources: -- default +- ../default secretGenerator: - envs: - ../../aws-credentials.env name: aws-credentials + +patchesStrategicMerge: +- manager_config_patch.yaml + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: docker.io/library/kuadra + newTag: v1 diff --git a/config/local/manager_config_patch.yaml b/config/local/manager_config_patch.yaml new file mode 100644 index 0000000..ccb91b8 --- /dev/null +++ b/config/local/manager_config_patch.yaml @@ -0,0 +1,11 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: system +spec: + template: + spec: + containers: + - name: manager + imagePullPolicy: Never \ No newline at end of file diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 4aaae0c..ae6062d 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: docker.io/library/kuadra - newTag: v1 + newName: controller + newTag: latest \ No newline at end of file