aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/model-repo/templates/networkpolicy.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/model-repo/templates/networkpolicy.yaml')
-rw-r--r--vnfs/DAaaS/model-repo/templates/networkpolicy.yaml25
1 files changed, 25 insertions, 0 deletions
diff --git a/vnfs/DAaaS/model-repo/templates/networkpolicy.yaml b/vnfs/DAaaS/model-repo/templates/networkpolicy.yaml
new file mode 100644
index 00000000..de57f485
--- /dev/null
+++ b/vnfs/DAaaS/model-repo/templates/networkpolicy.yaml
@@ -0,0 +1,25 @@
+{{- if .Values.networkPolicy.enabled }}
+kind: NetworkPolicy
+apiVersion: {{ template "minio.networkPolicy.apiVersion" . }}
+metadata:
+ name: {{ template "minio.fullname" . }}
+ labels:
+ app: {{ template "minio.name" . }}
+ chart: {{ template "minio.chart" . }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ podSelector:
+ matchLabels:
+ app: {{ template "minio.name" . }}
+ release: {{ .Release.Name }}
+ ingress:
+ - ports:
+ - port: {{ .Values.service.port }}
+ {{- if not .Values.networkPolicy.allowExternal }}
+ from:
+ - podSelector:
+ matchLabels:
+ {{ template "minio.name" . }}-client: "true"
+ {{- end }}
+{{- end }}