Skip to content

Commit

Permalink
docs(readme): Kubernetes example wording
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 29, 2024
1 parent ff24ef9 commit 5d61d74
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Also, see [templating](#templating) and [example](#examples) sections.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
name: nginx
spec:
selector:
matchLabels:
Expand All @@ -184,7 +184,7 @@ Also, see [templating](#templating) and [example](#examples) sections.

Notice the yaml comment on the same line as `image`.

If this file was called `nginx.yaml`, then we could replace the image tag by running:
If this file was called `nginx.yaml`, then you could replace the image tag by running:
```shell
yampl -i nginx.yaml -v tag=1.21.6
```
Expand All @@ -194,7 +194,7 @@ Also, see [templating](#templating) and [example](#examples) sections.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
name: nginx
spec:
selector:
matchLabels:
Expand All @@ -211,13 +211,13 @@ Also, see [templating](#templating) and [example](#examples) sections.
- containerPort: 80
```

If I wanted to repeat myself even less, I could utilize the `repo` function to pull the existing repo through.
I could define the `image` template as:
If you wanted to repeat yourself even less, you could use the [`repo`](#repo) function to pull the existing repo through to the output.
For example, you could change the `image` line to:
```yaml
image: nginx:1.21.6 #yampl {{ repo current }}:{{ .tag }}
```

This would generate the same output, but I didn't have to type `nginx` twice.
This would generate the same output, but you wouldn't have to type `nginx` twice.
This becomes more useful when using custom Docker registries where repo names can get long.
</details>
Expand Down

0 comments on commit 5d61d74

Please sign in to comment.