Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
c-pius committed Jan 22, 2025
1 parent 075a967 commit 60d3254
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions docs/contributor/04-local-test-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ Follow the steps using scripts from the project root.

Create local test clusters for SKR and KCP.

```sh
```sh
K8S_VERSION=$(yq e '.k8s' ./versions.yaml)
CERT_MANAGER_VERSION=$(yq e '.certManager' ./versions.yaml)
./scripts/tests/create_test_clusters.sh --k8s-version $K8S_VERSION --cert-manager-version $CERT_MANAGER_VERSION
```
```

### 2. Install the Custom Resource Definitions

Install the [Lifecycle Manager CRDs](./resources/README.md) in the KCP cluster.

```sh
```sh
./scripts/tests/install_crds.sh
```
```

### 3. Deploy Lifecycle Manager

Expand All @@ -56,47 +56,47 @@ You can deploy Lifecycle Manager either from the registry or local sources. Choo
3.1 Deploy a built image from the registry, for example, the `latest` image from the `prod` registry.


```sh
```sh
REGISTRY=prod
TAG=latest
./scripts/tests/deploy_klm_from_registry.sh --image-registry $REGISTRY --image-tag $TAG
```
```

3.2 Build a new image from the local sources, push it to the local KCP registry, and deploy it.


```sh
```sh
./scripts/tests/deploy_klm_from_sources.sh
```
```

### 4. Deploy a Kyma CR

```sh
```sh
SKR_HOST=host.k3d.internal
./scripts/tests/deploy_kyma.sh $SKR_HOST
```
```

### 5. Verify If the Kyma CR Becomes Ready

5.1 Verify if the Kyma CR is in the `Ready` state in KCP. It takes roughly 1–2 minutes.

```sh
```sh
kubectl config use-context k3d-kcp
kubectl get kyma/kyma-sample -n kcp-system
```
```

5.1 Verify if the Kyma CR is in the `Ready` state in SKR. It takes roughly 1-2 minutes.

```sh
```sh
kubectl config use-context k3d-skr
kubectl get kyma/default -n kyma-system
```
```

### 6. [OPTIONAL] Deploy the template-operator Module

Build the template-operator module from the local sources, push it to the local KCP registry, and deploy it.

```sh
```sh
cd <template-operator-repository>

make build-manifests
Expand All @@ -109,30 +109,30 @@ Build the template-operator module from the local sources, push it to the local
MT_VERSION=$(yq e '.spec.version' ./template.yaml)
cd <lifecycle-manager-repository>
./scripts/tests/deploy_modulereleasemeta.sh template-operator regular:$MT_VERSION
```
```

### 7. [OPTIONAL] Add the template-operator Module to the Kyma CR and Verify If It Becomes Ready

7.1 Add the template-operator module to the Kyma CR spec.

```sh
```sh
kubectl config use-context k3d-skr
kubectl get kyma/default -n kyma-system -o yaml | yq e '.spec.modules[0]={"name": "template-operator"}' | kubectl apply -f -
```
```

7.2 Verify if the module becomes `Ready`. It takes roughly 1–2 minutes.

```sh
```sh
kubectl config use-context k3d-skr
kubectl get kyma/default -n kyma-system -o wide
```
```

7.3 Remove the module from the Kyma CR spec.

```sh
```sh
kubectl config use-context k3d-skr
kubectl get kyma/default -n kyma-system -o yaml | yq e 'del(.spec.modules[0])' | kubectl apply -f -
```
```

### 8. [OPTIONAL] Verify Conditions

Expand All @@ -142,32 +142,32 @@ Check the conditions of the Kyma CR in the KCP cluster.
- `ModuleCatalog` to determine if the ModuleTemplate CRs and ModuleReleaseMeta CRs haven been synced to the SKR cluster
- `Modules` to determine if the added modules are `Ready`

```sh
```sh
kubectl config use-context k3d-kcp
kubectl get kyma/kyma-sample -n kcp-system -o yaml | yq e '.status.conditions'
```
```

### 9. [OPTIONAL] Verify If Watcher Events Reach KCP

9.1 Flick the channel to trigger an event.

```sh
```sh
kubectl config use-context k3d-skr
kubectl get kyma/default -n kyma-system -o yaml | yq e '.spec.channel="regular"' | kubectl apply -f -
kubectl get kyma/default -n kyma-system -o yaml | yq e '.spec.channel="fast"' | kubectl apply -f -
```
```

9.2 Verify if Lifecycle Manger received the event in KCP.

```sh
```sh
kubectl config use-context k3d-kcp
kubectl logs deploy/klm-controller-manager -n kcp-system | grep "event received from SKR"
```
```

### 10. [OPTIONAL] Delete the Local Test Clusters

Remove the local SKR and KCP test clusters.

```shell
```shell
k3d cluster rm kcp skr
```
```

0 comments on commit 60d3254

Please sign in to comment.