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

"addons configure registry-creds" always uses gcr.io for GCR #1732

Closed
atombender opened this issue Jul 23, 2017 · 9 comments
Closed

"addons configure registry-creds" always uses gcr.io for GCR #1732

atombender opened this issue Jul 23, 2017 · 9 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@atombender
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Minikube version (use minikube version): 0.20

Environment:

  • OS (e.g. from /etc/os-release): N/A
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): N/A
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): N/A
  • Install tools: N/A
  • Others: N/A

What happened:
If you run minikube addons configure registry-creds, and you ask it to enable the GCR credentials, it will create Docker credentials for https://gcr.io/. As a consequence, the instructions didn't work for me, because we use https://us.gcr.io/ for all our Docker images.

The configuration can be fixed manually by doing kubectl edit secret gcr-secret in each namespace, replacing the registry URL (plus mucking around with base64), but that's very inconvenient.

What you expected to happen:
I expected it to enable the credentials for all known GCR URLs. Or at least me ask which registry/registries to enable.

How to reproduce it (as minimally and precisely as possible):
See above.

Anything else do we need to know:
N/A

@r2d4 r2d4 added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 24, 2017
@r2d4
Copy link
Contributor

r2d4 commented Jul 24, 2017

Makes sense. We could either supply the user with a list of all known GCR URLs, or provide the default but allow a custom url.

@atombender
Copy link
Author

The gcloud toolchain (specifically, docker-credential-gcr) adds all of them to docker.json, and that's probably the way to go. E.g. my ~/.docker/config.json has:

  "credHelpers" : {
    "beta.gcr.io" : "gcr",
    "us.gcr.io" : "gcr",
    "gcr.kubernetes.io" : "gcr",
    "bucket.gcr.io" : "gcr",
    "gcr.io" : "gcr",
    "asia.gcr.io" : "gcr",
    "b.gcr.io" : "gcr",
    "eu.gcr.io" : "gcr",
    "appengine.gcr.io" : "gcr"
  }

@aaron-prindle
Copy link
Contributor

This should be fixed with #1436. This flag recently added to the registry-creds addon and now our registry configuration supports this. Closing.

@atombender
Copy link
Author

@aaron-prindle I'd strongly prefer it to add all the known GCR URLs.

The approach used by the PR means there'll be manual setup and documentation needed on the team end in my company, and from what I can tell it cannot be automated (it always shows an interactive prompt); it also means that it won't work if a team uses multiple GCR URLs, since it only supports a single URL, from what I can tell. It also will fail if a team uses a specific GCR URL and then migrates to another.

A good reason to populate all the GCR URLs is that from a GCR perspective, they're all "identical". They're just regional GCS buckets. (I don't even know Google, with all their multiregional network magic, does it this way, since they have the ability to automatically route a client to the nearest server, and also have a CDN. But right now there are multiple URLs, so we have to work around it.)

In my company we prefer to automate as much as possible. We are building a tool that will set up Minikube and run minikube addons configure registry-creds for the user. It can't be interactive. If we know the prompts beforehand, we could probably pipe through stdin, but that would obviously be super brittle.

@aaron-prindle aaron-prindle reopened this Jul 24, 2017
@atombender
Copy link
Author

atombender commented Jul 24, 2017 via email

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Jul 24, 2017

@atombender it definitely makes the most sense to populate all of the GCR URLs. The GCR URL is set as an endpoint for the secret that the registry-creds addon generates. The place that is done is here:
https://github.com/upmc-enterprises/registry-creds/blob/master/main.go#L202

It seems like making this a list of all the available options, like what you posted above, would solve the issue. Thanks for looking into this!

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 1, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 31, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants