fix: Multi-cluster installation with revision istiod vs (#14571)

* fix: Multi-cluster installation with revision istiod vs

Multi-cluster installation should use expose-istiod-rev.yaml.tmpl when
control plane is installed with revision

* Add chinese

* Fix lint and genfiles

* address comments

* Fix test

* Fix file reference wrapping
This commit is contained in:
JC 2024-02-02 10:09:41 -08:00 committed by GitHub
parent 978fd74ed0
commit 4b7ca408e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 44 additions and 0 deletions

View File

@ -106,6 +106,15 @@ $ kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f \
@samples/multicluster/expose-istiod.yaml@
{{< /text >}}
{{< warning >}}
If the control-plane was installed with a revision `rev`, use the following command instead:
{{< text bash >}}
$ sed 's/{{.Revision}}/rev/g' @samples/multicluster/expose-istiod-rev.yaml.tmpl@ | kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f -
{{< /text >}}
{{< /warning >}}
## Set the control plane cluster for `cluster2`
We need identify the external control plane cluster that should manage `cluster2` by annotating the

View File

@ -58,6 +58,10 @@ kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f \
samples/multicluster/expose-istiod.yaml
}
snip_expose_the_control_plane_in_cluster1_2() {
sed 's/{{.Revision}}/rev/g' samples/multicluster/expose-istiod-rev.yaml.tmpl | kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f -
}
snip_set_the_control_plane_cluster_for_cluster2_1() {
kubectl --context="${CTX_CLUSTER2}" create namespace istio-system
kubectl --context="${CTX_CLUSTER2}" annotate namespace istio-system topology.istio.io/controlPlaneClusters=cluster1

View File

@ -109,6 +109,15 @@ $ kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f \
@samples/multicluster/expose-istiod.yaml@
{{< /text >}}
{{< warning >}}
If the control-plane was installed with a revision `rev`, use the following command instead:
{{< text bash >}}
$ sed 's/{{.Revision}}/rev/g' @samples/multicluster/expose-istiod-rev.yaml.tmpl@ | kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f -
{{< /text >}}
{{< /warning >}}
## Set the control plane cluster for `cluster2`
We need identify the external control plane cluster that should manage `cluster2` by annotating the

View File

@ -63,6 +63,10 @@ kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f \
samples/multicluster/expose-istiod.yaml
}
snip_expose_the_control_plane_in_cluster1_2() {
sed 's/{{.Revision}}/rev/g' samples/multicluster/expose-istiod-rev.yaml.tmpl | kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f -
}
snip_set_the_control_plane_cluster_for_cluster2_1() {
kubectl --context="${CTX_CLUSTER2}" create namespace istio-system
kubectl --context="${CTX_CLUSTER2}" annotate namespace istio-system topology.istio.io/controlPlaneClusters=cluster1

View File

@ -102,6 +102,15 @@ $ kubectl apply --context="${CTX_CLUSTER1}" -f \
@samples/multicluster/expose-istiod.yaml@
{{< /text >}}
{{< warning >}}
如果控制面指定了版本 `rev`, 需要改为执行
{{< text bash >}}
$ sed 's/{{.Revision}}/rev/g' @samples/multicluster/expose-istiod-rev.yaml.tmpl@ | kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f -
{{< /text >}}
{{< /warning >}}
## 设置集群 `cluster2` 的控制平面 {#set-the-control-plane-cluster-for-cluster2}
我们需要通过为 `istio-system` 命名空间添加注解来识别应管理集群

View File

@ -104,6 +104,15 @@ $ kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f \
@samples/multicluster/expose-istiod.yaml@
{{< /text >}}
{{< warning >}}
如果控制面指定了版本 `rev`, 需要改为执行
{{< text bash >}}
$ sed 's/{{.Revision}}/rev/g' @samples/multicluster/expose-istiod-rev.yaml.tmpl@ | kubectl apply --context="${CTX_CLUSTER1}" -n istio-system -f -
{{< /text >}}
{{< /warning >}}
## 为 `cluster2` 设置控制平面集群 {#set-the-control-plane-cluster-for-cluster2}
命名空间 `istio-system` 创建之后,我们需要设置集群的网络: