MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.25k stars 21.43k forks source link

Import page and scenario needs to be added. #117098

Closed porrascarlos802018 closed 4 months ago

porrascarlos802018 commented 11 months ago

Current website deals with creating from scratch a helm chat and pushing it to a Azure Container registry.

can we get an scenario added for importing pre existing images and pushing them and uploading them?

Something like:

helm version version.BuildInfo{Version:"v3.11.2", GitCommit:"912ebc1cd10d38d340f048efaf0abda047c3468e", GitTreeState:"clean", GoVersion:"go1.18.10"}

ACR_NAME=

USER_NAME="helmtoken" WORD PASSWORD=$(az acr token create -n $USER_NAME -r $ACR_NAME --scope-map _repositories_admin --only-show-errors --query "credentials.passwords[0].value" -o tsv)

helm registry login $ACR_NAME.azurecr.io \

--username $USER_NAME \ --password $PASSWORD WARNING: Using --password via the CLI is insecure. Use --password-stdin. Login Succeeded

REGISTRY_NAME= SOURCE_REGISTRY=registry.k8s.io CONTROLLER_IMAGE=ingress-nginx/controller CONTROLLER_TAG=v1.8.1 PATCHIMAGE=ingress-nginx/kube-webhook-certgen TCH PATCH_TAG=v20230407 DEFAULTBACKEND_IMAGE=defaultbackend-amd64 DEFA DEFAULTBACKEND_TAG=1.5

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx helm repo update Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "ingress-nginx" chart repository Update Complete. ⎈Happy Helming!⎈ REGISTRY_NAME= SOURCE_REGISTRY=registry.k8s.io CONTROLLER_IMAGE=ingress-nginx/controller CONTROLLER_TAG=v1.8.1 PATCH_IMAGE=ingress-nginx/kube-webhook-certgen PATCH_TAG=v20230407 DEFAULTBACKEND_IMAGE=defaultbackend-amd64 DEFAULTBACKEND_TAG=1.5

az acr import --name $REGISTRY_NAME --source $SOURCE_REGISTRY/$CONTROLLER_IMAGE:$CONTROLLER_TAG --image $CONTROLLER_IMAGE:$CONTROLLER_TAG az acr import --name $REGISTRY_NAME --source $SOURCE_REGISTRY/$PATCH_IMAGE:$PATCH_TAG --image $PATCH_IMAGE:$PATCH_TAG az acr import --name $REGISTRY_NAME --source $SOURCE_REGISTRY/$DEFAULTBACKEND_IMAGE:$DEFAULTBACKEND_TAG --image $DEFAULTBACKEND_IMAGE:$DEFAULTBACKEND_TAG helm fetch ingress-nginx/ingress-nginx

dir

ingress-nginx-4.8.3.tgz

helm push ingress-nginx-4.8.3.tgz oci://$ACR_NAME.azurecr.io/helm Pushed: acrtestcpa.azurecr.io/helm/ingress-nginx:4.8.3 Digest: sha256:668798862c4fda7042f41b0d941978cdf8def49f72b863204523d39c2ac6db78 az acr repository show --name $ACR_NAME --repository helm/ingress-nginx { "changeableAttributes": { "deleteEnabled": true, "listEnabled": true, "readEnabled": true, "writeEnabled": true }, "createdTime": "2023-11-14T20:55:36.2242214Z", "imageName": "helm/ingress-nginx", "lastUpdateTime": "2023-11-14T20:55:36.3125787Z", "manifestCount": 1, "registry": "acrtestcpa.azurecr.io", "tagCount": 1 }

ACR_URL=.azurecr.io

helm install ingress-nginx oci://$ACR_NAME.azurecr.io/helm/ingress-nginx --version 4.8.3 --version 4.8.3 \ --namespace ingress-basic \ --create-namespace \ --set controller.replicaCount=2 \ --set controller.nodeSelector."kubernetes.io/os"=linux \ --set controller.image.registry=$ACR_URL \ --set controller.image.image=$CONTROLLER_IMAGE \ --set controller.image.tag=$CONTROLLER_TAG \ --set controller.image.digest="" \ --set controller.admissionWebhooks.patch.nodeSelector."kubernetes.io/os"=linux \ --set controller.service.annotations."service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path"=/healthz \ --set controller.admissionWebhooks.patch.image.registry=$ACR_URL \ --set controller.admissionWebhooks.patch.image.image=$PATCH_IMAGE \ --set controller.admissionWebhooks.patch.image.tag=$PATCH_TAG \ --set controller.admissionWebhooks.patch.image.digest="" \ --set defaultBackend.nodeSelector."kubernetes.io/os"=linux \ --set defaultBackend.image.registry=$ACR_URL \ --set defaultBackend.image.image=$DEFAULTBACKEND_IMAGE \ --set defaultBackend.image.tag=$DEFAULTBACKEND_TAG \ --set defaultBackend.image.digest="" \ --set meta.helm.sh/release-name=”ingress-nginx”

Reference documentation: https://learn.microsoft.com/en-us/azure/aks/ingress-basic?tabs=azure-cli https://learn.microsoft.com/en-us/azure/container-registry/container-registry-helm-repos


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Naveenommi-MSFT commented 11 months ago

@porrascarlos802018 Thanks for your feedback! We will investigate and update as appropriate.

AjayBathini-MSFT commented 11 months ago

@porrascarlos802018 Thanks for bringing this to our attention. I'm going to assign this to the document author so they can take a look at it accordingly.

tejaswikolli-web commented 4 months ago

We would like more clarifications on exceptions and requirements before changing our documents.

We created a workitem. https://msazure.visualstudio.com/AzureContainerRegistry/_queries/edit/27254113/?triage=true

tejaswikolli-web commented 4 months ago

please-close