From 6f75254db194ed8561ae547fb2ccf6827ddecb3a Mon Sep 17 00:00:00 2001 From: Pravin Pushkar Date: Sat, 2 Jul 2022 05:42:21 +0530 Subject: [PATCH] Docs for dapr int/upgrade in k8s mode using GHCR and private registry (#2508) * Update docs for dapr int/upgrade in k8s mode using GHCR and private registry Signed-off-by: Pravin Pushkar * Addressing review comments Signed-off-by: Pravin Pushkar Co-authored-by: Mark Fussell --- daprdocs/content/en/reference/cli/dapr-init.md | 13 ++++++++++++- daprdocs/content/en/reference/cli/dapr-upgrade.md | 9 +++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/cli/dapr-init.md b/daprdocs/content/en/reference/cli/dapr-init.md index 566176220..019da8627 100644 --- a/daprdocs/content/en/reference/cli/dapr-init.md +++ b/daprdocs/content/en/reference/cli/dapr-init.md @@ -38,7 +38,7 @@ dapr init [flags] | `--slim`, `-s` | | `false` | Exclude placement service, Redis and Zipkin containers from self-hosted installation | | `--timeout` | | `300` | The wait timeout for the Kubernetes installation | | `--wait` | | `false` | Wait for Kubernetes initialization to complete | -| N/A |DAPR_DEFAULT_IMAGE_REGISTRY| | In self hosted mode, it is used to specify the default container registry to pull images from. When its value is set to `GHCR` or `ghcr` it pulls the required images from Github container registry. To default to Docker hub as default, just unset this env variable.| +| N/A |DAPR_DEFAULT_IMAGE_REGISTRY| | It is used to specify the default container registry to pull images from. When its value is set to `GHCR` or `ghcr` it pulls the required images from Github container registry. To default to Docker hub, unset the environment variable or leave it blank| ### Examples @@ -119,4 +119,15 @@ Use the `--set` flag to configure a set of [Helm Chart values](https://github.co ```bash dapr init -k --set global.tag=1.0.0 --set dapr_operator.logLevel=error +``` + +You can also specify a private registry to pull container images from. As of now `dapr init -k` does not use specific images for sentry, operator, placement and sidecar. It relies on only Dapr runtime container image `dapr` for all these images. + +Scenario 1 : dapr image hosted directly under root folder in private registry - +```bash +dapr init -k --image-registry docker.io/username +``` +Scenario 2 : dapr image hosted under a new/different directory in private registry - +```bash +dapr init -k --image-registry docker.io/username/ ``` \ No newline at end of file diff --git a/daprdocs/content/en/reference/cli/dapr-upgrade.md b/daprdocs/content/en/reference/cli/dapr-upgrade.md index a58d025b6..ef55cd11d 100644 --- a/daprdocs/content/en/reference/cli/dapr-upgrade.md +++ b/daprdocs/content/en/reference/cli/dapr-upgrade.md @@ -33,6 +33,7 @@ dapr upgrade [flags] | `--kubernetes`, `-k` | | `false` | Upgrade/Downgrade Dapr in a Kubernetes cluster | | `--runtime-version` | | `latest` | The version of the Dapr runtime to upgrade/downgrade to, for example: `1.0.0` | | `--set` | | | Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) | +| `--image-registry` | | | Pulls container images required by Dapr from the given image registry | ### Examples @@ -46,6 +47,14 @@ dapr upgrade -k --runtime-version 1.2 # Upgrade or downgrade to a specified version of Dapr runtime in Kubernetes with value set dapr upgrade -k --runtime-version 1.2 --set global.logAsJson=true ``` +```bash +# Upgrade or downgrade using private registry, if you are using private registry for hosting dapr images and have used it while doing `dapr init -k` +# Scenario 1 : dapr image hosted directly under root folder in private registry - +dapr init -k --image-registry docker.io/username +# Scenario 2 : dapr image hosted under a new/different directory in private registry - +dapr init -k --image-registry docker.io/username/ +``` + ### Warning messages This command can issue warning messages.