Skip to content

Commit 23861e5

Browse files
authored
Merge pull request #2374 from jcpunk/networkPolicy
chore(helm): add optional networkPolicy
2 parents 51c1bf0 + 0eef785 commit 23861e5

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{- if .Values.networkPolicy.enabled }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: NetworkPolicy
4+
metadata:
5+
name: {{ template "kepler.fullname" . }}-network-policy
6+
namespace: {{ include "kepler.namespace" . }}
7+
spec:
8+
egress:
9+
{{- with .Values.networkPolicy.egress }}
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
ingress:
13+
{{- with .Values.networkPolicy.ingress }}
14+
{{- toYaml . | nindent 4 }}
15+
{{- end }}
16+
podSelector:
17+
matchLabels:
18+
{{- include "kepler.selectorLabels" . | nindent 6 }}
19+
policyTypes:
20+
- Egress
21+
- Ingress
22+
{{- end }}

manifests/helm/kepler/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,15 @@ serviceMonitor:
118118
labels: {}
119119
annotations: {}
120120

121+
# A networkPolicy for Kepler
122+
networkPolicy:
123+
enabled: false
124+
ingress:
125+
- ports:
126+
- protocol: TCP
127+
port: 28282
128+
egress: []
129+
121130
# Additional labels to add to all resources
122131
labels: {}
123132

0 commit comments

Comments
 (0)