Skip to content
Snippets Groups Projects
Commit 74b44d8a authored by Andri Joos's avatar Andri Joos :blush:
Browse files

add networkpolicy template

parent 4eea4329
No related branches found
No related tags found
No related merge requests found
Pipeline #7774 passed with stages
in 47 seconds
{{- define "common.networkpolicy" -}}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ .Values.name | default "network-policy" | quote }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "common.variables.labels" . | nindent 4 }}
spec:
{{- with .Values.podSelector }}
podSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
policyTypes:
{{- .Values.policyTypes | default (list) | toYaml | nindent 4 }}
{{- with .Values.ingress }}
ingress:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.egress }}
egress:
{{- toYaml . | nindent 4 }}
{{- end }}
---
{{- end }}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment