mirror of https://github.com/istio/istio.io.git
Site improvements. (#3706)
- Added a test suite to test out the different compositions of site features. - Substantially improve the composability of site features (callouts, tabs, text blocks, boilerplates, lists). You can now more confidentally mix & match these in any combination and have a pretty good chance it'll render correctly.
This commit is contained in:
parent
0d6b4ce1f9
commit
2a5108806b
|
@ -558,17 +558,17 @@ format in a different tab. To insert tabbed content, you use a combination of `t
|
|||
{{< text markdown >}}
|
||||
{{</* tabset cookie-name="platform" */>}}
|
||||
|
||||
{{%/* tab name="One" cookie-value="one" */%}}
|
||||
{{</* tab name="One" cookie-value="one" */>}}
|
||||
ONE
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{%/* tab name="Two" cookie-value="two" */%}}
|
||||
{{</* tab name="Two" cookie-value="two" */>}}
|
||||
TWO
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{%/* tab name="Three" cookie-value="three" */%}}
|
||||
{{</* tab name="Three" cookie-value="three" */>}}
|
||||
THREE
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{</* /tabset */>}}
|
||||
{{< /text >}}
|
||||
|
@ -577,17 +577,17 @@ which produces the following output:
|
|||
|
||||
{{< tabset cookie-name="platform" >}}
|
||||
|
||||
{{% tab name="One" cookie-value="one" %}}
|
||||
{{< tab name="One" cookie-value="one" >}}
|
||||
ONE
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Two" cookie-value="two" %}}
|
||||
{{< tab name="Two" cookie-value="two" >}}
|
||||
TWO
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Three" cookie-value="three" %}}
|
||||
{{< tab name="Three" cookie-value="three" >}}
|
||||
THREE
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -595,9 +595,9 @@ to be 443. The egress gateway accepts the MongoDB traffic on the port 443, match
|
|||
|
||||
{{< tabset cookie-name="mtls" >}}
|
||||
|
||||
{{% tab name="mTLS enabled" cookie-value="enabled" %}}
|
||||
{{< tab name="mTLS enabled" cookie-value="enabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
|
@ -672,13 +672,13 @@ to be 443. The egress gateway accepts the MongoDB traffic on the port 443, match
|
|||
number: $MONGODB_PORT
|
||||
weight: 100
|
||||
EOF
|
||||
{{< /text >}}
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="mTLS disabled" cookie-value="disabled" %}}
|
||||
{{< tab name="mTLS disabled" cookie-value="disabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
|
@ -742,9 +742,9 @@ to be 443. The egress gateway accepts the MongoDB traffic on the port 443, match
|
|||
number: $MONGODB_PORT
|
||||
weight: 100
|
||||
EOF
|
||||
{{< /text >}}
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
---
|
||||
This is some boilerplate text.
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
---
|
||||
This is some boilerplate *markdown* _text_.
|
||||
|
||||
{{< text plain >}}
|
||||
A sample nested text block.
|
||||
{{< /text >}}
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
---
|
||||
{{< warning >}}
|
||||
A warning from a boilerplate
|
||||
{{< /warning >}}
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
---
|
||||
{{< warning >}}
|
||||
A warning from a boilerplate
|
||||
|
||||
{{< text plain >}}
|
||||
A text block inside a warning
|
||||
{{< /text >}}
|
||||
|
||||
{{< /warning >}}
|
|
@ -99,9 +99,9 @@ be done by the egress gateway, as opposed to by the sidecar in the previous exam
|
|||
|
||||
{{< tabset cookie-name="mtls" >}}
|
||||
|
||||
{{% tab name="mTLS enabled" cookie-value="enabled" %}}
|
||||
{{< tab name="mTLS enabled" cookie-value="enabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
|
@ -141,13 +141,13 @@ be done by the egress gateway, as opposed to by the sidecar in the previous exam
|
|||
mode: ISTIO_MUTUAL
|
||||
sni: edition.cnn.com
|
||||
EOF
|
||||
{{< /text >}}
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="mTLS disabled" cookie-value="disabled" %}}
|
||||
{{< tab name="mTLS disabled" cookie-value="disabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
|
@ -173,9 +173,9 @@ be done by the egress gateway, as opposed to by the sidecar in the previous exam
|
|||
subsets:
|
||||
- name: cnn
|
||||
EOF
|
||||
{{< /text >}}
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -5,7 +5,9 @@ weight: 30
|
|||
keywords: [traffic-management,egress]
|
||||
---
|
||||
|
||||
{{<warning>}}This example does not work in Minikube.{{</warning>}}
|
||||
{{<warning>}}
|
||||
This example does not work in Minikube.
|
||||
{{</warning>}}
|
||||
|
||||
The [Control Egress Traffic](/docs/tasks/traffic-management/egress/) task shows how to configure
|
||||
Istio to allow access to external HTTP and HTTPS services from applications inside the mesh.
|
||||
|
@ -110,7 +112,7 @@ First create a `ServiceEntry` to allow direct traffic to an external service.
|
|||
|
||||
{{< tabset cookie-name="mtls" >}}
|
||||
|
||||
{{% tab name="mTLS enabled" cookie-value="enabled" %}}
|
||||
{{< tab name="mTLS enabled" cookie-value="enabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
|
@ -154,9 +156,9 @@ First create a `ServiceEntry` to allow direct traffic to an external service.
|
|||
EOF
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="mTLS disabled" cookie-value="disabled" %}}
|
||||
{{< tab name="mTLS disabled" cookie-value="disabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
|
@ -186,7 +188,7 @@ First create a `ServiceEntry` to allow direct traffic to an external service.
|
|||
EOF
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
@ -318,7 +320,7 @@ You need to specify port 443 with protocol `TLS` in a corresponding `ServiceEntr
|
|||
|
||||
{{< tabset cookie-name="mtls" >}}
|
||||
|
||||
{{% tab name="mTLS enabled" cookie-value="enabled" %}}
|
||||
{{< tab name="mTLS enabled" cookie-value="enabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
|
@ -397,9 +399,9 @@ You need to specify port 443 with protocol `TLS` in a corresponding `ServiceEntr
|
|||
EOF
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="mTLS disabled" cookie-value="disabled" %}}
|
||||
{{< tab name="mTLS disabled" cookie-value="disabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
|
@ -467,7 +469,7 @@ You need to specify port 443 with protocol `TLS` in a corresponding `ServiceEntr
|
|||
EOF
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -423,7 +423,7 @@ The SNI proxy will forward the traffic to port `443`.
|
|||
|
||||
{{< tabset cookie-name="mtls" >}}
|
||||
|
||||
{{% tab name="mTLS enabled" cookie-value="enabled" %}}
|
||||
{{< tab name="mTLS enabled" cookie-value="enabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
|
@ -538,9 +538,9 @@ The SNI proxy will forward the traffic to port `443`.
|
|||
EOF
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="mTLS disabled" cookie-value="disabled" %}}
|
||||
{{< tab name="mTLS disabled" cookie-value="disabled" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
|
@ -609,7 +609,7 @@ The SNI proxy will forward the traffic to port `443`.
|
|||
EOF
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -93,58 +93,58 @@ deployed and you don't want to install it.
|
|||
|
||||
{{< tabset cookie-name="helm_profile" >}}
|
||||
|
||||
{{% tab name="default" cookie-value="default" %}}
|
||||
{{< tab name="default" cookie-value="default" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="demo" cookie-value="demo" %}}
|
||||
{{< tab name="demo" cookie-value="demo" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-demo.yaml | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="demo-auth" cookie-value="demo-auth" %}}
|
||||
{{< tab name="demo-auth" cookie-value="demo-auth" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-demo-auth.yaml | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="minimal" cookie-value="minimal" %}}
|
||||
{{< tab name="minimal" cookie-value="minimal" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-minimal.yaml | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="remote" cookie-value="remote" %}}
|
||||
{{< tab name="remote" cookie-value="remote" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-remote.yaml | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="sds" cookie-value="sds" %}}
|
||||
{{< tab name="sds" cookie-value="sds" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-sds-auth.yaml | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
@ -193,58 +193,58 @@ to manage the lifecycle of Istio.
|
|||
|
||||
{{< tabset cookie-name="helm_profile" >}}
|
||||
|
||||
{{% tab name="default" cookie-value="default" %}}
|
||||
{{< tab name="default" cookie-value="default" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="demo" cookie-value="demo" %}}
|
||||
{{< tab name="demo" cookie-value="demo" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-demo.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="demo-auth" cookie-value="demo-auth" %}}
|
||||
{{< tab name="demo-auth" cookie-value="demo-auth" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-demo-auth.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="minimal" cookie-value="minimal" %}}
|
||||
{{< tab name="minimal" cookie-value="minimal" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-minimal.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="remote" cookie-value="remote" %}}
|
||||
{{< tab name="remote" cookie-value="remote" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-remote.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="sds" cookie-value="sds" %}}
|
||||
{{< tab name="sds" cookie-value="sds" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
--values install/kubernetes/helm/istio/values-istio-sds-auth.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
@ -270,16 +270,16 @@ $ helm install install/kubernetes/helm/istio --name istio --namespace istio-syst
|
|||
|
||||
{{< tabset cookie-name="helm_profile" >}}
|
||||
|
||||
{{% tab name="default" cookie-value="default" %}}
|
||||
{{< tab name="default" cookie-value="default" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system | kubectl delete -f -
|
||||
$ kubectl delete namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="demo" cookie-value="demo" %}}
|
||||
{{< tab name="demo" cookie-value="demo" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
|
@ -287,9 +287,9 @@ $ helm template install/kubernetes/helm/istio --name istio --namespace istio-sys
|
|||
$ kubectl delete namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="demo-auth" cookie-value="demo-auth" %}}
|
||||
{{< tab name="demo-auth" cookie-value="demo-auth" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
|
@ -297,9 +297,9 @@ $ helm template install/kubernetes/helm/istio --name istio --namespace istio-sys
|
|||
$ kubectl delete namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="minimal" cookie-value="minimal" %}}
|
||||
{{< tab name="minimal" cookie-value="minimal" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
|
@ -307,9 +307,9 @@ $ helm template install/kubernetes/helm/istio --name istio --namespace istio-sys
|
|||
$ kubectl delete namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="remote" cookie-value="remote" %}}
|
||||
{{< tab name="remote" cookie-value="remote" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
|
@ -317,9 +317,9 @@ $ helm template install/kubernetes/helm/istio --name istio --namespace istio-sys
|
|||
$ kubectl delete namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="sds" cookie-value="sds" %}}
|
||||
{{< tab name="sds" cookie-value="sds" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system \
|
||||
|
@ -327,7 +327,7 @@ $ helm template install/kubernetes/helm/istio --name istio --namespace istio-sys
|
|||
$ kubectl delete namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ This permits customization of Istio to operator specific requirements.
|
|||
|
||||
{{< tabset cookie-name="profile" >}}
|
||||
|
||||
{{% tab name="permissive mTLS" cookie-value="permissive" %}}
|
||||
{{< tab name="permissive mTLS" cookie-value="permissive" >}}
|
||||
When using the permissive mutual TLS mode, all services accept both plain text and
|
||||
mutual TLS traffic. Clients send plain text traffic unless configured for
|
||||
[mutual migration](/docs/tasks/security/mtls-migration/#configure-clients-to-send-mutual-tls-traffic).
|
||||
|
@ -60,9 +60,9 @@ Run the following command to install this variant:
|
|||
$ kubectl apply -f install/kubernetes/istio-demo.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="strict mTLS" cookie-value="strict" %}}
|
||||
{{< tab name="strict mTLS" cookie-value="strict" >}}
|
||||
This variant will enforce
|
||||
[mutual TLS authentication](/docs/concepts/security/#mutual-tls-authentication) between all clients and servers.
|
||||
|
||||
|
@ -75,7 +75,7 @@ Run the following command to install this variant:
|
|||
$ kubectl apply -f install/kubernetes/istio-demo-auth.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
@ -175,21 +175,21 @@ non-existent resources because they may have been deleted hierarchically.
|
|||
|
||||
{{< tabset cookie-name="profile" >}}
|
||||
|
||||
{{% tab name="permissive mTLS" cookie-value="permissive" %}}
|
||||
{{< tab name="permissive mTLS" cookie-value="permissive" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl delete -f install/kubernetes/istio-demo.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="strict mTLS" cookie-value="strict" %}}
|
||||
{{< tab name="strict mTLS" cookie-value="strict" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl delete -f install/kubernetes/istio-demo-auth.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ cluster. You can install the component in one of two ways:
|
|||
|
||||
{{< tabset cookie-name="install-istio-remote" >}}
|
||||
|
||||
{{% tab name="Helm+kubectl" cookie-value="Helm+kubectl" %}}
|
||||
{{< tab name="Helm+kubectl" cookie-value="Helm+kubectl" >}}
|
||||
|
||||
1. Use the following `helm template` command on the remote cluster to specify
|
||||
the Istio control plane service endpoints:
|
||||
|
@ -100,9 +100,9 @@ cluster. You can install the component in one of two ways:
|
|||
Repeat for all Kubernetes namespaces that need to setup automatic sidecar
|
||||
injection.
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Helm+Tiller" cookie-value="Helm+Tiller" %}}
|
||||
{{< tab name="Helm+Tiller" cookie-value="Helm+Tiller" >}}
|
||||
|
||||
{{< boilerplate helm-security-warning >}}
|
||||
|
||||
|
@ -130,7 +130,7 @@ cluster. You can install the component in one of two ways:
|
|||
--set global.remoteTelemetryAddress=${TELEMETRY_POD_IP}
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
@ -295,7 +295,7 @@ them. Use either `kubectl and Helm` or `Tiller and Helm` as appropriate.
|
|||
|
||||
{{< tabset cookie-name="install-istio-remote" >}}
|
||||
|
||||
{{% tab name="kubectl" cookie-value="Helm+kubectl" %}}
|
||||
{{< tab name="kubectl" cookie-value="Helm+kubectl" >}}
|
||||
|
||||
To uninstall the cluster, you must remove the configuration made with the
|
||||
`istio-remote` .YAML file. To uninstall the cluster run the following command:
|
||||
|
@ -304,9 +304,9 @@ To uninstall the cluster, you must remove the configuration made with the
|
|||
$ kubectl delete -f $HOME/istio-remote.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Tiller" cookie-value="Helm+Tiller" %}}
|
||||
{{< tab name="Tiller" cookie-value="Helm+Tiller" >}}
|
||||
|
||||
To uninstall the cluster, you must remove the configuration made with the
|
||||
`istio-remote` .YAML file. To uninstall the cluster run the following command:
|
||||
|
@ -315,7 +315,7 @@ To uninstall the cluster, you must remove the configuration made with the
|
|||
$ helm delete --purge istio-remote
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ The script is included in the [Istio installation package](/docs/setup/kubernete
|
|||
Download and run the script with the following command:
|
||||
|
||||
{{< text bash >}}
|
||||
$ curl -L {{% github_file %}}/tools/convert_RbacConfig_to_ClusterRbacConfig.sh | sh -
|
||||
$ curl -L {{< github_file >}}/tools/convert_RbacConfig_to_ClusterRbacConfig.sh | sh -
|
||||
{{< /text >}}
|
||||
|
||||
The script automates the following operations:
|
||||
|
|
|
@ -42,6 +42,7 @@ you cannot use this approach for services using those ports.
|
|||
disabled it using the `--set global.outboundTrafficPolicy.mode=REGISTRY_ONLY` flag when you
|
||||
installed Istio using helm, it is enabled by default.
|
||||
|
||||
{{< tip >}}
|
||||
If you have explicitly configured `REGISTRY_ONLY` mode, you can run the following command to change it:
|
||||
|
||||
{{< text bash >}}
|
||||
|
@ -49,6 +50,8 @@ you cannot use this approach for services using those ports.
|
|||
configmap "istio" replaced
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tip >}}
|
||||
|
||||
1. Make a couple of requests to external HTTPS services from `SOURCE_POD`:
|
||||
|
||||
{{< text bash >}}
|
||||
|
|
|
@ -0,0 +1,312 @@
|
|||
---
|
||||
title: Test
|
||||
description: This page is to test the web site infrastructure, no useful content here.
|
||||
skip_sitemap: true
|
||||
---
|
||||
|
||||
This page exercises various site features as a quick smoke test to make sure things generally work.
|
||||
|
||||
## Callouts
|
||||
|
||||
{{< warning >}}
|
||||
This is a warning
|
||||
{{< /warning >}}
|
||||
|
||||
{{< warning >}}
|
||||
This is a warning
|
||||
|
||||
with two paragraphs
|
||||
{{< /warning >}}
|
||||
|
||||
{{< tip >}}
|
||||
This is a tip
|
||||
{{< /tip >}}
|
||||
|
||||
{{< tip >}}
|
||||
This is a tip
|
||||
|
||||
with two paragraphs
|
||||
{{< /tip >}}
|
||||
|
||||
{{< idea >}}
|
||||
This is an idea
|
||||
{{< /idea >}}
|
||||
|
||||
{{< idea >}}
|
||||
This is an idea
|
||||
|
||||
with two paragraphs
|
||||
{{< /idea >}}
|
||||
|
||||
{{< quote >}}
|
||||
This is a quote
|
||||
{{< /quote >}}
|
||||
|
||||
{{< quote >}}
|
||||
This is a quote
|
||||
|
||||
with two paragraphs
|
||||
{{< /quote >}}
|
||||
|
||||
## Callouts in list
|
||||
|
||||
1. Warning
|
||||
|
||||
{{< warning >}}
|
||||
This is a warning
|
||||
{{< /warning >}}
|
||||
|
||||
{{< warning >}}
|
||||
This is a warning
|
||||
|
||||
with two paragraphs
|
||||
{{< /warning >}}
|
||||
|
||||
1. Tip
|
||||
|
||||
{{< tip >}}
|
||||
This is a tip
|
||||
{{< /tip >}}
|
||||
|
||||
{{< tip >}}
|
||||
This is a tip
|
||||
|
||||
with two paragraphs
|
||||
{{< /tip >}}
|
||||
|
||||
1. Idea
|
||||
|
||||
{{< idea >}}
|
||||
This is an idea
|
||||
{{< /idea >}}
|
||||
|
||||
{{< idea >}}
|
||||
This is an idea
|
||||
|
||||
with two paragraphs
|
||||
{{< /idea >}}
|
||||
|
||||
1. Quote
|
||||
|
||||
{{< quote >}}
|
||||
This is a quote
|
||||
{{< /quote >}}
|
||||
|
||||
{{< quote >}}
|
||||
This is a quote
|
||||
|
||||
with two paragraphs
|
||||
{{< /quote >}}
|
||||
|
||||
## Text blocks
|
||||
|
||||
{{< text bash >}}
|
||||
$ this is a text block
|
||||
$ echo Foo \
|
||||
Bar
|
||||
Foo Bar
|
||||
{{< /text >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f - <<EOF
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: ServiceEntry
|
||||
A text block with redirection
|
||||
{{< /text >}}
|
||||
|
||||
{{< warning >}}
|
||||
This is a warning with an embedded text block
|
||||
|
||||
{{< text plain >}}
|
||||
A nested text block
|
||||
{{< /text >}}
|
||||
|
||||
{{< /warning >}}
|
||||
|
||||
1. A bullet
|
||||
|
||||
{{< text plain >}}
|
||||
A text block nested in a bullet
|
||||
{{< /text >}}
|
||||
|
||||
1. Another bullet
|
||||
|
||||
{{< warning >}}
|
||||
A nested warning
|
||||
{{< /warning >}}
|
||||
|
||||
{{< text plain >}}
|
||||
Another nested text block
|
||||
{{< /text >}}
|
||||
|
||||
1. Yet another bullet
|
||||
|
||||
Second paragraph
|
||||
|
||||
1. Still another bullet
|
||||
|
||||
{{< warning >}}
|
||||
This is a warning in a bullet.
|
||||
|
||||
{{< text plain >}}
|
||||
This is a text block in a warning in a bullet
|
||||
{{< /text >}}
|
||||
|
||||
{{< /warning >}}
|
||||
|
||||
## Boilerplate
|
||||
|
||||
Plain boilerplate:
|
||||
|
||||
{{< boilerplate "test-0" >}}
|
||||
|
||||
Boilerplate with some markdown and a short code
|
||||
|
||||
{{< boilerplate "test-1" >}}
|
||||
|
||||
Boilerplate with only a `shortcode`:
|
||||
|
||||
{{< boilerplate "test-2" >}}
|
||||
|
||||
Boilerplate with only a `shortcode` with a nested text block:
|
||||
|
||||
{{< boilerplate "test-3" >}}
|
||||
|
||||
## Boilerplate in list
|
||||
|
||||
1. Plain boilerplate:
|
||||
|
||||
{{< boilerplate "test-0" >}}
|
||||
|
||||
1. Boilerplate with some markdown and a short code:
|
||||
|
||||
{{< boilerplate "test-1" >}}
|
||||
|
||||
1. Boilerplate with only a `shortcode`:
|
||||
|
||||
{{< boilerplate "test-2" >}}
|
||||
|
||||
1. Boilerplate with only a `shortcode` with a nested text block:
|
||||
|
||||
{{< boilerplate "test-3" >}}
|
||||
|
||||
## Tabs
|
||||
|
||||
{{< tabset cookie-name="test" >}}
|
||||
|
||||
{{< tab name="One" cookie-value="one" >}}
|
||||
One paragraph
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Two" cookie-value="two" >}}
|
||||
Three
|
||||
|
||||
separate
|
||||
|
||||
paragraphs
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Three" cookie-value="three" >}}
|
||||
{{< warning >}}
|
||||
Warning in a tab
|
||||
{{< /warning >}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Four" cookie-value="four" >}}
|
||||
Simple text
|
||||
|
||||
In two paragraphs
|
||||
|
||||
{{< warning >}}
|
||||
Warning in a tab
|
||||
{{< /warning >}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Five" cookie-value="five" >}}
|
||||
Simple text
|
||||
|
||||
{{< text plain >}}
|
||||
Text block in a tab
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Six" cookie-value="six" >}}
|
||||
Simple text with _markdown_ in a tab
|
||||
|
||||
{{< warning >}}
|
||||
Warning with _markdown_ in a tab
|
||||
|
||||
{{< text plain >}}
|
||||
Text block in a warning in a tab
|
||||
{{< /text >}}
|
||||
|
||||
And more _markdown_
|
||||
{{< /warning >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
## Tabs with lists
|
||||
|
||||
{{< tabset cookie-name="test" >}}
|
||||
|
||||
{{< tab name="One" cookie-value="one" >}}
|
||||
1. One paragraph in a list in a tab
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Two" cookie-value="two" >}}
|
||||
1. Three
|
||||
|
||||
1. separate
|
||||
|
||||
1. bullets in a list in a tab
|
||||
|
||||
This last bullet with two paragraphs
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Three" cookie-value="three" >}}
|
||||
1. Simple text in a list in a tab
|
||||
|
||||
A paragraph
|
||||
|
||||
{{< warning >}}
|
||||
Warning in a list in a tab
|
||||
{{< /warning >}}
|
||||
|
||||
And another
|
||||
|
||||
1. Second bullet
|
||||
|
||||
1. Third bullet
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Four" cookie-value="four" >}}
|
||||
1. Simple text with _markdown_ in a list in a tab
|
||||
|
||||
{{< warning >}}
|
||||
Warning in a list in a tab
|
||||
{{< /warning >}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Five" cookie-value="five" >}}
|
||||
1. Simple text in a list in a tab
|
||||
|
||||
{{< text plain >}}
|
||||
Text block in a list in a tab
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Six" cookie-value="six" >}}
|
||||
1. Simple text with _markdown_ in a list in a tab
|
||||
|
||||
{{< warning >}}
|
||||
Warning with _markdown_ in a list in a tab
|
||||
{{< /warning >}}
|
||||
|
||||
1. Second bullet
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
|
@ -517,17 +517,17 @@ Mixer 使用 {{<gloss 适配器>}}adapter{{</gloss>}} 来连接后端。
|
|||
{{< text markdown >}}
|
||||
{{</* tabset cookie-name="platform" */>}}
|
||||
|
||||
{{%/* tab name="一" cookie-value="one" */%}}
|
||||
{{</* tab name="一" cookie-value="one" */>}}
|
||||
一
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{%/* tab name="二" cookie-value="two" */%}}
|
||||
{{</* tab name="二" cookie-value="two" */>}}
|
||||
二
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{%/* tab name="三" cookie-value="three" */%}}
|
||||
{{</* tab name="三" cookie-value="three" */>}}
|
||||
三
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{</* /tabset */>}}
|
||||
{{< /text >}}
|
||||
|
@ -536,17 +536,17 @@ Mixer 使用 {{<gloss 适配器>}}adapter{{</gloss>}} 来连接后端。
|
|||
|
||||
{{< tabset cookie-name="platform" >}}
|
||||
|
||||
{{% tab name="一" cookie-value="one" %}}
|
||||
{{< tab name="一" cookie-value="one" >}}
|
||||
一
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="二" cookie-value="two" %}}
|
||||
{{< tab name="二" cookie-value="two" >}}
|
||||
二
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="三" cookie-value="three" %}}
|
||||
{{< tab name="三" cookie-value="three" >}}
|
||||
三
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -356,17 +356,17 @@ I如果未指定 `downloadas` 属性,则下载名称取自 `url` 属性。
|
|||
{{< text markdown >}}
|
||||
{{</* tabset cookie-name="platform" */>}}
|
||||
|
||||
{{%/* tab name="One" cookie-value="one" */%}}
|
||||
{{</* tab name="One" cookie-value="one" */>}}
|
||||
ONE
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{%/* tab name="Two" cookie-value="two" */%}}
|
||||
{{</* tab name="Two" cookie-value="two" */>}}
|
||||
TWO
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{%/* tab name="Three" cookie-value="three" */%}}
|
||||
{{</* tab name="Three" cookie-value="three" */>}}
|
||||
THREE
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tab */>}}
|
||||
|
||||
{{</* /tabset */>}}
|
||||
{{< /text >}}
|
||||
|
@ -375,17 +375,17 @@ which produces the following output:
|
|||
|
||||
{{< tabset cookie-name="platform" >}}
|
||||
|
||||
{{% tab name="One" cookie-value="one" %}}
|
||||
{{< tab name="One" cookie-value="one" >}}
|
||||
ONE
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Two" cookie-value="two" %}}
|
||||
{{< tab name="Two" cookie-value="two" >}}
|
||||
TWO
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Three" cookie-value="three" %}}
|
||||
{{< tab name="Three" cookie-value="three" >}}
|
||||
THREE
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ keywords: [kubernetes]
|
|||
|
||||
{{< tabset cookie-name="profile" >}}
|
||||
|
||||
{{% tab name="宽容模式的 mutual TLS" cookie-value="permissive" %}}
|
||||
{{< tab name="宽容模式的 mutual TLS" cookie-value="permissive" >}}
|
||||
|
||||
如果使用 mutual TLS 的宽容模式,所有的服务会同时允许明文和双向 TLS 的流量。在没有明确[配置客户端进行双向 TLS 通信](/zh/docs/tasks/security/mtls-migration/#配置客户端进行双向-tls-通信)的情况下,客户端会发送明文流量。可以进一步阅读了解[双向 TLS 中的宽容模式](/docs/concepts/security/#permissive-mode)的相关内容。
|
||||
|
||||
|
@ -62,9 +62,9 @@ keywords: [kubernetes]
|
|||
$ kubectl apply -f install/kubernetes/istio-demo.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="严格模式的 mutual TLS" cookie-value="strict" %}}
|
||||
{{< tab name="严格模式的 mutual TLS" cookie-value="strict" >}}
|
||||
这种方案会在所有的客户端和服务器之间使用
|
||||
[双向 TLS](/zh/docs/concepts/security/#双向-tls-认证)。
|
||||
|
||||
|
@ -76,7 +76,7 @@ $ kubectl apply -f install/kubernetes/istio-demo.yaml
|
|||
$ kubectl apply -f install/kubernetes/istio-demo-auth.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
@ -150,21 +150,21 @@ $ istioctl kube-inject -f <your-app-spec>.yaml | kubectl apply -f -
|
|||
|
||||
{{< tabset cookie-name="profile" >}}
|
||||
|
||||
{{% tab name="宽容模式的 mutual TLS" cookie-value="permissive" %}}
|
||||
{{< tab name="宽容模式的 mutual TLS" cookie-value="permissive" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl delete -f install/kubernetes/istio-demo.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="严格模式的 mutual TLS" cookie-value="strict" %}}
|
||||
{{< tab name="严格模式的 mutual TLS" cookie-value="strict" >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl delete -f install/kubernetes/istio-demo-auth.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -43,12 +43,12 @@ keywords: [kubernetes,multicluster,federation,vpn]
|
|||
|
||||
{{< tabset cookie-name="install-istio-remote" >}}
|
||||
|
||||
{{% tab name="Helm+kubectl" cookie-value="Helm+kubectl" %}}
|
||||
{{< tab name="Helm+kubectl" cookie-value="Helm+kubectl" >}}
|
||||
[使用 Helm 和 `kubectl` 安装并管理远程集群](#helm-k)
|
||||
{{% /tab %}}
|
||||
{{% tab name="Helm+Tiller" cookie-value="Helm+Tiller" %}}
|
||||
{{< /tab >}}
|
||||
{{< tab name="Helm+Tiller" cookie-value="Helm+Tiller" >}}
|
||||
[使用 Helm 和 Tiller 安装并管理远程集群](#tiller)
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
{{< /tabset >}}
|
||||
|
||||
### 设置环境变量 {#environment}
|
||||
|
@ -82,7 +82,7 @@ $ export ZIPKIN_POD_IP=$(kubectl -n istio-system get pod -l app=jaeger -o jsonpa
|
|||
|
||||
{{< tabset cookie-name="install-istio-remote" >}}
|
||||
|
||||
{{% tab name="Helm+kubectl" cookie-value="Helm+kubectl" %}}
|
||||
{{< tab name="Helm+kubectl" cookie-value="Helm+kubectl" >}}
|
||||
|
||||
#### 通过 Helm 和 `kubectl` {#helm-k}
|
||||
|
||||
|
@ -121,9 +121,9 @@ $ helm template install/kubernetes/helm/istio-remote --namespace istio-system \
|
|||
|
||||
对需要设置 sidecar 注入的所有 Kubernetes 命名空间需要重复此操作。
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Helm+Tiller" cookie-value="Helm+Tiller" %}}
|
||||
{{< tab name="Helm+Tiller" cookie-value="Helm+Tiller" >}}
|
||||
|
||||
#### 通过 Helm 和 Tiller {#tiller}
|
||||
|
||||
|
@ -145,7 +145,7 @@ $ helm template install/kubernetes/helm/istio-remote --namespace istio-system \
|
|||
$ helm install install/kubernetes/helm/istio-remote --name istio-remote --namespace istio-system --set global.remotePilotAddress=${PILOT_POD_IP} --set global.remotePolicyAddress=${POLICY_POD_IP} --set global.remoteTelemetryAddress=${TELEMETRY_POD_IP} --set global.remoteZipkinAddress=${ZIPKIN_POD_IP}
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
@ -271,7 +271,7 @@ Kubernetes secret 数据秘钥必须符合 `DNS-1123 subdomain` [格式](https:/
|
|||
|
||||
{{< tabset cookie-name="uninstall-istio-remote" >}}
|
||||
|
||||
{{% tab name="kubectl" cookie-value="kubectl" %}}
|
||||
{{< tab name="kubectl" cookie-value="kubectl" >}}
|
||||
|
||||
### 通过 `kubectl`
|
||||
|
||||
|
@ -282,9 +282,9 @@ Kubernetes secret 数据秘钥必须符合 `DNS-1123 subdomain` [格式](https:/
|
|||
$ kubectl delete -f $HOME/istio-remote.yaml
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="Tiller" cookie-value="Tiller" %}}
|
||||
{{< tab name="Tiller" cookie-value="Tiller" >}}
|
||||
|
||||
### 通过 Tiller
|
||||
|
||||
|
@ -295,7 +295,7 @@ $ kubectl delete -f $HOME/istio-remote.yaml
|
|||
$ helm delete --purge istio-remote
|
||||
{{< /text >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tab >}}
|
||||
|
||||
{{< /tabset >}}
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ spec:
|
|||
下载并运行如下命令:
|
||||
|
||||
{{< text bash >}}
|
||||
$ curl -L {{% github_file %}}git/tools/convert_RbacConfig_to_ClusterRbacConfig.sh | sh -
|
||||
$ curl -L {{< github_file >}}git/tools/convert_RbacConfig_to_ClusterRbacConfig.sh | sh -
|
||||
{{< /text >}}
|
||||
|
||||
这个脚本自动化下如下操作:
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{ range .Data.Pages }}{{ if not .Params.skip_sitemap }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>{{ end }}
|
||||
</url>
|
||||
{{ end }}{{ end }}
|
||||
</urlset>
|
|
@ -0,0 +1,43 @@
|
|||
{{- $input := .content -}}
|
||||
{{- $pos := .pos -}}
|
||||
{{- $lines := split $input "\n" -}}
|
||||
|
||||
{{- $numLines := len $lines -}}
|
||||
{{- if gt $numLines 1 -}}
|
||||
|
||||
{{- /* look for the first non-empty line and use its indent to determine how much indent to strip */ -}}
|
||||
{{- $prefix := "" -}}
|
||||
{{- $done := false -}}
|
||||
{{- range $index, $line := $lines -}}
|
||||
{{- if not $done -}}
|
||||
{{- if gt (len $line) 0 -}}
|
||||
{{- $done = true -}}
|
||||
{{- if hasPrefix $line " " -}}{{- $prefix = " " -}}
|
||||
{{- else if hasPrefix $line " " -}}{{- $prefix = " " -}}
|
||||
{{- else if hasPrefix $line " " -}}{{- $prefix = " " -}}
|
||||
{{- else if hasPrefix $line " " -}}{{- $prefix = " " -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $text := "" -}}
|
||||
{{- range $index, $line := $lines -}}
|
||||
{{- if eq $index 0 -}}
|
||||
{{- /* skip the first line since it just contains the junk to the right of the shortcode */ -}}
|
||||
{{- else if eq $index (sub $numLines 1) -}}
|
||||
{{- /* skip the last line since it just contains the junk to the left of the shortcode */ -}}
|
||||
{{- else -}}
|
||||
{{- if hasPrefix $line $prefix -}}
|
||||
{{- $l := substr $line (len $prefix) -}}
|
||||
{{- $text = printf "%s%s\n" $text $l -}}
|
||||
{{- else -}}
|
||||
{{- $text = printf "%s%s\n" $text $line -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $text | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- errorf "Shortcode must span muliple lines (%s)" $pos -}}
|
||||
{{- end -}}
|
|
@ -1,26 +1,21 @@
|
|||
{{- /* This will try to find a resource in the "boilerplates" top-level content directory */ -}}
|
||||
{{- $name := .Get 0 -}}
|
||||
{{- $position := .Position }}
|
||||
|
||||
{{- if $name -}}
|
||||
{{- $bundle := $.Site.GetPage "page" "boilerplates" -}}
|
||||
{{- with $bundle -}}
|
||||
{{- $pattern := printf "%s*" $name -}}
|
||||
{{- $resource := $bundle.Resources.GetMatch $pattern -}}
|
||||
{{- with $resource -}}
|
||||
{{- .Content | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{/* It is not a resource in the top-level boilerplates directory. Try to find the page relative to the current page instead. */}}
|
||||
{{- $path := path.Join $.Page.Dir $name -}}
|
||||
{{- $page := $.Page.Site.GetPage "page" $path -}}
|
||||
{{- with $page }}
|
||||
{{- .Content | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- errorf "Could not find %s (%s)" $pattern $position -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "'boilerplates' direcory was not found (%s)" $position -}}
|
||||
{{- end -}}
|
||||
{{ $name := printf "%s.md" $name }}
|
||||
{{- $bundle := .Page.GetPage "/boilerplates" -}}
|
||||
{{- with $bundle -}}
|
||||
{{- $pattern := printf "%s*" $name -}}
|
||||
{{- $resource := $bundle.Resources.GetMatch $pattern -}}
|
||||
{{- with $resource -}}
|
||||
{{- .Content | markdownify -}}
|
||||
{{- else -}}
|
||||
{{- errorf "Could not find boilerplate '%s' (%s)" $name $position -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "'boilerplates' directory was not found (%s)" $position -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- errorf "Missing name in boilerplate (%s)" $position -}}
|
||||
{{- errorf "Missing name in boilerplate (%s)" $position -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ partial "large_icon.html" "callout-idea" }}
|
||||
</div>
|
||||
<div class="content">
|
||||
{{- $trimmed := trim .Inner " \n" -}}
|
||||
{{- $trimmed | markdownify -}}
|
||||
{{- $text := partial "strip_indent.html" (dict "content" .Inner "pos" .Position) -}}
|
||||
{{- $text | markdownify -}}
|
||||
</div>
|
||||
</aside>
|
||||
|
|
|
@ -46,7 +46,7 @@ omit this value and it will be computed automatically.
|
|||
{{- $width = "100%" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Turn relative values for $link into absolute URLs */ -}}
|
||||
{{- /* Turn relative values for $link into absolute paths */ -}}
|
||||
|
||||
{{- $prefix := slicestr $link 0 1 -}}
|
||||
{{- if (ne $prefix "/") -}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ partial "large_icon.html" "callout-quote" }}
|
||||
</div>
|
||||
<div class="content">
|
||||
{{- $trimmed := trim .Inner " \n" -}}
|
||||
{{- $trimmed | markdownify -}}
|
||||
{{- $text := partial "strip_indent.html" (dict "content" .Inner "pos" .Position) -}}
|
||||
{{- $text | markdownify -}}
|
||||
</div>
|
||||
</aside>
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
{{- if .Parent -}}
|
||||
{{- $name := trim (.Get "name") " " -}}
|
||||
{{- $cookie_value := trim (.Get "cookie-value") " " -}}
|
||||
{{- if not (.Parent.Scratch.Get "tabs") -}}
|
||||
{{- .Parent.Scratch.Set "tabs" slice -}}
|
||||
{{- end -}}
|
||||
{{- with .Inner -}}
|
||||
{{- $.Parent.Scratch.Add "tabs" (dict "name" $name "cookie_value" $cookie_value "content" . ) -}}
|
||||
{{- end -}}
|
||||
{{- $name := trim (.Get "name") " " -}}
|
||||
{{- $cookie_value := trim (.Get "cookie-value") " " -}}
|
||||
{{- if not (.Parent.Scratch.Get "tabs") -}}
|
||||
{{- .Parent.Scratch.Set "tabs" slice -}}
|
||||
{{- end -}}
|
||||
{{- $.Parent.Scratch.Add "tabs" (dict "name" $name "cookie_value" $cookie_value "content" .Inner) -}}
|
||||
{{- else -}}
|
||||
{{- errorf "Missing surrounding tabset for tab (%s)" .Position -}}
|
||||
{{- errorf "Missing surrounding tabset for tab (%s)" .Position -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -2,29 +2,28 @@
|
|||
{{- $tab_set_id := default (printf "tabset-%s-%d" (.Page.RelPermalink) (.Page.Scratch.Get "tabset-counter") ) | anchorize -}}
|
||||
{{- $tabs := .Scratch.Get "tabs" -}}
|
||||
{{- $cookie_name := trim (.Get "cookie-name") " " -}}
|
||||
|
||||
{{- if .Inner -}}
|
||||
{{- /* We don't use the inner content, but Hugo will complain if we don't reference it. */}}
|
||||
{{- /* We don't use the inner content, but Hugo needs this reference as a trigger to indicate this shortcode has a content area. */ -}}
|
||||
{{- end -}}
|
||||
|
||||
<div id="{{ $tab_set_id }}" role="tablist">
|
||||
<div class="tab-strip" data-cookie-name="{{ $cookie_name }}">
|
||||
{{- range $i, $e := $tabs -}}
|
||||
{{- $id := printf "%s-%d" $tab_set_id $i -}}
|
||||
<button tabindex="-1" {{ if eq $i 0 }}class="active"{{ end }} data-cookie-value="{{ .cookie_value }}"
|
||||
data-tab="{{ $id }}-panel" id="{{ $id }}-tab" role="tab"><span>{{ trim .name " " }}</span>
|
||||
</button>
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
<div class="tab-content">
|
||||
{{- range $i, $e := $tabs -}}
|
||||
{{- $id := printf "%s-%d" $tab_set_id $i -}}
|
||||
|
||||
<div {{ if eq $i 0 }}class="active"{{ end }} id="{{ $id }}-panel" role="tabpanel" aria-labelledby="{{ $id }}-tab">
|
||||
{{- with .content -}}
|
||||
{{- . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="tab-strip" data-cookie-name="{{ $cookie_name }}">
|
||||
{{- range $i, $e := $tabs -}}
|
||||
{{- $id := printf "%s-%d" $tab_set_id $i -}}
|
||||
<button tabindex="-1" {{ if eq $i 0 }}class="active"{{ end }} data-cookie-value="{{ .cookie_value }}"
|
||||
data-tab="{{ $id }}-panel" id="{{ $id }}-tab" role="tab"><span>{{ trim .name " " }}</span>
|
||||
</button>
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
{{- range $i, $e := $tabs -}}
|
||||
{{- $id := printf "%s-%d" $tab_set_id $i -}}
|
||||
<div{{ if eq $i 0 }} class="active"{{ end }} id="{{ $id }}-panel" role="tabpanel" aria-labelledby="{{ $id }}-tab">
|
||||
{{- $text := partial "strip_indent.html" (dict "content" .content "pos" .Position) -}}
|
||||
{{- $text := $text | markdownify }}
|
||||
{{- $text | safeHTML -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,34 +12,14 @@
|
|||
{{- $syntax := "" -}}
|
||||
{{- $text := "" -}}
|
||||
{{- $output := "" -}}
|
||||
{{- $line0 := "" -}}
|
||||
|
||||
{{- if .Get 0 -}}
|
||||
{{- $lines := split (strings.TrimRight " " (trim .Inner "\n")) "\n" -}}
|
||||
|
||||
{{- $line0 = index $lines 0 -}}
|
||||
{{- $indent := 0 -}}
|
||||
{{- if hasPrefix $line0 " " -}}{{- $indent = 16 -}}
|
||||
{{- else if hasPrefix $line0 " " -}}{{- $indent = 12 -}}
|
||||
{{- else if hasPrefix $line0 " " -}}{{- $indent = 8 -}}
|
||||
{{- else if hasPrefix $line0 " " -}}{{- $indent = 4 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $text = "" -}}
|
||||
{{- range $line := $lines -}}
|
||||
{{- if gt (len $line) $indent -}}
|
||||
{{- $l := substr $line $indent -}}
|
||||
{{- $text = printf "%s\n%s" $text $l -}}
|
||||
{{- else -}}
|
||||
{{- $text = printf "%s\n%s" $text $line -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $text = trim $text "\n" -}}
|
||||
{{- $text = partial "strip_indent.html" (dict "content" .Inner "pos" .Page.Position) -}}
|
||||
{{- $syntax = .Get 0 -}}
|
||||
{{- $output = .Get 1 -}}
|
||||
{{- else -}}
|
||||
{{- errorf "Text block does not specify a syntax (%s)" .Position -}}
|
||||
{{- $syntax = "plain" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if (hasPrefix $text " ") -}}
|
||||
|
@ -57,6 +37,13 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $result := "" -}}
|
||||
{{- if $downloadas -}}
|
||||
{{- $result = printf "<pre><code class='language-%s' data-expand='%s' data-downloadas='%s'>%s</code></pre>" $syntax $expand_links $downloadas (htmlEscape $text) -}}
|
||||
{{- else -}}
|
||||
{{- $result = printf "<pre><code class='language-%s' data-expand='%s'>%s</code></pre>" $syntax $expand_links (htmlEscape $text) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if eq $expand_links "true" -}}
|
||||
{{- /* include a dummy link to the special embedded @@ references so the links are statically checked as we build the site */ -}}
|
||||
{{- $branch := .Site.Data.args.source_branch_name -}}
|
||||
|
@ -64,14 +51,9 @@
|
|||
{{- range $link := $links -}}
|
||||
{{- $target := trim $link "@" -}}
|
||||
{{- if gt (len $target) 0 -}}
|
||||
{{- $href := printf "https://raw.githubusercontent.com/istio/istio/%s/%s" $branch $target -}}
|
||||
<a data-skipendnotes="true" style="display:none" href="{{- $href -}}">Hello</a>
|
||||
{{- $result = printf "<a data-skipendnotes='true' style='display:none' href='https://raw.githubusercontent.com/istio/istio/%s/%s'>Zip</a>%s" $branch $target $result -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $downloadas -}}
|
||||
<pre><code class='language-{{- $syntax -}}' data-expand='{{ $expand_links }}' data-downloadas='{{- $downloadas -}}'>{{- $text -}}</code></pre>
|
||||
{{- else -}}
|
||||
<pre><code class='language-{{- $syntax -}}' data-expand='{{ $expand_links }}'>{{- $text -}}</code></pre>
|
||||
{{- end -}}
|
||||
{{- $result | safeHTML -}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{- partial "large_icon.html" "callout-tip" -}}
|
||||
</div>
|
||||
<div class="content">
|
||||
{{- $trimmed := trim .Inner " \n" -}}
|
||||
{{- $trimmed | markdownify -}}
|
||||
{{- $text := partial "strip_indent.html" (dict "content" .Inner "pos" .Position) -}}
|
||||
{{- $text | markdownify -}}
|
||||
</div>
|
||||
</aside>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ partial "large_icon.html" "callout-warning" }}
|
||||
</div>
|
||||
<div class="content">
|
||||
{{- $trimmed := trim .Inner " \n" -}}
|
||||
{{- $trimmed | markdownify -}}
|
||||
{{- $text := partial "strip_indent.html" (dict "content" .Inner "pos" .Position) -}}
|
||||
{{- $text | markdownify -}}
|
||||
</div>
|
||||
</aside>
|
||||
|
|
|
@ -60,6 +60,13 @@ check_content() {
|
|||
FAILED=1
|
||||
fi
|
||||
|
||||
grep -nr -e "(https://preliminary.istio.io" .
|
||||
if [[ "$?" == "0" ]]
|
||||
then
|
||||
echo "Ensure markdown content doesn't contain references to preliminary.istio.io"
|
||||
FAILED=1
|
||||
fi
|
||||
|
||||
grep -nr -e "https://github.com/istio/istio/blob/" .
|
||||
if [[ "$?" == "0" ]]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue