You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The control NetworkPolicy only ever allowed traffic from the
ingress-nginx namespace, with no way to add more. In clusters that
deny pod-to-pod traffic by default, that leaves no way to permit
other legitimate callers, such as PgDog pods reaching the control
plane's API.
Add networkPolicy.extraIngress, a list of NetworkPolicyIngressRule
entries appended to the control NetworkPolicy's ingress rules
verbatim, alongside the existing ingress-nginx rule.
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ The PgDog deployment contains the following components:
48
48
| ConfigMap | Configuration for the control plane. |
49
49
| Secret | Secret that stores the key used to encrypt authentication cookies. |
50
50
| Service account, Cluster role, Cluster role bindings | Service account with RBAC to access select Kube APIs. See [RBAC](#rbac) for more details. |
51
+
| NetworkPolicy | Optional; restricts ingress/egress traffic. See [NetworkPolicy](#networkpolicy) for more details. |
51
52
52
53
In addition to installing the PgDog control plane, this chart will deploy a Redis deployment (with one replica). The control plane uses Redis for storing
53
54
metrics. The Redis deployment has the following components:
@@ -293,6 +294,37 @@ In the above example, the dashboard can see workloads in every namespace, but it
293
294
294
295
If your cluster manages RBAC out-of-band (a platform team's controller, GitOps, an admission policy), set `control.rbac.create: false`. The chart then renders no ServiceAccount, no ClusterRole/Binding, and no Role/Bindings, and the deployment runs the pod with `automountServiceAccountToken: false`. The dashboard still serves the UI, but every Kubernetes-backed view will be empty until you bind an externally-managed ServiceAccount with equivalent permissions to the pod yourself.
295
296
297
+
## NetworkPolicy
298
+
299
+
When `networkPolicy.enabled` is `true`, the chart renders a `NetworkPolicy` for the control pod and one for Redis, restricting traffic to what the control plane actually needs:
300
+
301
+
- Ingress on `control.port` from the `ingress-nginx` namespace only.
302
+
- Egress to Redis, to `kube-system` for DNS, and to the public internet on 5432 (Postgres) and 443 (HTTPS, e.g. the AWS/CloudWatch/RDS APIs), excluding RFC1918 private ranges.
303
+
- Redis accepts ingress only from the control pod and allows no egress.
304
+
305
+
In clusters that deny pod-to-pod traffic by default, the built-in ingress-nginx rule alone often isn't enough — for example, PgDog pods calling the control plane's API need their own rule. Use `networkPolicy.extraIngress` to add any number of additional ingress rules to the control `NetworkPolicy`:
306
+
307
+
```yaml
308
+
networkPolicy:
309
+
enabled: true
310
+
extraIngress:
311
+
- from:
312
+
- namespaceSelector:
313
+
matchLabels:
314
+
kubernetes.io/metadata.name: pgdog
315
+
podSelector:
316
+
matchLabels:
317
+
app.kubernetes.io/name: pgdog
318
+
ports:
319
+
- protocol: TCP
320
+
port: 8080
321
+
```
322
+
323
+
| Option | Description |
324
+
|-|-|
325
+
| `networkPolicy.enabled` | Render the control and Redis `NetworkPolicy` resources (bool, default `false`). |
326
+
| `networkPolicy.extraIngress` | Additional ingress rules appended to the control `NetworkPolicy`, on top of the built-in ingress-nginx rule. Each entry follows the standard `NetworkPolicyIngressRule` schema (`from`/`ports`) and is passed through verbatim (list, default `[]`). |
327
+
296
328
## AWS access (EKS / IRSA)
297
329
298
330
The control plane reads RDS topology and CloudWatch metrics so the dashboard can show your databases alongside the PgDog workloads. To do that in EKS without baking long-lived keys into the cluster, the recommended path is **IRSA** (IAM Roles for Service Accounts).
0 commit comments