Skip to content

Commit

Permalink
Merge pull request #19 from guilherme-santos03/master
Browse files Browse the repository at this point in the history
[FEAT] add netpol template to fluentbit
  • Loading branch information
Ahmad-Faizan authored Aug 23, 2024
2 parents 8b22008 + 33905fe commit 8b74d0c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions argocd-helm-charts/fluent-bit/templates/netpol-fluentbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{{ if .Values.networkpolicies }}
apiVersion: crd.projectcalico.org/v1
kind: NetworkPolicy
metadata:
name: default.fluentbit
namespace: logging
spec:
order: 100
selector:
app.kubernetes.io/name == 'fluent-bit'
types:
- Egress
egress:
- action: Allow
protocol: TCP
destination:
ports:
- 5555
# Connect to kube2iam, and allow filebeat to get k8s node metadata
- action: Allow
protocol: TCP
destination:
ports:
- 8181
- 443
selector: kubernetes.io/role in { 'node', 'master' }
namespaceSelector: global()
# Allow access to EC2 metadata endpoint
- action: Allow
protocol: TCP
destination:
ports:
- 443
nets:
- 169.254.169.254/32
{{ end }}
1 change: 1 addition & 0 deletions argocd-helm-charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
networkpolicies: false
fluent-bit:
image:
pullPolicy: IfNotPresent
Expand Down

0 comments on commit 8b74d0c

Please sign in to comment.