Files
charts/bitnami/minio/templates/networkpolicy.yaml
Dennis Urban f4499c4b98 [bitnami/minio] quote all namespaces (#9734)
* quote all namespaces

Signed-off-by: Dennis Urban <mail@dpunkturban.io>

* bump version

Signed-off-by: Dennis Urban <mail@dpunkturban.io>

* bump version

Signed-off-by: Dennis Urban <mail@dpunkturban.io>

Co-authored-by: Dennis Urban <dennis.urban@flipapp.de>
2022-04-12 11:14:20 +02:00

35 lines
1.3 KiB
YAML

{{- if .Values.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
podSelector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
ingress:
# Allow inbound connections
- ports:
- port: {{ .Values.containerPorts.console }}
- port: {{ .Values.containerPorts.api }}
{{- if not .Values.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels:
{{ include "common.names.fullname" . }}-client: "true"
- podSelector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }}
{{- if .Values.networkPolicy.extraFromClauses }}
{{- toYaml .Values.networkPolicy.extraFromClauses | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}