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

[grafana] [image-renderer] Service monitor not working because the ingress network policy does not allow prometheus to connect #3268

Open
FirelightFlagboy opened this issue Aug 10, 2024 · 0 comments

Comments

@FirelightFlagboy
Copy link

FirelightFlagboy commented Aug 10, 2024

Hello, I have configured the grafana-image-renderer with the grafana/grafana helm with the following configuration:

imageRenderer:
    enabled: true

    serviceMonitor:
        enabled: true

But the service monitor wasn't able to fetch the metrics as it wasn't able to connect to the grafana-image-renderer pod with the TPC error connection refused.

It appears that the issue is caused by the configured image-renderer-ingress network policy that only allow connection from the grafana pod.

What I would expect is that when the service monitor is enabled that the ingress is configured to allow prometheus to scrap the metrics from the image-renderer pod.

Workaround

Currently, I have a workaround that use the extraIngressSelectors to select the prometheus pod.

imageRenderer:
    networkPolicy:
        extraIngressSelectors:
            - namespaceSelector:
                matchLabels:
                    kubernetes.io/metadata.name: siem
              podSelector:
                matchLabels:
                    app.kubernetes.io/instance: prometheus
                    app.kubernetes.io/name: prometheus
@FirelightFlagboy FirelightFlagboy changed the title [grafana] [image-renderer] Service monitor because the ingress network policy does not allow prometheus to connect [grafana] [image-renderer] Service monitor not working because the ingress network policy does not allow prometheus to connect Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant