From af97ea5d0a842084c6a2ebf430fd4253228e3e28 Mon Sep 17 00:00:00 2001 From: John Howard Date: Wed, 24 Mar 2021 16:29:55 -0700 Subject: [PATCH] Bump to latest istio (#9356) * Bump to latest istio * fix snip * change templates * fix sed magic * fix bug * add back vwh configmap --- .../external-controlplane/index.md | 36 ++++++++++++++++--- .../external-controlplane/snips.sh | 36 ++++++++++++++++--- .../external-controlplane/test.sh | 8 +++-- 3 files changed, 67 insertions(+), 13 deletions(-) diff --git a/content/en/docs/setup/additional-setup/external-controlplane/index.md b/content/en/docs/setup/additional-setup/external-controlplane/index.md index 579e0592d0..1df950fb05 100644 --- a/content/en/docs/setup/additional-setup/external-controlplane/index.md +++ b/content/en/docs/setup/additional-setup/external-controlplane/index.md @@ -182,6 +182,36 @@ and installing needed webhooks, configmaps, and secrets on the remote cluster so components: base: enabled: false + pilot: + enabled: true + k8s: + overlays: + - kind: Deployment + name: istiod + patches: + - path: spec.template.spec.volumes[100] + value: |- + name: config-volume + configMap: + name: istio + - path: spec.template.spec.volumes[100] + value: |- + name: inject-volume + configMap: + name: istio-sidecar-injector + - path: spec.template.spec.containers[0].volumeMounts[100] + value: |- + name: config-volume + mountPath: /etc/istio/config + - path: spec.template.spec.containers[0].volumeMounts[100] + value: |- + name: inject-volume + mountPath: /var/lib/istio/inject + env: + - name: INJECTION_WEBHOOK_CONFIG_NAME + value: "" + - name: VALIDATION_WEBHOOK_CONFIG_NAME + value: "" ingressGateways: - name: istio-ingressgateway enabled: false @@ -193,10 +223,6 @@ and installing needed webhooks, configmaps, and secrets on the remote cluster so meshID: mesh1 multiCluster: clusterName: $REMOTE_CLUSTER_NAME - pilot: - env: - INJECTION_WEBHOOK_CONFIG_NAME: "" - VALIDATION_WEBHOOK_CONFIG_NAME: "" EOF {{< /text >}} @@ -372,7 +398,7 @@ and installing needed webhooks, configmaps, and secrets on the remote cluster so istio-leader 0 2m9s istio-namespace-controller-election 0 2m11s istio-sidecar-injector 2 2m1s - istio-validation-controller-election 0 2m9s + istio-validation-controller-election 0 2m6s {{< /text >}} {{< text bash >}} diff --git a/content/en/docs/setup/additional-setup/external-controlplane/snips.sh b/content/en/docs/setup/additional-setup/external-controlplane/snips.sh index 2f8dc2eada..b97ebbb610 100644 --- a/content/en/docs/setup/additional-setup/external-controlplane/snips.sh +++ b/content/en/docs/setup/additional-setup/external-controlplane/snips.sh @@ -90,6 +90,36 @@ spec: components: base: enabled: false + pilot: + enabled: true + k8s: + overlays: + - kind: Deployment + name: istiod + patches: + - path: spec.template.spec.volumes[100] + value: |- + name: config-volume + configMap: + name: istio + - path: spec.template.spec.volumes[100] + value: |- + name: inject-volume + configMap: + name: istio-sidecar-injector + - path: spec.template.spec.containers[0].volumeMounts[100] + value: |- + name: config-volume + mountPath: /etc/istio/config + - path: spec.template.spec.containers[0].volumeMounts[100] + value: |- + name: inject-volume + mountPath: /var/lib/istio/inject + env: + - name: INJECTION_WEBHOOK_CONFIG_NAME + value: "" + - name: VALIDATION_WEBHOOK_CONFIG_NAME + value: "" ingressGateways: - name: istio-ingressgateway enabled: false @@ -101,10 +131,6 @@ spec: meshID: mesh1 multiCluster: clusterName: $REMOTE_CLUSTER_NAME - pilot: - env: - INJECTION_WEBHOOK_CONFIG_NAME: "" - VALIDATION_WEBHOOK_CONFIG_NAME: "" EOF } @@ -274,7 +300,7 @@ istio-ca-root-cert 1 2m9s istio-leader 0 2m9s istio-namespace-controller-election 0 2m11s istio-sidecar-injector 2 2m1s -istio-validation-controller-election 0 2m9s +istio-validation-controller-election 0 2m6s ENDSNIP snip_set_up_the_remote_cluster_6() { diff --git a/content/en/docs/setup/additional-setup/external-controlplane/test.sh b/content/en/docs/setup/additional-setup/external-controlplane/test.sh index ec0cd897c5..9af41b9a29 100644 --- a/content/en/docs/setup/additional-setup/external-controlplane/test.sh +++ b/content/en/docs/setup/additional-setup/external-controlplane/test.sh @@ -27,10 +27,12 @@ snip_get_external_istiod_iop_modified() { snip_get_external_istiod_iop # Update config file: delete CA certificates and meshID, and update pilot vars + # TODO(https://github.com/istio/istio/issues/31690) remove 'env' replace sed -i \ -e '/proxyMetadata:/,+2d' \ - -e '/INJECTION_WEBHOOK_CONFIG_NAME: ""/d' \ - -e "s/VALIDATION_WEBHOOK_CONFIG_NAME: \"\"/ISTIOD_CUSTOM_HOST: ${EXTERNAL_ISTIOD_ADDR}/" \ + -e '/INJECTION_WEBHOOK_CONFIG_NAME/,+1d' \ + -e "/VALIDATION_WEBHOOK_CONFIG_NAME/,+1d" \ + -e "s/env:/env: []/g" \ external-istiod.yaml } @@ -83,7 +85,7 @@ snip_set_up_the_control_plane_in_the_external_cluster_1 snip_set_up_the_control_plane_in_the_external_cluster_2 snip_get_external_istiod_iop_modified -echo y | snip_set_up_the_control_plane_in_the_external_cluster_4 +echo y | istioctl install -f external-istiod.yaml --context="${CTX_EXTERNAL_CLUSTER}" --set values.pilot.env.ISTIOD_CUSTOM_HOST="${EXTERNAL_ISTIOD_ADDR}" _verify_like snip_set_up_the_control_plane_in_the_external_cluster_5 "$snip_set_up_the_control_plane_in_the_external_cluster_5_out"