Skip to content

Commit 06addf2

Browse files
committed
grafana: Add manualEgress option for network policies
1 parent 24bcd88 commit 06addf2

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

charts/grafana/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: grafana
3-
version: 10.0.0
3+
version: 10.1.0
44
appVersion: 12.1.1
55
kubeVersion: "^1.8.0-0"
66
description: The leading tool for querying and visualizing time series and metrics.

charts/grafana/templates/networkpolicy.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ spec:
2424
podSelector:
2525
matchLabels:
2626
{{- include "grafana.selectorLabels" . | nindent 6 }}
27-
2827
{{- if .Values.networkPolicy.egress.enabled }}
2928
egress:
29+
{{- if not .Values.networkPolicy.egress.manualEgress }}
3030
{{- if not .Values.networkPolicy.egress.blockDNSResolution }}
3131
- ports:
3232
- port: 53
@@ -38,6 +38,9 @@ spec:
3838
to:
3939
{{- toYaml . | nindent 12 }}
4040
{{- end }}
41+
{{- else }}
42+
{{- toYaml .Values.networkPolicy.egress.manualEgress | nindent 4 }}
43+
{{- end }}
4144
{{- end }}
4245
{{- if .Values.networkPolicy.ingress }}
4346
ingress:

charts/grafana/values.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,12 +1606,18 @@ networkPolicy:
16061606
## to:
16071607
## - namespaceSelector:
16081608
## matchExpressions:
1609-
## - {key: role, operator: In, values: [grafana]}
1610-
##
1611-
##
1612-
##
1613-
##
1614-
##
1609+
## - {key: role, operator: In, values: [grafana]}
1610+
##
1611+
## @param networkPolicy.egress.manualEgress Manually define all egress rules
1612+
manualEgress: []
1613+
## E.X.
1614+
##- to:
1615+
## - podSelector:
1616+
## matchLabels:
1617+
## app.kubernetes.io/name: other-pod
1618+
## ports:
1619+
## - protocol: TCP
1620+
## port: 3000
16151621

16161622
# Enable backward compatibility of kubernetes where version below 1.13 doesn't have the enableServiceLinks option
16171623
enableKubeBackwardCompatibility: false

0 commit comments

Comments
 (0)