make/cluster.sh: remove the fixed clusterIP CIDR 10.0.0.0
The fixed CIDR isn't necessary anymore since the makefile figures the ClusterIP dynamically. This change also enables you to run make/cluster.sh with an existing kind cluster. Signed-off-by: Maël Valais <mael@vls.dev>
This commit is contained in:
parent
6c57633884
commit
c4e6ebd1a8
@ -176,9 +176,11 @@ setup_kind() {
|
||||
printf "and then retry.\n" >&2
|
||||
fi
|
||||
|
||||
service_ip_prefix=$(set +o pipefail && kubectl cluster-info dump | grep -m1 ip-range | cut -d= -f2 | cut -d. -f1,2,3)
|
||||
|
||||
# (6) Has the Corefile been patched?
|
||||
corefile=$(kubectl get -ogo-template='{{.data.Corefile}}' -n=kube-system configmap/coredns)
|
||||
to_be_appended=$'example.com:53 {\n forward . 10.0.0.16\n}\n'
|
||||
to_be_appended=$'example.com:53 {\n forward . '$service_ip_prefix$'.16\n}\n'
|
||||
if ! grep -q --null-data -F "$(tr -d $'\n' <<<"$to_be_appended")" <(tr -d $'\n' <<<"$corefile"); then
|
||||
kubectl create configmap -oyaml coredns --dry-run=client --from-literal=Corefile="$(printf '%s\n%s' "$corefile" "$to_be_appended")" \
|
||||
| kubectl apply -n kube-system -f - >/dev/null
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
# this config file is similar to the default, except we set the cluster's
|
||||
# service cidr range to be 10.0.0.0/16.
|
||||
# we do this because we need a fixed/predictable clusterIP of 10.0.0.15 for the
|
||||
# nginx-ingress service, in order to perform HTTP01 validations during tests.
|
||||
#
|
||||
# The --unsafe-no-fsync decreases the load on the pod's filesystem [1],
|
||||
# which in turn decreases the end-to-end tests duration. It is OK for us to
|
||||
# use this flag because we are using a one-node etcd cluster. The fsync
|
||||
@ -20,8 +15,6 @@ kubeadmConfigPatches:
|
||||
kind: ClusterConfiguration
|
||||
metadata:
|
||||
name: config
|
||||
networking:
|
||||
serviceSubnet: 10.0.0.0/16
|
||||
etcd:
|
||||
local:
|
||||
extraArgs:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user