Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a13eab-1e6a-7b33-9c37-372e90ada3a2
69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
{
|
|
"apiVersion": "networking.k8s.io/v1",
|
|
"kind": "NetworkPolicy",
|
|
"metadata": {
|
|
"name": "audit-core-migrate-egress",
|
|
"namespace": "audit-core"
|
|
},
|
|
"spec": {
|
|
"podSelector": {
|
|
"matchLabels": {
|
|
"app.kubernetes.io/name": "audit-core",
|
|
"app.kubernetes.io/component": "migrate"
|
|
}
|
|
},
|
|
"policyTypes": [
|
|
"Egress"
|
|
],
|
|
"egress": [
|
|
{
|
|
"to": [
|
|
{
|
|
"namespaceSelector": {
|
|
"matchLabels": {
|
|
"kubernetes.io/metadata.name": "databases"
|
|
}
|
|
},
|
|
"podSelector": {
|
|
"matchLabels": {
|
|
"cnpg.io/cluster": "platform-pg"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"ports": [
|
|
{
|
|
"protocol": "TCP",
|
|
"port": 5432
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"to": [
|
|
{
|
|
"namespaceSelector": {
|
|
"matchLabels": {
|
|
"kubernetes.io/metadata.name": "kube-system"
|
|
}
|
|
},
|
|
"podSelector": {
|
|
"matchLabels": {
|
|
"k8s-app": "kube-dns"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"ports": [
|
|
{
|
|
"protocol": "UDP",
|
|
"port": 53
|
|
},
|
|
{
|
|
"protocol": "TCP",
|
|
"port": 53
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|