Public Information
This commit is contained in:
33
charts/database/templates/networkpolicy.tpl
Normal file
33
charts/database/templates/networkpolicy.tpl
Normal file
@@ -0,0 +1,33 @@
|
||||
{{- include "nplus.init" $ -}}
|
||||
{{- if ((.this.security).cni).createNetworkPolicy }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
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:
|
||||
- Ingress
|
||||
ingress:
|
||||
- from:
|
||||
# Allow access from NAPPL Cores
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
nplus/group: {{ .instance.group }}
|
||||
nplus/type: core
|
||||
{{- if ((.this.security).cni).excludeUnusedPorts }}
|
||||
ports:
|
||||
{{- include "nplus.defaultPolicyPorts" . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user