Skip to content

Instantly share code, notes, and snippets.

@zedtux
Created January 25, 2019 11:38
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/ac6671f70597ad6ffbf9aae387bba22c to your computer and use it in GitHub Desktop.
Save zedtux/ac6671f70597ad6ffbf9aae387bba22c to your computer and use it in GitHub Desktop.
Replaces the Kubernetes docker-registry secret data
# Updates the GITLAB_REGISTRY_SECRET_JSON with the removed auths key
# and replace the Kubernetes secret
FINAL_JSON=$(
echo $GITLAB_REGISTRY_SECRET_JSON | \
sed -e s"/\".dockerconfigjson\":\s\"\([a-zA-Z0-9=]\+\)\"/\".dockerconfigjson\":\"$AUTHS\"/"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment