32 lines
776 B
YAML
32 lines
776 B
YAML
{{- if .Values.networkPolicy.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: {{ include "terraform-registry.fullname" . }}-netpol
|
|
namespace: {{ .Values.global.namespace }}
|
|
labels:
|
|
{{- include "terraform-registry.labels" . | nindent 4 }}
|
|
spec:
|
|
podSelector: {}
|
|
policyTypes:
|
|
- Ingress
|
|
- Egress
|
|
ingress:
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: ingress-nginx
|
|
ports:
|
|
- port: {{ .Values.registry.service.targetPort }}
|
|
protocol: TCP
|
|
egress:
|
|
- to: []
|
|
ports:
|
|
- port: 443 # S3, Vault
|
|
protocol: TCP
|
|
- port: 53 # DNS
|
|
protocol: UDP
|
|
- port: 53
|
|
protocol: TCP
|
|
{{- end }}
|