Create hidden links for the special @@ references. (#1686)

This gives us link checking for the @@ code block references.
This commit is contained in:
Martin Taillefer 2018-07-06 07:31:31 -07:00 committed by GitHub
parent 9765bf65ca
commit 69c04f6401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 6 deletions

View File

@ -36,13 +36,13 @@ recommended.
(requires Kubernetes >=1.9.0):
{{< text bash >}}
$ helm template @install/kubernetes/helm/istio@ --name istio --namespace istio-system > $HOME/istio.yaml
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system > $HOME/istio.yaml
{{< /text >}}
* Without the sidecar injection webhook:
{{< text bash >}}
$ helm template @install/kubernetes/helm/istio@ --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false > $HOME/istio.yaml
$ helm template install/kubernetes/helm/istio --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false > $HOME/istio.yaml
{{< /text >}}
1. Install the components via the manifest:
@ -77,13 +77,13 @@ to manage the lifecycle of Istio.
* With [automatic sidecar injection](/docs/setup/kubernetes/sidecar-injection/#automatic-sidecar-injection) (requires Kubernetes >=1.9.0):
{{< text bash >}}
$ helm install @install/kubernetes/helm/istio@ --name istio --namespace istio-system
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system
{{< /text >}}
* Without the sidecar injection webhook:
{{< text bash >}}
$ helm install @install/kubernetes/helm/istio@ --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false
$ helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set sidecarInjectorWebhook.enabled=false
{{< /text >}}
## Customization with Helm

View File

@ -178,7 +178,7 @@ The values used for internal IP range(s), however, depends on where your cluster
For example, with Minikube the range is 10.0.0.1&#47;24, so you would update your `ConfigMap` _istio-sidecar-injector_ like this:
{{< text bash >}}
$ helm template @install/kubernetes/helm/istio@ <the flags you used to install Istio> --set global.proxy.includeIPRanges="10.0.0.1/24" -x templates/sidecar-injector-configmap.yaml | kubectl apply -f -
$ helm template install/kubernetes/helm/istio <the flags you used to install Istio> --set global.proxy.includeIPRanges="10.0.0.1/24" -x templates/sidecar-injector-configmap.yaml | kubectl apply -f -
{{< /text >}}
Note that you should use the same Helm command you used [to install Istio](/docs/setup/kubernetes/helm-install),
@ -276,5 +276,5 @@ cloud provider specific knowledge and configuration.
1. Update the `ConfigMap` _istio-sidecar-injector_ to redirect all outbound traffic to the sidecar proxies:
{{< text bash >}}
$ helm template @install/kubernetes/helm/istio@ <the flags you used to install Istio> -x templates/sidecar-injector-configmap.yaml | kubectl apply -f -
$ helm template install/kubernetes/helm/istio <the flags you used to install Istio> -x templates/sidecar-injector-configmap.yaml | kubectl apply -f -
{{< /text >}}

View File

@ -46,3 +46,10 @@ be invalid HTML
{{ end }}
{{ end }}
<pre><code class='language-{{ $scratch.Get "syntax" }}' data-downloadas='{{ $scratch.Get "downloadas" }}'>{{ $scratch.Get "text" }}</code></pre>
{{/* include a link to the special embedded @@ references so the links are statically checked as we build the site */}}
{{ $branch := .Site.Data.args.branch_name }}
{{ $links := findRE "@(.*?)@" ($scratch.Get "text") }}
{{ range $link := $links }}
{{ $href := printf "https://raw.githubusercontent.com/istio/istio/%s/%s" $branch (trim $link "@") }}
<a hidden style="display:none" href="{{ $href }}"></a>
{{ end }}