mirror of
https://github.com/versity/versitygw.git
synced 2026-07-02 16:54:25 +00:00
25 lines
766 B
YAML
25 lines
766 B
YAML
{{- if .Values.networkPolicy.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: {{ include "versitygw.fullname" . }}
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
{{- include "versitygw.selectorLabels" . | nindent 6 }}
|
|
# Permit ingress traffic only from the specified namespaces and pods
|
|
ingress:
|
|
- from:
|
|
namespaceSelector:
|
|
matchLabels: {{- toYaml .Values.networkPolicy.allowIngressFromNamespaces | nindent 10 }}
|
|
podSelector: {{- toYaml .Values.networkPolicy.allowIngressFromPods | nindent 10 }}
|
|
# By omitting the ports specification we apply this NetworkPolicy to all ports
|
|
ports: []
|
|
# All egress traffic is allowed
|
|
egress:
|
|
- {}
|
|
policyTypes:
|
|
- Ingress
|
|
- Egress
|
|
{{- end }}
|