Skip to content

Commit

Permalink
Istio module manifests should not deploy kyma-system (#438)
Browse files Browse the repository at this point in the history
* Remove kyma-system deploy from config
Add create kyma-system ns in make target

* Update README.md

Co-authored-by: Natalia Sitko <[email protected]>

---------

Co-authored-by: Natalia Sitko <[email protected]>
  • Loading branch information
kolodziejczak and nataliasitko authored Oct 25, 2023
1 parent c6a2c14 commit 01e1a71
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -
Expand All @@ -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 -

Expand Down Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
13 changes: 0 additions & 13 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 01e1a71

Please sign in to comment.