Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a registry token instead of the API key #10

Open
l2fprod opened this issue Sep 19, 2018 · 0 comments
Open

Use a registry token instead of the API key #10

l2fprod opened this issue Sep 19, 2018 · 0 comments

Comments

@l2fprod
Copy link

l2fprod commented Sep 19, 2018

kubectl --namespace ${CLUSTER_NAMESPACE} create secret docker-registry ${IMAGE_PULL_SECRET_NAME} --docker-server=${REGISTRY_URL} --docker-password=${PIPELINE_BLUEMIX_API_KEY} --docker-username=iamapikey --docker-email=a@b.com

It would be better to use a read-only registry token obtained with bx cr token-add --description "a token for ..." --non-expiring --quiet here. This avoids having the IBM Cloud API key inside a secret in the container. Plus it gives only read access to the registry.

The token can be used like this

  kubectl --namespace <anamespace> create secret docker-registry <secret-name> \
    --docker-server=registry.ng.bluemix.net \
    --docker-password="<the token value>" \
    --docker-username=token \
    --docker-email="anemail@domain.com"
DevOpsBot1 pushed a commit that referenced this issue Oct 1, 2021
* Attempt to add VA scan skip param

* Fix bash script

* Revert tekton changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant