-
Notifications
You must be signed in to change notification settings - Fork 394
sort out the private registry auth story on draft init
#49
Comments
So the current user story is that the user calls
For the former, draft will display the following information:
If it's the latter (or the user chose option 4), then the following information is displayed to the user:
This prompt window can be bypassed by supplying Once the information is gathered from the client configuration, it will generate the auth token and inject it into the draft helm chart as a secret. NOTE: short-lived token auth support will not be part of the initial rollout of this feature. For users running on Google Container Registry or Amazon EC2 Container Registry, the recommended way to log in would be to use the JSON key file via
|
@bacongobbler @technosophos @michelleN I'm having this problem. I've done everything I think I know how to get this running on ACR -- using the provided domains so not messing with any custom domains. Here is the calls that I make to
where
c59fa6cbcbd9: Preparing
|
It seems an auth issue with the registry. BTW, minikube seems to work perfectly, but the same workflow for minikube is: 8d4d1ab5ff74: Preparing Uh, these will both work if someone knows how to identify what I'm doing wrong to auth to the registry..... :-) I will be happy to write a doc for azure/draft showing minikube if I get the registry auth working fine. |
Again, I can log on directly to my registry with the SP that I had to create with the registry. I get, however, the same error when directly connecting using THOSE credentials as my username and password, too. Sigh. Writing up the doc, because I'm sure it's a simple thing and as soon as we figure it out, we can push both ACS/ACR doc and a minikube to azure/draft. |
1 similar comment
Again, I can log on directly to my registry with the SP that I had to create with the registry. I get, however, the same error when directly connecting using THOSE credentials as my username and password, too. Sigh. Writing up the doc, because I'm sure it's a simple thing and as soon as we figure it out, we can push both ACS/ACR doc and a minikube to azure/draft. |
So you got to the point where You might check |
Ignore my issue. #UserError. :-) That said, the issue is a good one. |
So I'm running into this too. How would you do it for GKE? Acording to the docs and this issue the following should (?) work but doesn't:
|
@jackzampolin I was able to get this to work on GKE using Application Default Credentials:
The draft init command that works for me is then:
|
@jackzampolin my approach was incorrect. I spoke with one of the Engineers working on Container Registry and here's the correction:
Otherwise unchanged. |
One other suggestion - After init has been called once, second time it should auto --upgrade without the flag? If this is poor standardization, then I'd suggest disabling init and stating 'already initialized, don't forget to use --upgrade flag'. I was in a horrible loop for 1 hour because I was forgetting the upgrade flag when I needed to update my credentials yesterday. |
I disagree that init should handle upgrades. In fact I would rather we limit the scope to literally initializing the cluster for the first time. After that the user can call |
Agreed, what's your proposal for updating credentials / basedomain / etc. That's the key UX that needs to be solved as from what I found, the only way I could update my credentials was draft init {updated config} --upgrade. I did not see any user stories around that on this thread, so would love to know what's the game plan there. In short-term, would suggest updating https://github.com/Azure/draft/blob/master/docs/install.md - to share information on how to update your configuration. It would have saved me tons of time after a silly typo. |
Subsequent calls to
Right now the recommended way is to use |
part one of the plan is to improve the minikube story, starting by contributing a registry addon to minikube. Once that's done, we can recommend users to use the following workflow:
Which at that point, draft will read the local kube config and notice that the current context name is called "minikube". It will then install draftd and point it towards the in-cluster registry. As for Azure, we will do the same operation:
|
@bacongobbler, good line on minikube, azure. Will this approach work for all registries, generally? I'll follow up with the ACR/ACS access..... |
Generally speaking, if someone were to write a Google Cloud bootstrap workflow for draft then yes. I'm limiting scope for v0.5.0 to just minikube and Azure for now as that happens to be the large majority of users trying out draft. All the other unrecognized providers will need to go through the manual approach we do today until someone can pick up the work for GKE, Amazon etc. |
(that someone likely being myself) |
gotcha: just wanna make sure we have a good path for everyone. checking on acr/acs access issues now to be certain about our assumptions. |
closing in favour of #152. The discussion in that ticket more clearly demonstrates the issue and proposed solution going forward. |
My assumptions were wrong. Either way we can still automate this process to fetch the admin username/password and pass that to draftd. |
Right now the user story to inject registry auth details into draftd is to echo a JSON string, pipe it to base64 and use the output as the
registry.authtoken
field in the chart.We should test out the following scenarios:
docker login
ondraft init
somehow, asking users for their credentialsThat way we can "hide" this process from the end user and do it for them without any terminal hackery.
Of course, this process of attaching your own base64-encoded string as the auth token might still be useful for those that want to do things the hard way or have their own custom setup.
The text was updated successfully, but these errors were encountered: