From e6132e36ba77cbbf0603586dcb45cd373a5dc9a0 Mon Sep 17 00:00:00 2001 From: Marco Amador Date: Thu, 18 Mar 2021 16:36:49 +0000 Subject: [PATCH] fix: revert azure patch and fix the order parameters in the function Signed-off-by: Marco Amador --- .../registry-credentials-sync/_base/sync.yaml | 4 ++-- .../registry-credentials-sync/_cronjobs/_base/sync.yaml | 4 ++-- .../_cronjobs/azure/reconcile-patch.yaml | 9 +-------- .../registry-credentials-sync/azure/reconcile-patch.yaml | 4 ++-- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/manifests/integrations/registry-credentials-sync/_base/sync.yaml b/manifests/integrations/registry-credentials-sync/_base/sync.yaml index 4efb25f0..47b327a3 100644 --- a/manifests/integrations/registry-credentials-sync/_base/sync.yaml +++ b/manifests/integrations/registry-credentials-sync/_base/sync.yaml @@ -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 - diff --git a/manifests/integrations/registry-credentials-sync/_cronjobs/_base/sync.yaml b/manifests/integrations/registry-credentials-sync/_cronjobs/_base/sync.yaml index 86330170..17ed5a19 100644 --- a/manifests/integrations/registry-credentials-sync/_cronjobs/_base/sync.yaml +++ b/manifests/integrations/registry-credentials-sync/_cronjobs/_base/sync.yaml @@ -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 - diff --git a/manifests/integrations/registry-credentials-sync/_cronjobs/azure/reconcile-patch.yaml b/manifests/integrations/registry-credentials-sync/_cronjobs/azure/reconcile-patch.yaml index b36fa90c..2a500af4 100644 --- a/manifests/integrations/registry-credentials-sync/_cronjobs/azure/reconcile-patch.yaml +++ b/manifests/integrations/registry-credentials-sync/_cronjobs/azure/reconcile-patch.yaml @@ -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 diff --git a/manifests/integrations/registry-credentials-sync/azure/reconcile-patch.yaml b/manifests/integrations/registry-credentials-sync/azure/reconcile-patch.yaml index 86e1e0e3..ea79df70 100644 --- a/manifests/integrations/registry-credentials-sync/azure/reconcile-patch.yaml +++ b/manifests/integrations/registry-credentials-sync/azure/reconcile-patch.yaml @@ -23,8 +23,8 @@ spec: user="00000000-0000-0000-0000-000000000000" echo "Creating secret: ${KUBE_SECRET}" - apply-secret "${KUBE_SECRET}" "${server}" "${user}" "${token}" + apply-secret "${KUBE_SECRET}" "${token}" "${user}" "${server}" - echo "Finished ECR token sync -- $(date)" + echo "Finished ACR token sync -- $(date)" echo }