templates/networkPolicy.yaml を追加
This commit is contained in:
22
templates/networkPolicy.yaml
Normal file
22
templates/networkPolicy.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{{- if .Values.networkPolicy.enabled }}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: {{ include "phpmyadmin-nginx.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "phpmyadmin-nginx.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "phpmyadmin-nginx.selectorLabels" . | nindent 6 }}
|
||||||
|
policyTypes:
|
||||||
|
{{- toYaml .Values.networkPolicy.policyTypes | nindent 4 }}
|
||||||
|
{{- if .Values.networkPolicy.ingress }}
|
||||||
|
ingress:
|
||||||
|
{{- toYaml .Values.networkPolicy.ingress | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.networkPolicy.egress }}
|
||||||
|
egress:
|
||||||
|
{{- toYaml .Values.networkPolicy.egress | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
Reference in New Issue
Block a user