Skip to content

Commit

Permalink
feat: add a network policy (#36)
Browse files Browse the repository at this point in the history
Signed-off-by: Davide Madrisan <[email protected]>
  • Loading branch information
madrisan authored Apr 5, 2024
1 parent 327a244 commit bbf86f3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions templates/network-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.global.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
annotations:
name: {{ .Release.Name }}
spec:
policyTypes:
- Egress
- Ingress
egress:
{{- with .Values.global.networkPolicy }}
{{- toYaml .egress | nindent 4 }}
{{- end }}
ingress:
{{- with .Values.global.networkPolicy }}
{{- toYaml .ingress | nindent 4 }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ global:
#apiHostname:
#className:

networkPolicy:
enabled: false
egress: []
ingress: []

#serviceAccountName:

# If kubectlVersion is not supplied it will be inferred using the version of the cluster that Lago is deployed on.
Expand Down

0 comments on commit bbf86f3

Please sign in to comment.