Merge pull request #1119 from anovateam/azure-acr-secret-reconcile-script

This commit is contained in:
Hidde Beydals 2021-03-18 18:35:21 +01:00 committed by GitHub
commit acf7173959
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 13 deletions

View file

@ -47,9 +47,9 @@ spec:
apply-secret() {
/kbin/kubectl create secret docker-registry "${1}" \
--docker-server="${2}" \
--docker-password="${2}" \
--docker-username="${3}" \
--docker-password="${4}" \
--docker-server="${4}" \
--dry-run=client -o=yaml \
| grep -v "creationTimestamp:" \
| /kbin/kubectl apply -f -

View file

@ -49,9 +49,9 @@ spec:
apply-secret() {
/kbin/kubectl create secret docker-registry "${1}" \
--docker-server="${2}" \
--docker-passwrod="${2}" \
--docker-username="${3}" \
--docker-password="${4}" \
--docker-server="${4}" \
--dry-run=client -o=yaml \
| grep -v "creationTimestamp:" \
| /kbin/kubectl apply -f -

View file

@ -23,14 +23,7 @@ spec:
read token server <<< "${output}"
user="00000000-0000-0000-0000-000000000000"
echo "Creating secret: ${KUBE_SECRET}"
/kbin/kubectl create secret docker-registry "${KUBE_SECRET}" \
--docker-server="${server}" \
--docker-username="00000000-0000-0000-0000-000000000000" \
--docker-password="${token}" \
--dry-run=client -o=yaml \
| grep -v "creationTimestamp:" \
| /kbin/kubectl apply -f -
apply-secret "${KUBE_SECRET}" "${token}" "${user}" "${server}"
echo "Finished ACR token sync -- $(date)"
echo

View file

@ -25,6 +25,6 @@ spec:
echo "Creating secret: ${KUBE_SECRET}"
apply-secret "${KUBE_SECRET}" "${token}" "${user}" "${server}"
echo "Finished ECR token sync -- $(date)"
echo "Finished ACR token sync -- $(date)"
echo
}