-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support Google Container Registry #529
Comments
@jpellizzari any timeline to support Google Container Registry, Should we wait or should we find other solutions ? |
@wassemgtk Currently not prioritized. I'll update you if that changes. |
@wassemgtk We're currently rewriting the daemon This will mean that how it accesses the registry is up to how you run the daemon -- it just expects a docker-style config file to be available, which I think you'd be able to supply with a small amount of preparation (judging by https://cloud.google.com/container-registry/docs/advanced-authentication). This change will land in the next <small number> weeks. |
I've previously used Flux with GCR and the config I've put together looked like this: registry:
auths:
"gcr.io": { "auth": <BASE64_ENCODED_STRIGN> } Where
So if you have
@wassemgtk hope the above makes sense, I'd be happy to help if you jump on Slack and we can figure out how to update the docs and talk more about how we could make it easier for you. |
Amazing!! Yayyy. I will check it out and let you know on Slake |
@errordeveloper Tried it but still facing issues |
Instead of |
Same error error: unable to read URL "https://cloud.weave.works/k8s/flux.yaml?service-token=***********************************version=", server reported 400 Bad Request, status code=400` |
Different error. Looks like you have a So instead of
try
|
:(
|
We are making progress... Please post the output of |
|
So the error is due to the new role-based access control (RBAC) feature in k8s 1.6. Let's see whether it works without that:
|
the weave flux agent is not a daemon in the k8s sense of the word. |
the agent should show up as a Deployment. |
Nothing there :( I can't see it |
I'm afraid this has exhausted my k8s knowledge. One of my colleagues will pick this up tomorrow. |
@wassemgtk The output quoted in #529 (comment) certainly indicates that a deployment for Flux was created. Just to check, did you look at the Deployments page in the k8s dashboard? |
Yes I did and I can't see the deployment |
I see. If kubernetes reports that it created something, but you can't see it in kubernetes' dashboard, I don't know what to suggest to you. Perhaps try verifying with
|
@wassemgtk That indicator is based on the git repo being configured for your instance. Have you configured the git repo in the configuration section of the 'Deploy' menu? |
Cool! Progress. This could indicate at least a couple of things:
|
@q-michelle Whoops didn't see that last screenshot. Disregard. |
No, different tags. the container registry image above shows tag assignments. |
It reports that it finds nothing to do, but where is it looking? Should I have a .yaml in a specific location or is it looking through all the objects in the cluster to find the one that uses this image? I'm unclear how the image is linked to the deployment/pod that runs it. |
Flux looks at the config git repo to see what services* are defined. In the first screenshot, it's saying "0 services found", which means there's nothing there that satisfies its idea of a service, so it doesn't proceed. You might ask: why can I click on What can you do? You can make sure you have a definition of the service in the config repo, in the form that Flux expects it (explained just below). If I've jumped to a conclusion, and you do in fact have a definition, would you mind opening another issue and posting the details? Or you can hop on our Slack: https://weaveworks.github.io/community-slack/ (I am -- |
@squaremo that makes sense. We are using the same definition of service, but I had both the Service & Deployment bundled in the same file. Separating them out worked. Weavecloud now registers a change, but throws an error during deployment.
I suspect it is a version incompatibility. I found this change that has been reverted. Do you think updating the version of kubectl would resolve this error? |
I think you are likely correct that it's a version incompatibility. In master we include |
Is there a timing estimate for when Cloud Weave will support a newer version of kubectl? Or are there updated agents we could deploy on our cluster? |
OK, there's a new release of fluxd in quay.io, with a newer |
Thanks for pushing the new image! I updated the image version in the weave-flux-agent deployment object, but still can't get a deployment to succeed. I can see a green connection in the config screen "Deploy agent configured", but am seeing "Failed: connection is shut down" when I try to initiate a deploy. I tried deleting & recreating the weave-flux-agent deployment object, but am seeing these errors on recreation: |
This error has also been observed over at #556; it seems like GKE has an idiosyncratic implementation of RBAC. https://cloud.google.com/container-engine/docs/role-based-access-control gives a few gotchas, but according to @mongrelion, the workarounds do not work around them. (Although his comment there seems ambiguous, so it is worth verifying for yourself) What modifications did you make to the downloaded manifest? (So we can at least rules things out) |
I think I understand @mongrelion's comments. Like Carlos, I'm also an owner of the project, which means I should have all required privileges. I tried granting myself explicit container engine privileges just in case, but saw the same failures. I was able to narrow it down to a problem with the rules in the ClusterRole object. I tried many different derivatives of:
All resulted in the same error:
I found #400 & the corresponding PR for weave-kube, but I can't see how to translate that into the permissions that flux needs. At this point, I'm looking for one of two things:
|
The Google Cloud documentation says "An example workaround is to create a RoleBinding that gives your Google identity a cluster-admin role before attempting to create additional Role or ClusterRole permissions." Is that what you did, @q-michelle? |
OK, thanks for confirming that. It sounds like the workaround given in the GKE docs does not in fact work around. Do either of you @q-michelle @mongrelion have evidence that one can grant permissions on GKE, e.g., if you just do it via the command line, for some ad-hoc job? (I'm sorry I have been unable to dig into this myself, I'm fighting battles on several fronts atm.) |
@squaremo No, I'm unable to grant permissions for other objects, which appears to be because I haven't setup authentication on my cluster. I'm a bit out of my element trying to get it to work. Is there an auth type that you recommend or could you point me at some docs that would help me get it setup properly? |
@q-michelle the instructions for setting up the cluster-admin role in our new docs may solve your issue. |
Thanks @Sambooo - that makes sense! The command in your link ran successfully to grant my user cluster-admin privs. I no longer get errors when running |
The cluster & repo were somehow not in sync from using Flux 0.2.0, but now that everything is in sync on 0.3.0, everything is working as expected. Thank you everyone for the help getting things up and running! |
Just looking at this thread now, it appears that headline issue, GCR auth configuration, is resolved and basically needs to be documented properly. @q-michelle sounds like you issues has been resolved too. I'm tempted to close this and open at least one issue with a title "Document GCR auth config steps", but I'd like to hear what others think, as I might have misses something while reading this thread. |
Yes, that sounds like a logical resolution for this thread. I've automated a few more services and haven't had any additional problems - everything is working well now. |
Looks like this doesn't need to be open any more. If anyone opposes, please do feel free to re-open :) |
Where can I find the GCR-related documentation that this issue resulted in? |
The main outcome of this issue was that we put additional instructions in Weave Cloud bootstrapping, for GKE users -- this amounts to running
to give your account the necessary permissions to run the weave agents. We also added |
GCR does authentication differently from other container image registry providers. GCR wraps the Docker CLI and handles authentication on its own using the
gcloud
utility. It appears that GCE uses RSA keys rather than username/password like other container registry providers (quay.io, gitlab, docker hub).More info here: https://cloud.google.com/container-registry/docs/using-with-third-party-solutions
This issue was reported by Weave Cloud users.
The text was updated successfully, but these errors were encountered: