diff --git a/capz/run-capz-e2e.sh b/capz/run-capz-e2e.sh index 5e881719..fc23c357 100755 --- a/capz/run-capz-e2e.sh +++ b/capz/run-capz-e2e.sh @@ -290,16 +290,26 @@ apply_workload_configuraiton(){ if [[ "${IS_PRESUBMIT}" == "true" ]]; then sleep 30s fi + "$TOOLS_BIN_DIR"/helm upgrade calico projectcalico/tigera-operator --version "$CALICO_VERSION" --namespace tigera-operator -f "$SCRIPT_ROOT"/templates/calico/values.yaml --create-namespace --install --debug + timeout --foreground 300 bash -c "until kubectl get ipamconfigs default -n default > /dev/null 2>&1; do sleep 3; done" + + #required for windows no way to do it via operator https://github.com/tigera/operator/issues/3113 + kubectl patch ipamconfigs default --type merge --patch='{"spec": {"strictAffinity": true}}' # get the info for the API server servername=$(kubectl config view -o json | jq -r '.clusters[0].cluster.server | sub("https://"; "") | split(":") | .[0]') port=$(kubectl config view -o json | jq -r '.clusters[0].cluster.server | sub("https://"; "") | split(":") | .[1]') - "$TOOLS_BIN_DIR"/helm upgrade calico projectcalico/tigera-operator --version "$CALICO_VERSION" --namespace tigera-operator -f "$SCRIPT_ROOT"/templates/calico/values.yaml --create-namespace --install --debug --set kubernetesServiceEndpoint.host="${servername}" --set kubernetesServiceEndpoint.port="${port}" - timeout --foreground 300 bash -c "until kubectl get ipamconfigs default -n default > /dev/null 2>&1; do sleep 3; done" - - #required for windows no way to do it via operator https://github.com/tigera/operator/issues/3113 - kubectl patch ipamconfigs default --type merge --patch='{"spec": {"strictAffinity": true}}' + kubectl apply -f - << EOF +kind: ConfigMap +apiVersion: v1 +metadata: + name: kubernetes-services-endpoint + namespace: tigera-operator +data: + KUBERNETES_SERVICE_HOST: "${servername}" + KUBERNETES_SERVICE_PORT: "${port}" +EOF # Only patch up kube-proxy if $WINDOWS_KPNG is unset if [[ -z "$KPNG" ]]; then