forked from cloudnative-pg/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cluster): Allow to deploy multiple poolers (cloudnative-pg#357)
* feat(cluster): Allow to deploy multiple poolers * Update NOTES.txt --------- Signed-off-by: Dmitriy Alekseev <[email protected]> Signed-off-by: Itay Grudev <[email protected]> Signed-off-by: Itay Grudev <[email protected]> Co-authored-by: Itay Grudev <[email protected]> Co-authored-by: Itay Grudev <[email protected]>
- Loading branch information
1 parent
4647b6f
commit 75a26f7
Showing
9 changed files
with
192 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,34 @@ | ||
type: postgresql | ||
mode: standalone | ||
|
||
cluster: | ||
instances: 1 | ||
monitoring: | ||
enabled: true | ||
podMonitor: | ||
enabled: true | ||
|
||
backups: | ||
enabled: false | ||
pooler: | ||
enabled: true | ||
instances: 1 | ||
|
||
poolers: | ||
- name: rw | ||
type: rw | ||
instances: 1 | ||
monitoring: | ||
enabled: true | ||
podMonitor: | ||
enabled: true | ||
relabelings: | ||
- targetLabel: type | ||
replacement: rw | ||
- name: ro | ||
type: ro | ||
instances: 1 | ||
monitoring: | ||
enabled: true | ||
podMonitor: | ||
enabled: true | ||
relabelings: | ||
- targetLabel: type | ||
replacement: ro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
{{ if .Values.pooler.enabled }} | ||
{{- range .Values.poolers }} | ||
--- | ||
apiVersion: postgresql.cnpg.io/v1 | ||
kind: Pooler | ||
metadata: | ||
name: {{ include "cluster.fullname" . }}-pooler-rw | ||
name: {{ include "cluster.fullname" $ }}-pooler-{{ .name }} | ||
spec: | ||
cluster: | ||
name: {{ include "cluster.fullname" . }} | ||
instances: {{ .Values.pooler.instances }} | ||
type: {{ .Values.pooler.type }} | ||
name: {{ include "cluster.fullname" $ }} | ||
instances: {{ .instances }} | ||
type: {{ default "rw" .type }} | ||
pgbouncer: | ||
poolMode: {{ .Values.pooler.poolMode }} | ||
poolMode: {{ default "session" .poolMode }} | ||
{{- with .parameters }} | ||
parameters: | ||
{{- .Values.pooler.parameters | toYaml | nindent 6 }} | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
{{ with .monitoring }} | ||
monitoring: | ||
enablePodMonitor: {{ and .Values.pooler.monitoring.enabled .Values.pooler.monitoring.podMonitor.enabled }} | ||
{{- if not (empty .Values.pooler.monitoring.podMonitor.relabelings) }} | ||
{{- with .Values.pooler.monitoring.podMonitor.relabelings }} | ||
{{- if not (empty .podMonitor) }} | ||
enablePodMonitor: {{ and .enabled .podMonitor.enabled }} | ||
{{- with .podMonitor.relabelings }} | ||
podMonitorRelabelings: | ||
{{- toYaml . | nindent 6 }} | ||
{{ end }} | ||
{{- end }} | ||
{{- if not (empty .Values.pooler.monitoring.podMonitor.metricRelabelings) }} | ||
{{- with .Values.pooler.monitoring.podMonitor.metricRelabelings }} | ||
{{- with .podMonitor.metricRelabelings }} | ||
podMonitorMetricRelabelings: | ||
{{- toYaml . | nindent 6 }} | ||
{{ end }} | ||
{{- end }} | ||
{{- with .Values.pooler.template }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with .template }} | ||
template: | ||
{{- . | toYaml | nindent 4 }} | ||
{{- end }} | ||
{{ end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters