Files
nplus/charts/application/templates/networkpolicy.tpl

28 lines
833 B
Smarty
Raw Normal View History

2026-03-10 07:33:55 +01:00
{{- include "nplus.init" $ -}}
{{- if ((.this.security).cni).createNetworkPolicy }}
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: {{ .component.fullName }}
{{- if .this.utils.includeNamespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "nplus.instanceLabels" . | nindent 4 }}
annotations:
{{- include "nplus.argoWave" . | nindent 4 }}
{{- include "nplus.annotations" . | nindent 4 }}
{{- include "nplus.securityAnnotations" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "nplus.selectorLabels" . | nindent 6 }}
policyTypes:
- Egress
egress:
- to:
- podSelector:
matchLabels:
nplus/group: {{ .instance.group }}
nplus/type: core
{{- end }}{{/* if ((.this.security).cni).createNetworkPolicy */}}