Skip to content

Commit

Permalink
[stable/postgresql] Fix NetworkPolicy in replicated mode (helm#13863)
Browse files Browse the repository at this point in the history
* stable/postgresql: Fix NetworkPolicy in replicated mode

With replication enabled and a network policy that prevents external
communication, i.e.

```yaml
replication:
  enabled: true
networkPolicy:
  enabled: true
  allowExternal: false
```

the slave pods are not allowed to connect to the master, which causes
them to enter into a crash loop.

This commit expands the ingress policy to allow communication from the
slaves to the master on port 5432.

Signed-off-by: Benoît Knecht <benoit.knecht@fsfe.org>

* stable/postgresql: Bump chart version number to 4.2.2

Signed-off-by: Benoît Knecht <benoit.knecht@fsfe.org>
  • Loading branch information
BenoitKnecht authored and eyenx committed May 28, 2019
1 parent 42bf1c7 commit 02a0e71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/postgresql/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: postgresql
version: 4.2.1
version: 4.2.2
appVersion: 10.8.0
description: Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.
keywords:
Expand Down
5 changes: 5 additions & 0 deletions stable/postgresql/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ spec:
- podSelector:
matchLabels:
{{ template "postgresql.fullname" . }}-client: "true"
- podSelector:
matchLabels:
app: {{ template "postgresql.name" . }}
release: {{ .Release.Name | quote }}
role: slave
{{- end }}
# Allow prometheus scrapes
- ports:
Expand Down

0 comments on commit 02a0e71

Please sign in to comment.