first commit
This commit is contained in:
39
templates/fluent-bit/calico.netpol.yaml
Normal file
39
templates/fluent-bit/calico.netpol.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
{{- if .Values.fluentBit.calicoNetpol.enabled }}
|
||||
apiVersion: projectcalico.org/v3
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: {{ template "fluent-bit.appName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
order: 10
|
||||
selector: dplane == 'fluent-bit'
|
||||
types:
|
||||
- Egress
|
||||
egress:
|
||||
# allow to communicate to DNS pods
|
||||
- action: Allow
|
||||
protocol: UDP
|
||||
destination:
|
||||
namespaceSelector: projectcalico.org/name == 'kube-system'
|
||||
ports:
|
||||
- 53
|
||||
- action: Allow
|
||||
protocol: TCP
|
||||
destination:
|
||||
namespaceSelector: projectcalico.org/name == 'kube-system'
|
||||
ports:
|
||||
- 53
|
||||
# allow to communicate with itself for clustering
|
||||
- action: Allow
|
||||
destination:
|
||||
selector: dplane == 'fluent-bit'
|
||||
namespaceSelector: projectcalico.org/name == '{{ .Release.Namespace }}'
|
||||
protocol: TCP
|
||||
# allow to communicate with k8s api server
|
||||
- action: Allow
|
||||
destination:
|
||||
services:
|
||||
name: kubernetes
|
||||
namespace: default
|
||||
protocol: TCP
|
||||
{{- end}}
|
||||
Reference in New Issue
Block a user