Merge pull request #9626 from FrankYang0529/fix/render-double-curly-braces

fix(docs): render double curly braces
This commit is contained in:
Kubernetes Prow Robot 2020-07-24 14:16:16 -07:00 committed by GitHub
commit 0bf54419ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 20 deletions

View File

@ -57,20 +57,20 @@ one file per range of Kubernetes versions. These files are referenced by upup/pk
First we add to the `cilium-config` ConfigMap: First we add to the `cilium-config` ConfigMap:
```go ```go
{{ with .Ipam }} {{ '{{ with .Ipam }}' }}
ipam: {{ . }} ipam: {{ '{{ . }}' }}
{{ if eq . "eni" }} {{ '{{ if eq . "eni" }}' }}
enable-endpoint-routes: "true" enable-endpoint-routes: "true"
auto-create-cilium-node-resource: "true" auto-create-cilium-node-resource: "true"
blacklist-conflicting-routes: "false" blacklist-conflicting-routes: "false"
{{ end }} {{ '{{ end }}' }}
{{ end }} {{ '{{ end }}' }}
``` ```
Then we conditionally move cilium-operator to masters: Then we conditionally move cilium-operator to masters:
```go ```go
{{ if eq .Ipam "eni" }} {{ '{{ if eq .Ipam "eni" }}' }}
nodeSelector: nodeSelector:
node-role.kubernetes.io/master: "" node-role.kubernetes.io/master: ""
tolerations: tolerations:
@ -84,7 +84,7 @@ Then we conditionally move cilium-operator to masters:
key: node.kubernetes.io/unreachable key: node.kubernetes.io/unreachable
operator: Exists operator: Exists
tolerationSeconds: 300 tolerationSeconds: 300
{{ end }} {{ '{{ end }}' }}
``` ```
## Configuring kubelet ## Configuring kubelet

View File

@ -13,11 +13,11 @@ apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup kind: InstanceGroup
metadata: metadata:
labels: labels:
kops.k8s.io/cluster: {{.clusterName}}.{{.dnsZone}} kops.k8s.io/cluster: {{ '{{.clusterName}}.{{.dnsZone}}' }}
name: nodes name: nodes
spec: spec:
image: coreos.com/CoreOS-stable-1409.6.0-hvm image: coreos.com/CoreOS-stable-1409.6.0-hvm
kubernetesVersion: {{.kubernetesVersion} kubernetesVersion: {{ '{{.kubernetesVersion}}' }}
machineType: m4.large machineType: m4.large
maxPrice: "0.5" maxPrice: "0.5"
maxSize: 20 maxSize: 20
@ -25,9 +25,9 @@ spec:
role: Node role: Node
rootVolumeSize: 100 rootVolumeSize: 100
subnets: subnets:
- {{.awsRegion}}a - {{ '{{.awsRegion}}' }}a
- {{.awsRegion}}b - {{ '{{.awsRegion}}' }}b
- {{.awsRegion}}c - {{ '{{.awsRegion}}' }}c
``` ```
You can pass configuration such as an environment file by using the `--values PATH` command line option. Note `--values` is a slice so can be defined multiple times; the configuration is overridden by each configuration file *(so order is important assuming duplicating values)*; a use-case for this would be a default configuration which upstream clusters can override. You can pass configuration such as an environment file by using the `--values PATH` command line option. Note `--values` is a slice so can be defined multiple times; the configuration is overridden by each configuration file *(so order is important assuming duplicating values)*; a use-case for this would be a default configuration which upstream clusters can override.
@ -108,15 +108,15 @@ The example below assumes you have placed the appropriate files i.e. *(nodes.jso
apiVersion: kops.k8s.io/v1alpha2 apiVersion: kops.k8s.io/v1alpha2
kind: Cluster kind: Cluster
metadata: metadata:
name: {{ .environment }}.{{ .dns_zone }} name: {{ '{{ .environment }}.{{ .dns_zone }}' }}
spec: spec:
docker: docker:
{{ include "docker" . | indent 4 }} {{ '{{ include "docker" . | indent 4 }}' }}
additionalPolicies: additionalPolicies:
master: | master: |
{{ include "masters.json" . | indent 6 }} {{ '{{ include "masters.json" . | indent 6 }}' }}
node: | node: |
{{ include "nodes.json" . | indent 6 }} {{ '{{ include "nodes.json" . | indent 6 }}' }}
``` ```
### Template Functions ### Template Functions
@ -124,10 +124,10 @@ spec:
The entire set of https://github.com/Masterminds/sprig functions are available within the templates for you. Note if you want to use the 'defaults' functions switch off the verification check on the command line by `--fail-on-missing=false`; The entire set of https://github.com/Masterminds/sprig functions are available within the templates for you. Note if you want to use the 'defaults' functions switch off the verification check on the command line by `--fail-on-missing=false`;
```YAML ```YAML
image: {{ default $image $node.image }} image: {{ '{{ default $image $node.image }}' }}
machineType: {{ default $instance $node.machine_type }} machineType: {{ '{{ default $instance $node.machine_type }}' }}
maxSize: {{ default "10" $node.max_size }} maxSize: {{ '{{ default "10" $node.max_size }}' }}
minSize: {{ default "1" $node.min_size }} minSize: {{ '{{ default "1" $node.min_size }}' }}
``` ```
### Formatting ### Formatting