mirror of
https://github.com/block/buzz.git
synced 2026-10-31 14:31:02 +00:00
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
29 lines
1.1 KiB
YAML
29 lines
1.1 KiB
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: {{ include "push.name" . }}-migration
|
|
labels: {{- include "push.migrationLabels" . | nindent 4 }}
|
|
annotations:
|
|
# Hooks precede ordinary manifests. Keep this policy alive until the next
|
|
# release's before-hook-creation cleanup so it covers the later Job hook.
|
|
helm.sh/hook: pre-install,pre-upgrade
|
|
helm.sh/hook-weight: "-10"
|
|
helm.sh/hook-delete-policy: before-hook-creation
|
|
spec:
|
|
podSelector:
|
|
matchLabels: {{- include "push.migrationLabels" . | nindent 6 }}
|
|
policyTypes: [Ingress, Egress]
|
|
ingress: []
|
|
egress:
|
|
- to:
|
|
- namespaceSelector:
|
|
matchLabels: {{- toYaml .Values.networkPolicy.dns.namespaceSelector | nindent 14 }}
|
|
podSelector:
|
|
matchLabels: {{- toYaml .Values.networkPolicy.dns.podSelector | nindent 14 }}
|
|
ports: [{ port: 53, protocol: UDP }, { port: 53, protocol: TCP }]
|
|
- to:
|
|
{{- range .Values.networkPolicy.postgresEgressCidrs }}
|
|
- ipBlock: { cidr: {{ . }} }
|
|
{{- end }}
|
|
ports: [{ port: 5432, protocol: TCP }]
|