mirror of
https://github.com/bitnami/charts.git
synced 2026-03-13 14:57:24 +08:00
* 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>
35 lines
1.3 KiB
YAML
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 }}
|