-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc client generates invalid docker-registry secrets #18059
Labels
Comments
@openshift/sig-developer-experience |
@soltysh is this resolved? or is there a reason the issue is still open ? |
This issue is still present in oc v3.7.1+ab0f056 |
The fixed I linked was merged after that release, so this is fixed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At some point, openshift client started to create invalid secrets of type docker-registry. Previous versions of the client (v3.6.0-c4dd4cf) produces correct output.
I'm not sure if this is a client issue, or an issue with OpenShift using the supplied dockercfg in imagePullSecret.
Relevant information:
https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
Newer Docker versions seems to create a configuration file with an outer auths object, which OpenShift doesn't seem to support.
Version
oc v3.7.0+7ed6862
Steps To Reproduce
Verify what is generated with current client:
$ oc create secret docker-registry regsecret --docker-email="[email protected]" --docker-password="password" --docker-username="user" --docker-server="https://registry/" --dry-run -o yaml | grep docker | cut -d":" -f2- | head -n 1 | base64 -D | jq '.'
{
"auths": {
"https://registry/": {
"username": "user",
"password": "password",
"email": "[email protected]",
"auth": "dXNlcjpwYXNzd29yZA=="
}
}
}
Do the same with previous client:
./openshift-origin-client-tools-v3.6.0-c4dd4cf-mac/oc create secret docker-registry regsecret --docker-email="[email protected]" --docker-password="password" --docker-username="user" --docker-server="https://registry/" --dry-run -o yaml | grep docker | cut -d":" -f2- | head -n 1 | base64 -D | jq '.'
{
"https://registry/": {
"username": "user",
"password": "password",
"email": "[email protected]",
"auth": "dXNlcjpwYXNzd29yZA=="
}
}
Current Result
docker-registry secrets generated with client oc v3.7.0+7ed6862 produces a secret that is not usable with OpenShift, I've tested on two different servers:
$ oc version
oc v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth
Server X
openshift v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
$ oc version
oc v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth
Server X
openshift v3.6.0+c4dd4cf
kubernetes v1.6.1+5115d708d7
Expected Result
oc client generating valid docker-registry secrets that the remote server is able to use
Additional Information
not relevant
The text was updated successfully, but these errors were encountered: