Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zedtux/429e78c20ff977e4d422c9a6159aad27 to your computer and use it in GitHub Desktop.
Save zedtux/429e78c20ff977e4d422c9a6159aad27 to your computer and use it in GitHub Desktop.
Extracts, decodes, updates and encodes the Kubernetes docker-registry secret in order to remove the auths root node
# Extracts the auths key from the decoded JSON
AUTHS=$(
echo $GITLAB_REGISTRY_SECRET_JSON | \
jq '.data[".dockerconfigjson"]' -r | \
base64 -d | \
jq '.auths' -c | \
base64 | \
tr -d '\n'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment