From 845473cbfb92bf1b761f8be6388800b722f08fe5 Mon Sep 17 00:00:00 2001 From: adripedriza Date: Fri, 30 Sep 2022 16:15:54 +0200 Subject: [PATCH 1/6] add docs about push helm chart into okteto registry Signed-off-by: adripedriza --- src/content/cloud/registry.mdx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/content/cloud/registry.mdx b/src/content/cloud/registry.mdx index 00ce08cef..bff5f65b4 100644 --- a/src/content/cloud/registry.mdx +++ b/src/content/cloud/registry.mdx @@ -50,3 +50,25 @@ Any image pushed into the Okteto Registry is private. You'll need to authenticat Namespaces in Okteto Cloud are automatically allowed to pull images that belong to their namespace automatically. If your application uses images from the Okteto Registry, it'll be able to pull container images without any extra configuration. To pull an image from a different namespace, you'll need to create and configure the required `imagePullSecrets` as outlined [here](/docs/reference/faqs/#how-to-use-private-images). + +## Push helm chart into the Okteto Registry + +Just as we can push images to the Okteto Registry, you also have the option to push helm charts. To do this, the first step is to login to the registry where we want to push the chart: + +``` +helm registry login -u +``` + +Once you are logged against the Okteto Registry and packaged the chart, you are able to push the chart to the Okteto Registry. + +``` +helm push oci:/// +``` + +Once the packaged chart has been pushed to the Okteto Registry, you can pull to make use of it. + +``` +helm pull oci://// +``` + +> Note: It is necessary to use the expanded notation to reference the URL of the Okteto Registry. \ No newline at end of file From 3700e88fb16f0a050accf46d71bb784fa46ad447 Mon Sep 17 00:00:00 2001 From: adripedriza Date: Mon, 3 Oct 2022 11:03:39 +0200 Subject: [PATCH 2/6] addressing comments Signed-off-by: adripedriza --- src/content/cloud/registry.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/cloud/registry.mdx b/src/content/cloud/registry.mdx index bff5f65b4..26f10f9ed 100644 --- a/src/content/cloud/registry.mdx +++ b/src/content/cloud/registry.mdx @@ -53,22 +53,22 @@ To pull an image from a different namespace, you'll need to create and configure ## Push helm chart into the Okteto Registry -Just as we can push images to the Okteto Registry, you also have the option to push helm charts. To do this, the first step is to login to the registry where we want to push the chart: +Just as we can push images to the Okteto Registry, you also have the option to push Helm charts. To do this, the first step is to log in to the registry where we want to push the chart: ``` -helm registry login -u +helm registry login registry.cloud.okteto.net -u my-username -p my-password ``` -Once you are logged against the Okteto Registry and packaged the chart, you are able to push the chart to the Okteto Registry. +Once you are logged against the Okteto Registry you can push the packaged chart to the Okteto Registry by using the command below: ``` -helm push oci:/// +helm push ./movies-api-0.1.0.tgz oci://registry.cloud.okteto.net/my-namespace ``` -Once the packaged chart has been pushed to the Okteto Registry, you can pull to make use of it. +Once the packaged chart has been pushed to the Okteto Registry, you can pull it by using the command below: ``` -helm pull oci://// +helm pull oci://registry.cloud.okteto.net/my-namespace/movies-api --version 0.1.0 ``` -> Note: It is necessary to use the expanded notation to reference the URL of the Okteto Registry. \ No newline at end of file +> Note: This example is using the registry for Cloud. You need adapt the registry domain and namespace name to your case using the notation `oci:///`. \ No newline at end of file From a6be948be97935ab58e9dc22191b903cd2e07616 Mon Sep 17 00:00:00 2001 From: adripedriza Date: Tue, 4 Oct 2022 11:10:29 +0200 Subject: [PATCH 3/6] update docs --- src/content/cloud/registry.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/cloud/registry.mdx b/src/content/cloud/registry.mdx index 26f10f9ed..eee174884 100644 --- a/src/content/cloud/registry.mdx +++ b/src/content/cloud/registry.mdx @@ -53,12 +53,14 @@ To pull an image from a different namespace, you'll need to create and configure ## Push helm chart into the Okteto Registry -Just as we can push images to the Okteto Registry, you also have the option to push Helm charts. To do this, the first step is to log in to the registry where we want to push the chart: +Just as you can push images to the Okteto Registry, you also have the option to push Helm charts. To do this, the first step is to log in to the registry where you want to push the chart: ``` helm registry login registry.cloud.okteto.net -u my-username -p my-password ``` +You can get your credentials needed to log in with Helm against the Okteto Registry by running the `okteto context show` command. With it you can retrieve your username, password (token) and the domain from your registry. + Once you are logged against the Okteto Registry you can push the packaged chart to the Okteto Registry by using the command below: ``` From 0b3e2c75671407f887a6b1ea44b955d6f30d6afe Mon Sep 17 00:00:00 2001 From: adripedriza Date: Thu, 6 Oct 2022 09:54:10 +0200 Subject: [PATCH 4/6] update docs Signed-off-by: adripedriza --- src/content/cloud/registry.mdx | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/content/cloud/registry.mdx b/src/content/cloud/registry.mdx index eee174884..4e45df6d5 100644 --- a/src/content/cloud/registry.mdx +++ b/src/content/cloud/registry.mdx @@ -53,15 +53,35 @@ To pull an image from a different namespace, you'll need to create and configure ## Push helm chart into the Okteto Registry -Just as you can push images to the Okteto Registry, you also have the option to push Helm charts. To do this, the first step is to log in to the registry where you want to push the chart: +Just as you can push images to the Okteto Registry, you also have the option to push Helm charts. To do this, the first step is to log in to the registry where you want to push the chart. For this you will need some credentials that you can obtain by executing the `okteto context show` command. This command will show you information about the current okteto context in use. ``` -helm registry login registry.cloud.okteto.net -u my-username -p my-password +{ + "name": "https://cloud.okteto.com", + "id": "3cf4529c-1gbd-4364-99cf-3f4bbe499adb", + "username": "CindyLopez", + "token": "i3kDEh4FKqrJzY7e7Qamd8CfTTrjkPOTN5ftHoKl", + "namespace": "cindy-namespace", + "builder": "tcp://buildkit.cloud.okteto.net:1234", + "registry": "registry.cloud.okteto.net", + "personalNamespace": "cindylopez", + "isOkteto": true +} ``` -You can get your credentials needed to log in with Helm against the Okteto Registry by running the `okteto context show` command. With it you can retrieve your username, password (token) and the domain from your registry. +You can retrieve your username, password (token), and the domain for your registry from the output. -Once you are logged against the Okteto Registry you can push the packaged chart to the Okteto Registry by using the command below: +``` +helm registry login registry.cloud.okteto.net -u CindyLopez -p i3kDEh4FKqrJzY7e7Qamd8CfTTrjkPOTN5ftHoKl +``` + +Once you are logged in you will need to package the chart. + +``` +helm package ./chart +``` + +After that you can push the packaged Helm chart to the registry. ``` helm push ./movies-api-0.1.0.tgz oci://registry.cloud.okteto.net/my-namespace @@ -73,4 +93,4 @@ Once the packaged chart has been pushed to the Okteto Registry, you can pull it helm pull oci://registry.cloud.okteto.net/my-namespace/movies-api --version 0.1.0 ``` -> Note: This example is using the registry for Cloud. You need adapt the registry domain and namespace name to your case using the notation `oci:///`. \ No newline at end of file +> Note: This example uses Okteto Cloud's registry. Remember to change the registry domain and namespace name if needed, by using the following notation `oci:///`. \ No newline at end of file From 75e26acbd9b3347a423630167346024827988edb Mon Sep 17 00:00:00 2001 From: adripedriza Date: Thu, 6 Oct 2022 10:52:01 +0200 Subject: [PATCH 5/6] update docs Signed-off-by: adripedriza --- src/content/cloud/registry.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/cloud/registry.mdx b/src/content/cloud/registry.mdx index 4e45df6d5..5f56c8bff 100644 --- a/src/content/cloud/registry.mdx +++ b/src/content/cloud/registry.mdx @@ -84,13 +84,13 @@ helm package ./chart After that you can push the packaged Helm chart to the registry. ``` -helm push ./movies-api-0.1.0.tgz oci://registry.cloud.okteto.net/my-namespace +helm push ./movies-api-0.1.0.tgz oci://registry.cloud.okteto.net/cindy-namespace ``` Once the packaged chart has been pushed to the Okteto Registry, you can pull it by using the command below: ``` -helm pull oci://registry.cloud.okteto.net/my-namespace/movies-api --version 0.1.0 +helm pull oci://registry.cloud.okteto.net/cindy-namespace/movies-api --version 0.1.0 ``` > Note: This example uses Okteto Cloud's registry. Remember to change the registry domain and namespace name if needed, by using the following notation `oci:///`. \ No newline at end of file From 0332c185260bda488f8a9a82cfac3b0b38296771 Mon Sep 17 00:00:00 2001 From: adripedriza Date: Tue, 11 Oct 2022 13:33:46 +0200 Subject: [PATCH 6/6] update docs Signed-off-by: adripedriza --- src/content/cloud/registry.mdx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/content/cloud/registry.mdx b/src/content/cloud/registry.mdx index 5f56c8bff..e01abad0b 100644 --- a/src/content/cloud/registry.mdx +++ b/src/content/cloud/registry.mdx @@ -69,10 +69,10 @@ Just as you can push images to the Okteto Registry, you also have the option to } ``` -You can retrieve your username, password (token), and the domain for your registry from the output. +You can retrieve your username, password (token), and the domain for your registry from the output. Using the [deploy section](https://www.okteto.com/docs/reference/cli/#deploy) of the manifest, you can use these values using the `OKTETO_USERNAME`, `OKTETO_TOKEN`, `OKTETO_NAMESPACE` and `OKTETO_REGISTRY` environment variables since Okteto will resolve their values for you. If the commands are not executed through the manifest, then you must define the values for these environment variables. ``` -helm registry login registry.cloud.okteto.net -u CindyLopez -p i3kDEh4FKqrJzY7e7Qamd8CfTTrjkPOTN5ftHoKl +helm registry login ${OKTETO_REGISTRY} -u ${OKTETO_USERNAME} -p ${OKTETO_TOKEN} ``` Once you are logged in you will need to package the chart. @@ -84,13 +84,11 @@ helm package ./chart After that you can push the packaged Helm chart to the registry. ``` -helm push ./movies-api-0.1.0.tgz oci://registry.cloud.okteto.net/cindy-namespace +helm push ./movies-api-0.1.0.tgz oci://${OKTETO_REGISTRY}/${OKTETO_NAMESPACE} ``` Once the packaged chart has been pushed to the Okteto Registry, you can pull it by using the command below: ``` -helm pull oci://registry.cloud.okteto.net/cindy-namespace/movies-api --version 0.1.0 -``` - -> Note: This example uses Okteto Cloud's registry. Remember to change the registry domain and namespace name if needed, by using the following notation `oci:///`. \ No newline at end of file +helm pull oci://${OKTETO_REGISTRY}/${OKTETO_NAMESPACE}/movies-api --version 0.1.0 +``` \ No newline at end of file