Skip to content

Commit

Permalink
fix namespace selector issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
clementnuss committed Jul 26, 2022
1 parent a331a04 commit 82b0677
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions charts/grafana/templates/image-renderer-network-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ spec:
- port: {{ .Values.service.port }}
protocol: TCP
to:
- namespaceSelector:
matchLabels:
name: {{ template "grafana.namespace" . }}
podSelector:
- podSelector:
matchLabels:
{{- include "grafana.selectorLabels" . | nindent 14 }}
{{- if .Values.podLabels }}
Expand Down

0 comments on commit 82b0677

Please sign in to comment.