From 01e1a716b60070bf8fea1520c2194e3918eb6717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ko=C5=82odziejczak?= <69915024+kolodziejczak@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:07:31 +0200 Subject: [PATCH] Istio module manifests should not deploy kyma-system (#438) * Remove kyma-system deploy from config Add create kyma-system ns in make target * Update README.md Co-authored-by: Natalia Sitko <80401180+nataliasitko@users.noreply.github.com> --------- Co-authored-by: Natalia Sitko <80401180+nataliasitko@users.noreply.github.com> --- Makefile | 10 +++++++--- README.md | 14 ++++++++++---- config/manager/manager.yaml | 13 ------------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 55df33ffa1..9d2484de91 100644 --- a/Makefile +++ b/Makefile @@ -111,7 +111,7 @@ build: generate fmt vet ## Build manager binary. go build -o bin/manager main.go .PHONY: run -run: manifests build ## Run a controller from your host. +run: manifests install create-kyma-system-ns build ## Run a controller from your host. ISTIO_INSTALL_BIN_PATH=$(ISTIO_INSTALL_BIN_PATH) go run ./main.go .PHONY: docker-build @@ -138,6 +138,10 @@ ifndef ignore-not-found ignore-not-found = false endif +.PHONY: create-kyma-system-ns +create-kyma-system-ns: + kubectl create namespace kyma-system --dry-run=client -o yaml | kubectl apply -f - + .PHONY: install install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | kubectl apply -f - @@ -147,7 +151,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified $(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f - .PHONY: deploy -deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. +deploy: create-kyma-system-ns manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config. cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default | kubectl apply -f - @@ -255,7 +259,7 @@ istio-integration-test: install deploy cd tests/integration && TEST_REQUEST_TIMEOUT=300s && EXPORT_RESULT=true go test -v -timeout 35m -run TestIstioMain .PHONY: deploy-latest-release -deploy-latest-release: +deploy-latest-release: create-kyma-system-ns cd tests/integration && ./scripts/deploy-latest-release-to-cluster.sh $(TARGET_BRANCH) # Latest release deployed on cluster is a prerequisite, it is handled by deploy-latest-release target diff --git a/README.md b/README.md index 1215e0c365..904854c159 100644 --- a/README.md +++ b/README.md @@ -20,13 +20,19 @@ Kyma Istio Operator is a component of the Kyma runtime that handles the manageme ### Procedure -1. To install Istio, you must install the latest version of Kyma Istio Operator and Istio CRD first. Run: +1. Create the `kyma-system` namespace: + + ```bash + kubectl create namespace kyma-system + ``` + +2. To install Istio, you must install the latest version of Kyma Istio Operator and Istio CRD first. Run: ```bash kubectl apply -f https://github.com/kyma-project/istio/releases/latest/download/istio-manager.yaml ``` -2. To get Istio installed, apply the default Istio CR: +3. To get Istio installed, apply the default Istio CR: ```bash kubectl apply -f https://github.com/kyma-project/istio/releases/latest/download/istio-default-cr.yaml @@ -38,7 +44,7 @@ Kyma Istio Operator is a component of the Kyma runtime that handles the manageme istio.operator.kyma-project.io/default created ``` -3. Check the state of Istio CR to verify if Istio was installed successfully: +4. Check the state of Istio CR to verify if Istio was installed successfully: ```bash kubectl get -n kyma-system istios/default @@ -57,7 +63,7 @@ For more installation options, visit [the installation guide](/docs/contributor/ To learn how to use Kyma Istio Operator, read the documentation in the [`user`](/docs/user) directory. -If you are interested in the detailed documentation of the Kyma Istio Operator's design and technical aspects, check the [`contributor`](/docs/contributor/) directory. +If you are interested in the detailed documentation of the Kyma Istio Operator's design and technical aspects, check the [`contributor`](/docs/contributor) directory. ## Contributing diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 9c4ed899cf..e0305122fd 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -1,16 +1,3 @@ -apiVersion: v1 -kind: Namespace -metadata: - labels: - control-plane: controller-manager - app.kubernetes.io/name: namespace - app.kubernetes.io/instance: system - app.kubernetes.io/component: manager - app.kubernetes.io/created-by: istio - app.kubernetes.io/part-of: istio - app.kubernetes.io/managed-by: kustomize - name: system ---- apiVersion: apps/v1 kind: Deployment metadata: