You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flux2/manifests/integrations/registry-credentials-sync/azure/reconcile-patch.yaml

31 lines
883 B
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: credentials-sync
namespace: flux-system
spec:
template:
spec:
containers:
- name: sync
image: mcr.microsoft.com/azure-cli
env:
- name: RECONCILE_SH
value: |-
reconcile() {
echo "Starting ACR token sync -- $(date)"
echo "Logging into Azure"
az login --identity
echo "Logging into ACR: ${ACR_NAME}"
output="$(az acr login --expose-token -o=tsv -n "${ACR_NAME}")"
read token server <<< "${output}"
user="00000000-0000-0000-0000-000000000000"
echo "Creating secret: ${KUBE_SECRET}"
apply-secret "${KUBE_SECRET}" "${server}" "${user}" "${token}"
echo "Finished ECR token sync -- $(date)"
echo
}