Skip to content

Commit

Permalink
fix(grafana): Fixed image rendered network policy namespace selector
Browse files Browse the repository at this point in the history
The egress network policy for the image rendered expects the namespace
of the chart to match `name: ${value}`, this label is not applied to
namespaces by default in Kubernetes and would need to be added to the
namespace in order for this network policy to work. However the ingress
network policy uses `kubernetes.io/metadata.name: ${value}`, this label
is applied to namespaces in kubernetes by default and will allow the
network policy to work out of the box with reasonable defaults.

Without this patch, essentially grafana is able to communicate with the
image renderer, but the image renderer is not able to make HTTP requests
back to grafana in the same namespace without adding `name: ${namespace
name}` to the labels of the namespace grafana is deployed in.

Signed-off-by: Elliot Courant <[email protected]>
  • Loading branch information
elliotcourant committed Jul 12, 2024
1 parent 91d549c commit 16ca894
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: grafana
version: 8.3.2
version: 8.3.3
appVersion: 11.1.0
kubeVersion: "^1.8.0-0"
description: The leading tool for querying and visualizing time series and metrics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ spec:
to:
- namespaceSelector:
matchLabels:
name: {{ include "grafana.namespace" . }}
kubernetes.io/metadata.name: {{ include "grafana.namespace" . }}
podSelector:
matchLabels:
{{- include "grafana.selectorLabels" . | nindent 14 }}
Expand Down

0 comments on commit 16ca894

Please sign in to comment.