From 8f2afd05c82260a97d80751d04128f4fb699a634 Mon Sep 17 00:00:00 2001 From: Frank Budinsky Date: Fri, 17 Sep 2021 14:42:13 -0400 Subject: [PATCH] Fix tab content not rendering proper indent (#10362) --- .../install/external-controlplane/index.md | 146 +++++++++--------- .../install/external-controlplane/snips.sh | 28 ++-- .../install/external-controlplane/test.sh | 7 +- 3 files changed, 93 insertions(+), 88 deletions(-) diff --git a/content/en/docs/setup/install/external-controlplane/index.md b/content/en/docs/setup/install/external-controlplane/index.md index e4ab64e4d1..cbb705a60f 100644 --- a/content/en/docs/setup/install/external-controlplane/index.md +++ b/content/en/docs/setup/install/external-controlplane/index.md @@ -422,89 +422,95 @@ including gateways, if needed. #### Enable gateways -1. Enable an ingress gateway on the remote cluster: +Enable an ingress gateway on the remote cluster: - {{< tabset category-name="ingress-gateway-install-type" >}} - {{< tab name="IstioOperator" category-value="iop" >}} +{{< tabset category-name="ingress-gateway-install-type" >}} - {{< text bash >}} - $ cat < istio-ingressgateway.yaml - apiVersion: install.istio.io/v1alpha1 - kind: IstioOperator - spec: - profile: empty - components: - ingressGateways: - - namespace: external-istiod - name: istio-ingressgateway - enabled: true - values: - gateways: - istio-ingressgateway: - injectionTemplate: gateway - EOF - $ istioctl install -f istio-ingressgateway.yaml --context="${CTX_REMOTE_CLUSTER}" - {{< /text >}} +{{< tab name="IstioOperator" category-value="iop" >}} - {{< /tab >}} - - {{< tab name="Helm" category-value="helm" >}} - - {{< text bash >}} - $ cat < values.yaml +{{< text bash >}} +$ cat < istio-ingressgateway.yaml +apiVersion: install.istio.io/v1alpha1 +kind: IstioOperator +spec: + profile: empty + components: + ingressGateways: + - namespace: external-istiod + name: istio-ingressgateway + enabled: true + values: gateways: - istio-ingressgateway: - # Enable gateway injection - injectionTemplate: gateway - name: istio-ingressgateway - EOF - $ helm install istio-ingress manifests/charts/gateways/istio-ingress -f values.yaml -n external-istiod --kube-context="${CTX_REMOTE_CLUSTER}" - {{< /text >}} + istio-ingressgateway: + injectionTemplate: gateway +EOF +$ istioctl install -f istio-ingressgateway.yaml --context="${CTX_REMOTE_CLUSTER}" +{{< /text >}} - {{< /tab >}} - {{< /tabset >}} +{{< /tab >}} -1. Enable an egress gateway, or other gateways, on the remote cluster (optional): +{{< tab name="Helm" category-value="helm" >}} - {{< tabset category-name="egress-gateway-install-type" >}} - {{< tab name="IstioOperator" category-value="iop" >}} +{{< text bash >}} +$ cat < values.yaml +gateways: + istio-ingressgateway: + # Enable gateway injection + injectionTemplate: gateway + name: istio-ingressgateway +EOF +$ helm install istio-ingress manifests/charts/gateways/istio-ingress -f values.yaml -n external-istiod --kube-context="${CTX_REMOTE_CLUSTER}" +{{< /text >}} - {{< text bash >}} - $ cat < istio-egressgateway.yaml - apiVersion: install.istio.io/v1alpha1 - kind: IstioOperator - spec: - profile: empty - components: - egressGateways: - - namespace: external-istiod - name: istio-egressgateway - enabled: true - values: - gateways: - istio-egressgateway: - injectionTemplate: gateway - EOF - $ istioctl install -f istio-egressgateway.yaml --context="${CTX_REMOTE_CLUSTER}" - {{< /text >}} +{{< /tab >}} - {{< /tab >}} +{{< /tabset >}} - {{< tab name="Helm" category-value="helm" >}} +You can optionally enable other gateways as well. For example, an egress gateway: - {{< text bash >}} - $ cat < values.yaml +{{< tabset category-name="egress-gateway-install-type" >}} + +{{< tab name="IstioOperator" category-value="iop" >}} + +{{< text bash >}} +$ cat < istio-egressgateway.yaml +apiVersion: install.istio.io/v1alpha1 +kind: IstioOperator +spec: + profile: empty + components: + egressGateways: + - namespace: external-istiod + name: istio-egressgateway + enabled: true + values: gateways: - istio-egressgateway: - # Enable gateway injection - injectionTemplate: gateway - name: istio-egressgateway - EOF - $ helm install istio-egress manifests/charts/gateways/istio-egress -f values.yaml -n external-istiod --kube-context="${CTX_REMOTE_CLUSTER}" - {{< /text >}} + istio-egressgateway: + injectionTemplate: gateway +EOF +$ istioctl install -f istio-egressgateway.yaml --context="${CTX_REMOTE_CLUSTER}" +{{< /text >}} - {{< /tab >}} - {{< /tabset >}} +{{< /tab >}} + +{{< tab name="Helm" category-value="helm" >}} + +{{< text bash >}} +$ cat < values.yaml +gateways: + istio-egressgateway: + # Enable gateway injection + injectionTemplate: gateway + name: istio-egressgateway +EOF +$ helm install istio-egress manifests/charts/gateways/istio-egress -f values.yaml -n external-istiod --kube-context="${CTX_REMOTE_CLUSTER}" +{{< /text >}} + +{{< /tab >}} + +{{< /tabset >}} + +#### Test the ingress gateway 1. Confirm that the Istio ingress gateway is running: diff --git a/content/en/docs/setup/install/external-controlplane/snips.sh b/content/en/docs/setup/install/external-controlplane/snips.sh index dfc028fda2..ac8f3a1927 100644 --- a/content/en/docs/setup/install/external-controlplane/snips.sh +++ b/content/en/docs/setup/install/external-controlplane/snips.sh @@ -320,10 +320,10 @@ istioctl install -f istio-ingressgateway.yaml --context="${CTX_REMOTE_CLUSTER}" snip_enable_gateways_2() { cat < values.yaml gateways: - istio-ingressgateway: - # Enable gateway injection - injectionTemplate: gateway - name: istio-ingressgateway + istio-ingressgateway: + # Enable gateway injection + injectionTemplate: gateway + name: istio-ingressgateway EOF helm install istio-ingress manifests/charts/gateways/istio-ingress -f values.yaml -n external-istiod --kube-context="${CTX_REMOTE_CLUSTER}" } @@ -350,38 +350,38 @@ istioctl install -f istio-egressgateway.yaml --context="${CTX_REMOTE_CLUSTER}" snip_enable_gateways_4() { cat < values.yaml gateways: - istio-egressgateway: - # Enable gateway injection - injectionTemplate: gateway - name: istio-egressgateway + istio-egressgateway: + # Enable gateway injection + injectionTemplate: gateway + name: istio-egressgateway EOF helm install istio-egress manifests/charts/gateways/istio-egress -f values.yaml -n external-istiod --kube-context="${CTX_REMOTE_CLUSTER}" } -snip_enable_gateways_5() { +snip_test_the_ingress_gateway_1() { kubectl get pod -l app=istio-ingressgateway -n external-istiod --context="${CTX_REMOTE_CLUSTER}" } -! read -r -d '' snip_enable_gateways_5_out <<\ENDSNIP +! read -r -d '' snip_test_the_ingress_gateway_1_out <<\ENDSNIP NAME READY STATUS RESTARTS AGE istio-ingressgateway-7bcd5c6bbd-kmtl4 1/1 Running 0 8m4s ENDSNIP -snip_enable_gateways_6() { +snip_test_the_ingress_gateway_2() { kubectl apply -f samples/helloworld/helloworld-gateway.yaml -n sample --context="${CTX_REMOTE_CLUSTER}" } -snip_enable_gateways_7() { +snip_test_the_ingress_gateway_3() { export INGRESS_HOST=$(kubectl -n external-istiod --context="${CTX_REMOTE_CLUSTER}" get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}') export INGRESS_PORT=$(kubectl -n external-istiod --context="${CTX_REMOTE_CLUSTER}" get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}') export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT } -snip_enable_gateways_8() { +snip_test_the_ingress_gateway_4() { curl -s "http://${GATEWAY_URL}/hello" } -! read -r -d '' snip_enable_gateways_8_out <<\ENDSNIP +! read -r -d '' snip_test_the_ingress_gateway_4_out <<\ENDSNIP Hello version: v1, instance: helloworld-v1-776f57d5f6-s7zfc ENDSNIP diff --git a/content/en/docs/setup/install/external-controlplane/test.sh b/content/en/docs/setup/install/external-controlplane/test.sh index 265396ac4a..a2cc345a85 100644 --- a/content/en/docs/setup/install/external-controlplane/test.sh +++ b/content/en/docs/setup/install/external-controlplane/test.sh @@ -107,22 +107,21 @@ _verify_like snip_deploy_a_sample_application_3 "$snip_deploy_a_sample_applicati _verify_contains snip_deploy_a_sample_application_4 "Hello version: v1" echo y | snip_enable_gateways_1 -#echo y | snip_enable_gateways_2 snip_enable_gateways_4 _verify_same kubectl_get_egress_gateway_for_remote_cluster "Running" -_verify_like snip_enable_gateways_5 "$snip_enable_gateways_5_out" +_verify_like snip_test_the_ingress_gateway_1 "$snip_test_the_ingress_gateway_1_out" -snip_enable_gateways_6 +snip_test_the_ingress_gateway_2 export GATEWAY_URL=$(kubectl \ --context="${CTX_REMOTE_CLUSTER}" \ -n external-istiod get svc istio-ingressgateway \ -o jsonpath='{.status.loadBalancer.ingress[0].ip}') -_verify_contains snip_enable_gateways_8 "Hello version: v1" +_verify_contains snip_test_the_ingress_gateway_4 "Hello version: v1" # Adding clusters to the mesh.