-
Notifications
You must be signed in to change notification settings - Fork 706
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
Minor fixes in the docker-credentials form #1691
Conversation
As in k8s won't use the secret for dockerhub if the trailing slash isn't included? If that's the case, yes, we may even want a radio allowing selecting between dockerhub and a custom one. Or do you mean kubeapps treated it differently (it shouldn't have). |
I'm not 100% but https://github.com/kubernetes/kubernetes/blob/master/pkg/credentialprovider/keyring.go#L106 woulds seem to strip off any I also found while playing today that I could only use the domain of my private registry for the image pull secret, it wouldn't work with the full URL with path etc. Still need to dig some more. |
I have tested it a bit more but yes, as you point out, the paths
The protocol is irrelevant and both domains docker.io and index.docker.io work. For the sake of simplicity I will leave the placeholder as |
Careful, the fact that it works regardless of the protocol doesn't mean it's irrelevant. There may be some security reason, such as old docker clients using http (and sending the credentials over http) if the protocol is not specified. Or it could depend on the credential store used. Since the k8s docks specifically say to use "https://index.docker.io/v1/", including the protocol (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line ) I think we should use it. |
Description of the change
I learned the hard way that
https://index.docker.io/v1
is not valid (it requires the trailing/
), should we enforce that?