Skip to content

Commit d837218

Browse files
authored
Merge pull request #207867 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-docs (branch main)
2 parents d97024c + c70ff1c commit d837218

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

articles/container-registry/container-registry-authentication.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ Using `Connect-AzContainerRegistry` with Azure identities provides [Azure role-b
112112

113113
If you assign a [service principal](../active-directory/develop/app-objects-and-service-principals.md) to your registry, your application or service can use it for headless authentication. Service principals allow [Azure role-based access control (Azure RBAC)](../role-based-access-control/role-assignments-portal.md) to a registry, and you can assign multiple service principals to a registry. Multiple service principals allow you to define different access for different applications.
114114

115+
ACR authentication token gets created upon login to the ACR, and is refreshed upon subsequent operations. The time to live for that token is 3 hours.
116+
115117
The available roles for a container registry include:
116118

117119
* **AcrPull**: pull

articles/container-registry/container-registry-delete.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The following Azure CLI command lists all manifest digests in a repository older
107107

108108
```azurecli
109109
az acr manifest list-metadata --name <repositoryName> --registry <acrName> <repositoryName> \
110-
--orderby time_asc -o tsv --query "[?timestamp < '2019-04-05'].[digest, timestamp]"
110+
--orderby time_asc -o tsv --query "[?lastUpdateTime < '2019-04-05'].[digest, lastUpdateTime]"
111111
```
112112

113113
After identifying stale manifest digests, you can run the following Bash script to delete manifest digests older than a specified timestamp. It requires the Azure CLI and **xargs**. By default, the script performs no deletion. Change the `ENABLE_DELETE` value to `true` to enable image deletion.
@@ -136,13 +136,13 @@ TIMESTAMP=2019-04-05
136136
if [ "$ENABLE_DELETE" = true ]
137137
then
138138
az acr manifest list-metadata --name $REPOSITORY --registry $REGISTRY \
139-
--orderby time_asc --query "[?timestamp < '$TIMESTAMP'].digest" -o tsv \
139+
--orderby time_asc --query "[?lastUpdateTime < '$TIMESTAMP'].digest" -o tsv \
140140
| xargs -I% az acr repository delete --name $REGISTRY --image $REPOSITORY@% --yes
141141
else
142142
echo "No data deleted."
143143
echo "Set ENABLE_DELETE=true to enable deletion of these images in $REPOSITORY:"
144-
az acr manifest list-metadata --name $REPOSITORY --repository $REGISTRY \
145-
--orderby time_asc --query "[?timestamp < '$TIMESTAMP'].[digest, timestamp]" -o tsv
144+
az acr manifest list-metadata --name $REPOSITORY --registry $REGISTRY \
145+
--orderby time_asc --query "[?lastUpdateTime < '$TIMESTAMP'].[digest, lastUpdateTime]" -o tsv
146146
fi
147147
```
148148

articles/container-registry/container-registry-helm-repos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Run `helm registry login` to authenticate with the registry. You may pass [regi
142142
ACR_REGISTRY_ID=$(az acr show --name $ACR_NAME --query id --output tsv)
143143
PASSWORD=$(az ad sp create-for-rbac --name $SERVICE_PRINCIPAL_NAME \
144144
--scopes $(az acr show --name $ACR_NAME --query id --output tsv) \
145-
--role acrpull \
145+
--role acrpush \
146146
--query "password" --output tsv)
147147
USER_NAME=$(az ad sp list --display-name $SERVICE_PRINCIPAL_NAME --query "[].appId" --output tsv)
148148
```

0 commit comments

Comments
 (0)