Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/helm/reflector/templates/networkPolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if .Values.networkPolicy.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "reflector.fullname" . }}
namespace: {{ include "reflector.namespace" . }}
labels:
{{- include "reflector.labels" . | nindent 4 }}

spec:
podSelector:
matchLabels:
{{- include "reflector.selectorLabels" . | nindent 6 }}
ingress:
{{- toYaml .Values.networkPolicy.ingress | nindent 4 }}
egress:
{{- toYaml .Values.networkPolicy.egress | nindent 4 }}
policyTypes:
- Ingress
- Egress
{{- end }}
25 changes: 24 additions & 1 deletion src/helm/reflector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,29 @@ configuration:
rbac:
enabled: true

networkPolicy:
enabled: false
# Ingress is disabled by default (all ingress traffic dropped)
ingress: []
# Egress permitted to any namespace on standard kubernetes service ports
egress:
# Allow DNS (53/udp and 53/tcp) - kubernetes DNS service
- ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
# Allow HTTP and HTTPS (80/tcp and 443/tcp) - kubernetes API services
- ports:
- protocol: TCP
port: 80
- protocol: TCP
port: 443
# Allow kubernetes API server (6443/tcp) - default kubernetes API server port
- ports:
- protocol: TCP
port: 6443

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down Expand Up @@ -123,4 +146,4 @@ priorityClassName: ""

volumes: []

volumeMounts: []
volumeMounts: []