-
Notifications
You must be signed in to change notification settings - Fork 687
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
Allow ambassador Helm chart to use CRDS when namespaced #1576
Comments
You're deploying with the Helm chart? |
Facing the same issue. Installed Ambassador 0.70.1 via Helm, like this:
(using helm v2.11.0)
And the Ambassador admin UI shows this error: |
Also helm, version 0.70.1 |
cc @Flydiverny I think this is an issue with the Helm chart. |
Please see if helm/charts#14388 would solve your problems :) |
@Flydiverny so basically it won't request to list namespaces?, how can i test this? |
Took your branch and tried to install it , get the following error: Used the following values in values.yaml:
|
@volatilemolotov Thanks, will see if I can make an update later today :) Wrote another comment in the PR helm/charts#14388 (comment) I think it will be hard to allow CRDs when RBAC is namespaced as ambassador 0.70.1 requires the ability to see if the definitions exists, which are cluster wide resources and there by requires a cluster role to see, AFAIK. |
Then namespaced ambassador should have ClusterRole but should only read stuff within its namespace (solved in ambassador code) |
@kflynn |
cc @containscafeine who implemented the check |
Why even check if a defintion exists, can it work by just checking if any of the resources from the getambassador.io api group are present in the namespace (or in the cluster if ambassador is cluster scoped) and if not you can just throw a mesasge " no resorces found, check if definitions are present" or something similar |
So here's the issue: suppose that you have a new Ambassador user who sets up a bunch of stuff with CRDs but doesn't quite get it right. If they forget to create the CRD types at all, that's not so bad: Kubernetes won't let them If they get RBAC wrong, though, that's much more annoying. How do we report the error?? Right now, the only channels we have for error reporting are the diagnostics UI or So, yeah. I don't like requiring so many permissions, I'm just not sure of a good way to let users know what's wrong when things are broken. Opinions welcome!! |
I don't have a problem with how you are reporting the error. My issue is more about the fact that a fresh Helm chart install doesn't work out-of-the-box... |
@bourquep That is definitely a bug, yes. |
@bourquep I'm unsure what doesn't work with the chart out of the box? If the default settings fail to install or start up please create an issue :) |
@Flydiverny I have documented what is happening here in this current issue. Basically, |
@bourquep Please try chart version 2.6.2 or newer. The issue in chart version 2.6.1 was fixed in helm/charts#14155 and is somewhat unrelated to this issue (namespaced vs non namespaced) |
Best way IMHO is to fallback to annotations if no custom resources are found and log it in the stdout. If someone cannot reach its mapping or ambasador itself first thing would be to check the logs. Pod should not crash because you still can use annotations which can be considered as a ready state |
Or it can be solved by using a simple clusterrole with just list watch and get for CRDS like this if ambasasdor is set as namespaced:
Think this is the least privilege needed to enable crd support (tested on 0.71.0 and it works). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the bug
I have a ambassador instance deployed as a namespaced resource and get the following
To Reproduce
Steps to reproduce the behavior:
namespaced: true
Expected behavior
Ambassador should be able to read CRDS depoyed within its namespace without using ClusterRole RBAC definitions
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: