Public Information
This commit is contained in:
35
charts/cmis/templates/networkpolicy.tpl
Normal file
35
charts/cmis/templates/networkpolicy.tpl
Normal file
@@ -0,0 +1,35 @@
|
||||
{{- 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:
|
||||
- Ingress
|
||||
- Egress
|
||||
ingress:
|
||||
{{- if ( include "nplus.ingressEnabled" . ) }}
|
||||
{{- include "nplus.networkpolicy.allowFromIngress" . | nindent 2 }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{- include "nplus.networkpolicy.allowFromAdmin" . | nindent 2 }}
|
||||
|
||||
{{- include "nplus.networkpolicy.allowFromMon" . | nindent 2 }}
|
||||
|
||||
egress:
|
||||
{{- include "nplus.networkpolicy.allowToNappl" . | nindent 2 }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user