Create a site parameter and shortcode for "latestversion".

This gives us a single line of YAML to edit when we want to bump our docs to the latest version number.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2021-07-28 13:55:41 -05:00
parent d73093a694
commit ca82609d1a
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D
6 changed files with 19 additions and 17 deletions

View File

@ -7,6 +7,7 @@ params:
github_url: "https://github.com/vmware-tanzu/pinniped"
slack_url: "https://kubernetes.slack.com/messages/pinniped"
community_url: "https://go.pinniped.dev/community"
latest_version: v0.9.2
pygmentsCodefences: true
pygmentsStyle: "pygments"
markup:

View File

@ -46,15 +46,15 @@ Click Open to allow the command to proceed.
Choose your preferred [release](https://github.com/vmware-tanzu/pinniped/releases) version number and use it to replace the version number in the URL below.
For example, to install v0.9.2 on Linux/amd64:
For example, to install {{< latestversion >}} on Linux/amd64:
```sh
curl -Lso pinniped https://get.pinniped.dev/v0.9.2/pinniped-cli-linux-amd64 \
curl -Lso pinniped https://get.pinniped.dev/{{< latestversion >}}/pinniped-cli-linux-amd64 \
&& chmod +x pinniped \
&& sudo mv pinniped /usr/local/bin/pinniped
```
*Replace v0.9.2 with your preferred version number.*
*Replace {{< latestversion >}} with your preferred version number.*
## Next steps

View File

@ -17,7 +17,7 @@ You should have a [supported Kubernetes cluster]({{< ref "../reference/supported
1. Install the latest version of the Concierge into the `pinniped-concierge` namespace with default options:
- `kubectl apply -f https://get.pinniped.dev/latest/install-pinniped-concierge.yaml`
Warning: the default configuration may create a public LoadBalancer Service on your cluster.
## With specific version and default options
@ -26,9 +26,9 @@ Warning: the default configuration may create a public LoadBalancer Service on y
1. Install the Concierge into the `pinniped-concierge` namespace with default options:
- `kubectl apply -f https://get.pinniped.dev/v0.9.2/install-pinniped-concierge.yaml`
- `kubectl apply -f https://get.pinniped.dev/{{< latestversion >}}/install-pinniped-concierge.yaml`
*Replace v0.9.2 with your preferred version number.*
*Replace {{< latestversion >}} with your preferred version number.*
## With custom options
@ -43,16 +43,16 @@ Pinniped uses [ytt](https://carvel.dev/ytt/) from [Carvel](https://carvel.dev/)
1. Decide which release version you would like to install. All release versions are [listed on GitHub](https://github.com/vmware-tanzu/pinniped/releases).
1. Checkout your preferred version tag, e.g. `v0.9.2`.
1. Checkout your preferred version tag, e.g. `{{< latestversion >}}`.
- `git checkout v0.9.2`
- `git checkout {{< latestversion >}}`
*Replace v0.9.2 with your preferred version number.*
*Replace {{< latestversion >}} with your preferred version number.*
1. Customize configuration parameters:
- Edit `values.yaml` with your custom values.
- Change the `image_tag` value to match your preferred version tag, e.g. `v0.9.2`. *Replace v0.9.2 with your preferred version number.*
- Change the `image_tag` value to match your preferred version tag, e.g. `{{< latestversion >}}`. *Replace {{< latestversion >}} with your preferred version number.*
- See the [default values](http://github.com/vmware-tanzu/pinniped/tree/main/deploy/concierge/values.yaml) for documentation about individual configuration parameters.
1. Render templated YAML manifests:

View File

@ -25,9 +25,9 @@ You should have a supported Kubernetes cluster with working HTTPS ingress capabi
1. Install the Supervisor into the `pinniped-supervisor` namespace with default options:
- `kubectl apply -f https://get.pinniped.dev/v0.9.2/install-pinniped-supervisor.yaml`
- `kubectl apply -f https://get.pinniped.dev/{{< latestversion >}}/install-pinniped-supervisor.yaml`
*Replace v0.9.2 with your preferred version number.*
*Replace {{< latestversion >}} with your preferred version number.*
## With custom options
@ -42,16 +42,16 @@ Pinniped uses [ytt](https://carvel.dev/ytt/) from [Carvel](https://carvel.dev/)
1. Decide which release version you would like to install. All release versions are [listed on GitHub](https://github.com/vmware-tanzu/pinniped/releases).
1. Checkout your preferred version tag, e.g. `v0.9.2`.
1. Checkout your preferred version tag, e.g. `{{< latestversion >}}`.
- `git checkout v0.9.2`
- `git checkout {{< latestversion >}}`
*Replace v0.9.2 with your preferred version number.*
*Replace {{< latestversion >}} with your preferred version number.*
1. Customize configuration parameters:
- Edit `values.yaml` with your custom values.
- Change the `image_tag` value to match your preferred version tag, e.g. `v0.9.2`. *Replace v0.9.2 with your preferred version number.*
- Change the `image_tag` value to match your preferred version tag, e.g. `{{< latestversion >}}`. *Replace {{< latestversion >}} with your preferred version number.*
- See the [default values](http://github.com/vmware-tanzu/pinniped/tree/main/deploy/supervisor/values.yaml) for documentation about individual configuration parameters.
1. Render templated YAML manifests:

View File

@ -79,7 +79,7 @@ as the authenticator.
see [deploy/local-user-authenticator/README.md](https://github.com/vmware-tanzu/pinniped/blob/main/deploy/local-user-authenticator/README.md)
for instructions on how to deploy using `ytt`.
If you prefer to install a specific version, replace `latest` in the URL with the version number such as `v0.9.2`.
If you prefer to install a specific version, replace `latest` in the URL with the version number such as `{{< latestversion >}}`.
1. Create a test user named `pinny-the-seal` in the local-user-authenticator namespace.

View File

@ -0,0 +1 @@
{{ .Site.Params.latest_version }}