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

Creating secret with oc secret new-dockercfg ... creates secret in a new docker config format #17197

Closed
jhadvig opened this issue Nov 6, 2017 · 4 comments

Comments

@jhadvig
Copy link
Member

jhadvig commented Nov 6, 2017

The outcome of the https://bugzilla.redhat.com/show_bug.cgi?id=1476330 was that creating a secret with

oc secret new-dockercfg --docker-server=registry.com --docker-username=developer --docker-password=balabala [email protected] redhat-connect-37

will create an secret with kubernetes.io/dockercfg type(old file type) with the new format:

{
        "auths": {
                "registryaddress": {
                        "auth": "auth string",
                        "email": "[email protected]"
                }
        }
}

I agree that we need to start promoting the new format but we shouldn't mismatch type with format and the created secret should be of kubernetes.io/dockerconfigjson type

@juanvallejo @smarterclayton

@juanvallejo
Copy link
Contributor

Related upstream PR / discussion: kubernetes/kubernetes#53916

@juanvallejo
Copy link
Contributor

cc @fabianofranz

@GrahamDumpleton
Copy link

GrahamDumpleton commented Dec 28, 2017

FWIW, this problem in OpenShift 3.7 affects using DockerHub as well, and not just Red Hat registry as in linked Bugzilla report.

If you don't want to muck around with raw resource objects, you can create the secret from the advanced options of an existing build configuration in the web console (no need to save the build and link it). Need to use that way because Create Secret under Secrets viewer in web console doesn't provide option to create a dockercfg type secret.

Alternatively, use an OpenShift 3.6 client against the 3.7 cluster when creating the secret as older client will create secret in format that works.

Not that I think it matters, I was using the secret as a pushSecret to push built images to DockerHub, not pull images.

@soltysh
Copy link
Contributor

soltysh commented Jan 11, 2018

This should be fixed for 3.7 in #18062.
3.8 is not affected.
master picked a fix in #18003

@soltysh soltysh closed this as completed Jan 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants