Files
charts/bitnami/phpmyadmin/templates/networkpolicy-backend-ingress.yaml
Pablo Galego 5816c03620 [bitnami/*] Add network policies - fourth batch (#8154)
* [bitnami/phpbb] Add Network policies

* [bitnami/phpbb] Fix misc errors

* [bitnami/phpmyadmin] Add Network policies

* [bitnami/prestashop] Add Network policies

* [bitnami/redmine] Add Network policies

* [bitnami/redmine] Support backend switch between mariadb and postgresql
2021-11-17 16:09:07 +01:00

28 lines
1.2 KiB
YAML

{{- if and .Values.networkPolicy.enabled .Values.networkPolicy.ingressRules.backendOnlyAccessibleByFrontend }}
apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
kind: NetworkPolicy
metadata:
name: {{ printf "%s-backend" (include "common.names.fullname" .) }}
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:
{{- if .Values.networkPolicy.ingressRules.customBackendSelector }}
{{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.customBackendSelector "context" $) | nindent 6 }}
{{- else }}
app.kubernetes.io/name: mariadb
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
ingress:
- from:
- podSelector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 14 }}
{{- end }}