2024-01-24 08:27:57 +01:00
|
|
|
{{- if and (.Values.networkPolicy.enabled) (eq .Values.networkPolicy.flavor "kubernetes") }}
|
2021-08-21 04:00:54 +05:30
|
|
|
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:
|
2022-07-14 23:28:34 +02:00
|
|
|
- port: {{ .Values.minioAPIPort }}
|
|
|
|
- port: {{ .Values.minioConsolePort }}
|
2021-08-21 04:00:54 +05:30
|
|
|
{{- if not .Values.networkPolicy.allowExternal }}
|
|
|
|
from:
|
|
|
|
- podSelector:
|
|
|
|
matchLabels:
|
|
|
|
{{ template "minio.name" . }}-client: "true"
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|