-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Grafana image renderer CrashLoopBackoff due to NetPol #795
Comments
I really think this should be checked upon. by default, k8s seems to be assigning only the label |
I have also stumbled on this. @clementnuss is correct: the label (required to match) does not exist (on the namespace) unless someone manually assigns it (something not always possible). As mentioned here in the official Kubernetes docs, in order to target a namespace by name, the So, practically, the image renderer service is not accessible from Grafana (unless you entirely disable the network policy by setting My workaround is to let the network policy enabled, and patch it after a A patch would be something like:
|
I ran into the same issue and needed to use the workaround of disabling the policy entirely. I'd really love to see this fixed. |
@tim-felix-lange @drmalex07 @clementnuss helm-charts/charts/grafana/values.yaml Line 885 in a1f486d
|
fixes grafana#795 removing the `namespaceSelector` from the network policy effectively only allows pods from the same namespace to access the image renderer. there is no need to manually specify the namespace, and the label previously used to match on a namespace isn't the default K8s namespace label (that would be kubernetes.io/metadata.name )
@zanhsieh no, I just created a PR to fix this issue instead |
fixes grafana#795 removing the `namespaceSelector` from the network policy effectively only allows pods from the same namespace to access the image renderer. there is no need to manually specify the namespace, and the label previously used to match on a namespace isn't the default K8s namespace label (that would be kubernetes.io/metadata.name ) Signed-off-by: Clément Nussbaumer <clement@astutus.org>
fixes grafana/helm-charts#795 removing the `namespaceSelector` from the network policy effectively only allows pods from the same namespace to access the image renderer. there is no need to manually specify the namespace, and the label previously used to match on a namespace isn't the default K8s namespace label (that would be kubernetes.io/metadata.name ) Signed-off-by: Clément Nussbaumer <clement@astutus.org>
The issue is the following:
if you enable
imageRenderer: true
in your Grafana Helm Chart, a default Network Policy will be created, which will only allow the traffic coming from namespace labeled as follows: (here is the Helm chart)In my case though, the namespace didn't have this label but only a
kubernetes.io/metadata.name: my-ns
label.The liveness probe was therefore failing and my container was in the CrashLoopBackoff state.
Adding the label
name: my-ns
solves the issue for the grafana pod, but the liveness probe still fails.The text was updated successfully, but these errors were encountered: