Merge pull request #1065 from vmware-tanzu/kind-update

Use kubeadm.k8s.io/v1beta3 in addition to v1beta2 for kind config
This commit is contained in:
Ryan Richard 2022-03-16 09:18:40 -07:00 committed by GitHub
commit 8b80a01d0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Copyright 2020 the Pinniped contributors. All Rights Reserved. # Copyright 2020-2022 the Pinniped contributors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
set -euo pipefail set -euo pipefail
@ -9,4 +9,5 @@ ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
cd "${ROOT}" cd "${ROOT}"
# To choose a specific version of kube, add this option to the command below: `--image kindest/node:v1.18.8`. # To choose a specific version of kube, add this option to the command below: `--image kindest/node:v1.18.8`.
# To debug the kind config, add this option to the command below: `-v 10`
kind create cluster --config "hack/lib/kind-config/single-node.yaml" --name pinniped kind create cluster --config "hack/lib/kind-config/single-node.yaml" --name pinniped

View File

@ -24,6 +24,11 @@ nodes:
containerPort: 31235 containerPort: 31235
hostPort: 12346 hostPort: 12346
listenAddress: 127.0.0.1 listenAddress: 127.0.0.1
# Kind v0.12.0 ignores kubeadm.k8s.io/v1beta2 for Kube v1.23+ but uses it for older versions of Kube.
# Previous versions of Kind would use kubeadm.k8s.io/v1beta2 for all versions of Kube including 1.23.
# To try to maximize compatibility with various versions of Kind and Kube, define this
# ClusterConfiguration twice and hope that Kind will use the one that it likes for the given version
# of Kube, and ignore the one that it doesn't like. This seems to work, at least for Kind v0.12.0.
kubeadmConfigPatches: kubeadmConfigPatches:
- | - |
apiVersion: kubeadm.k8s.io/v1beta2 apiVersion: kubeadm.k8s.io/v1beta2
@ -39,3 +44,10 @@ kubeadmConfigPatches:
# are exercised. For whatever reason, leaving this as false (i.e. use kube-proxy) appears to # are exercised. For whatever reason, leaving this as false (i.e. use kube-proxy) appears to
# hide some network misconfigurations when used internally by the API server aggregation layer. # hide some network misconfigurations when used internally by the API server aggregation layer.
enable-aggregator-routing: "true" enable-aggregator-routing: "true"
- |
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
apiServer:
extraArgs:
# See comment above.
enable-aggregator-routing: "true"