Add conditional in dapr-latest-version shortcode for short version of explicit version

This commit is contained in:
Nick Greenfield 2021-09-09 16:47:17 -07:00
parent c9b45fdd52
commit a13da53ee5
3 changed files with 11 additions and 7 deletions

View File

@ -11,15 +11,15 @@ description: "Follow these steps to upgrade Dapr on Kubernetes and ensure a smoo
- [Dapr CLI]({{< ref install-dapr-cli.md >}}) - [Dapr CLI]({{< ref install-dapr-cli.md >}})
- [Helm 3](https://github.com/helm/helm/releases) (if using Helm) - [Helm 3](https://github.com/helm/helm/releases) (if using Helm)
## Upgrade existing cluster to {{% dapr-latest-version %}} ## Upgrade existing cluster to {{% dapr-latest-version %}}.0
There are two ways to upgrade the Dapr control plane on a Kubernetes cluster using either the Dapr CLI or Helm. There are two ways to upgrade the Dapr control plane on a Kubernetes cluster using either the Dapr CLI or Helm.
### Dapr CLI ### Dapr CLI
The example below shows how to upgrade to version {{% dapr-latest-version %}}: The example below shows how to upgrade to version {{% dapr-latest-version %}}.0:
```bash ```bash
dapr upgrade -k --runtime-version={{% dapr-latest-version %}} dapr upgrade -k --runtime-version={{% dapr-latest-version %}}.0
``` ```
You can provide all the available Helm chart configurations using the Dapr CLI. You can provide all the available Helm chart configurations using the Dapr CLI.
@ -43,7 +43,7 @@ To resolve this issue please run the follow command to upgrade the CustomResourc
kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/5a15b3e0f093d2d0938b12f144c7047474a290fe/charts/dapr/crds/configuration.yaml kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/5a15b3e0f093d2d0938b12f144c7047474a290fe/charts/dapr/crds/configuration.yaml
``` ```
Then proceed with the `dapr upgrade --runtime-version {{% dapr-latest-version %}} -k` command as above. Then proceed with the `dapr upgrade --runtime-version {{% dapr-latest-version %}}.0 -k` command as above.
### Helm ### Helm

View File

@ -30,6 +30,6 @@ description: "Follow these steps to upgrade Dapr in self-hosted mode and ensure
```bash ```bash
$ dapr --version $ dapr --version
CLI version: {{% dapr-latest-version %}} CLI version: {{% dapr-latest-version version="short" %}}
Runtime version: {{% dapr-latest-version %}} Runtime version: {{% dapr-latest-version version="short" %}}
``` ```

View File

@ -1 +1,5 @@
1.4.0 {{ if .Get "version" }}
1.4
{{ else }}
1.4.0
{{ end }}