From a89de8de8dabc8a28757c0313aee882c7de415f9 Mon Sep 17 00:00:00 2001 From: Ismail Alidzhikov Date: Tue, 13 Jun 2023 10:36:39 +0300 Subject: [PATCH] Unify the registry hostname configured in containerd for the kind cluster (#8063) * Unify the registry hostname configured in containerd for the kind cluster * Enhance the export KUBECONFIG docs --- docs/concepts/operator.md | 2 +- docs/deployment/getting_started_locally.md | 4 ++-- docs/development/getting_started_locally.md | 2 +- .../cluster/templates/_containerd_config_patches.tpl | 12 ++++++------ example/gardener-local/kind/cluster/values.yaml | 1 - example/gardener-local/kind/extensions/values.yaml | 3 --- .../gardener-local/kind/ha-single-zone2/values.yaml | 1 - example/gardener-local/kind/operator/values.yaml | 3 --- 8 files changed, 10 insertions(+), 18 deletions(-) diff --git a/docs/concepts/operator.md b/docs/concepts/operator.md index be92597f120..5335040dad3 100644 --- a/docs/concepts/operator.md +++ b/docs/concepts/operator.md @@ -100,7 +100,7 @@ make kind-operator-up This command sets up a new KinD cluster named `gardener-local` and stores the kubeconfig in the `./example/gardener-local/kind/operator/kubeconfig` file. > It might be helpful to copy this file to `$HOME/.kube/config`, since you will need to target this KinD cluster multiple times. -Alternatively, make sure to set your `KUBECONFIG` environment variable to `./example/gardener-local/kind/operator/kubeconfig` for all future steps via `export KUBECONFIG=example/gardener-local/kind/operator/kubeconfig`. +Alternatively, make sure to set your `KUBECONFIG` environment variable to `./example/gardener-local/kind/operator/kubeconfig` for all future steps via `export KUBECONFIG=$PWD/example/gardener-local/kind/operator/kubeconfig`. All the following steps assume that you are using this kubeconfig. diff --git a/docs/deployment/getting_started_locally.md b/docs/deployment/getting_started_locally.md index c73a265a43f..58578643077 100644 --- a/docs/deployment/getting_started_locally.md +++ b/docs/deployment/getting_started_locally.md @@ -44,7 +44,7 @@ make kind-up This command sets up a new KinD cluster named `gardener-local` and stores the kubeconfig in the `./example/gardener-local/kind/local/kubeconfig` file. > It might be helpful to copy this file to `$HOME/.kube/config`, since you will need to target this KinD cluster multiple times. -Alternatively, make sure to set your `KUBECONFIG` environment variable to `./example/gardener-local/kind/local/kubeconfig` for all future steps via `export KUBECONFIG=example/gardener-local/kind/local/kubeconfig`. +Alternatively, make sure to set your `KUBECONFIG` environment variable to `./example/gardener-local/kind/local/kubeconfig` for all future steps via `export KUBECONFIG=$PWD/example/gardener-local/kind/local/kubeconfig`. All of the following steps assume that you are using this kubeconfig. @@ -267,7 +267,7 @@ In order to deploy required resources in the KinD cluster that you just created, make gardenlet-kind2-up ``` -The following steps assume that you are using the kubeconfig that points to the `gardener-local` cluster (first KinD cluster): `export KUBECONFIG=example/gardener-local/kind/local/kubeconfig`. +The following steps assume that you are using the kubeconfig that points to the `gardener-local` cluster (first KinD cluster): `export KUBECONFIG=$PWD/example/gardener-local/kind/local/kubeconfig`. You can wait for the `local2` `Seed` to be ready by running: diff --git a/docs/development/getting_started_locally.md b/docs/development/getting_started_locally.md index 924164167e9..bb161db94e3 100644 --- a/docs/development/getting_started_locally.md +++ b/docs/development/getting_started_locally.md @@ -53,7 +53,7 @@ make kind-up KIND_ENV=local This command sets up a new KinD cluster named `gardener-local` and stores the kubeconfig in the `./example/gardener-local/kind/local/kubeconfig` file. > It might be helpful to copy this file to `$HOME/.kube/config` since you will need to target this KinD cluster multiple times. -Alternatively, make sure to set your `KUBECONFIG` environment variable to `./example/gardener-local/kind/local/kubeconfig` for all future steps via `export KUBECONFIG=example/gardener-local/kind/local/kubeconfig`. +Alternatively, make sure to set your `KUBECONFIG` environment variable to `./example/gardener-local/kind/local/kubeconfig` for all future steps via `export KUBECONFIG=$PWD/example/gardener-local/kind/local/kubeconfig`. All following steps assume that you are using this kubeconfig. diff --git a/example/gardener-local/kind/cluster/templates/_containerd_config_patches.tpl b/example/gardener-local/kind/cluster/templates/_containerd_config_patches.tpl index 21f65cf05d9..20067e44099 100644 --- a/example/gardener-local/kind/cluster/templates/_containerd_config_patches.tpl +++ b/example/gardener-local/kind/cluster/templates/_containerd_config_patches.tpl @@ -2,16 +2,16 @@ - |- {{- if eq .Values.environment "skaffold" }} [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5001"] - endpoint = ["http://{{ .Values.registry.hostname }}:5001"] + endpoint = ["http://garden.local.gardener.cloud:5001"] {{- end }} [plugins."io.containerd.grpc.v1.cri".registry.mirrors."gcr.io"] - endpoint = ["http://{{ .Values.registry.hostname }}:5003"] + endpoint = ["http://garden.local.gardener.cloud:5003"] [plugins."io.containerd.grpc.v1.cri".registry.mirrors."eu.gcr.io"] - endpoint = ["http://{{ .Values.registry.hostname }}:5004"] + endpoint = ["http://garden.local.gardener.cloud:5004"] [plugins."io.containerd.grpc.v1.cri".registry.mirrors."ghcr.io"] - endpoint = ["http://{{ .Values.registry.hostname }}:5005"] + endpoint = ["http://garden.local.gardener.cloud:5005"] [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.k8s.io"] - endpoint = ["http://{{ .Values.registry.hostname }}:5006"] + endpoint = ["http://garden.local.gardener.cloud:5006"] [plugins."io.containerd.grpc.v1.cri".registry.mirrors."quay.io"] - endpoint = ["http://{{ .Values.registry.hostname }}:5007"] + endpoint = ["http://garden.local.gardener.cloud:5007"] {{- end -}} diff --git a/example/gardener-local/kind/cluster/values.yaml b/example/gardener-local/kind/cluster/values.yaml index bea38c92ce0..6bc60531b38 100644 --- a/example/gardener-local/kind/cluster/values.yaml +++ b/example/gardener-local/kind/cluster/values.yaml @@ -20,7 +20,6 @@ backupBucket: registry: deployed: true - hostname: garden.local.gardener.cloud networking: ipFamily: ipv4 diff --git a/example/gardener-local/kind/extensions/values.yaml b/example/gardener-local/kind/extensions/values.yaml index f64d5ac68f2..12b51af7e1b 100644 --- a/example/gardener-local/kind/extensions/values.yaml +++ b/example/gardener-local/kind/extensions/values.yaml @@ -1,6 +1,3 @@ -registry: - hostname: gardener-extensions-control-plane - gardener: apiserverRelay: deployed: true diff --git a/example/gardener-local/kind/ha-single-zone2/values.yaml b/example/gardener-local/kind/ha-single-zone2/values.yaml index 424d34423cc..e03b3384778 100644 --- a/example/gardener-local/kind/ha-single-zone2/values.yaml +++ b/example/gardener-local/kind/ha-single-zone2/values.yaml @@ -8,7 +8,6 @@ gardener: registry: deployed: false - hostname: gardener-local-ha-single-zone-control-plane workers: - zone: "0" diff --git a/example/gardener-local/kind/operator/values.yaml b/example/gardener-local/kind/operator/values.yaml index 4ff3eea872d..c02ed39cb07 100644 --- a/example/gardener-local/kind/operator/values.yaml +++ b/example/gardener-local/kind/operator/values.yaml @@ -6,9 +6,6 @@ gardener: garden: deployed: true -registry: - hostname: gardener-operator-local-control-plane - workers: - zone: "1" - zone: "2"