Skip to content

Commit 8c83a7c

Browse files
committed
Add manifest for the Postgres Operator
1 parent 396e259 commit 8c83a7c

File tree

4 files changed

+123
-2
lines changed

4 files changed

+123
-2
lines changed

charts/fider/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: fider
33
description: An open platform to collect and prioritize feedback
44
type: application
5-
version: 0.0.1
5+
version: 0.0.2
66
appVersion: 0.21.1
77
icon: https://fider.io/favicon-32x32.png
88
home: https://fider.io/

charts/fider/README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# fider
22

3-
![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.21.1](https://img.shields.io/badge/AppVersion-0.21.1-informational?style=flat-square)
3+
![Version: 0.0.2](https://img.shields.io/badge/Version-0.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.21.1](https://img.shields.io/badge/AppVersion-0.21.1-informational?style=flat-square)
44

55
An open platform to collect and prioritize feedback
66

@@ -62,6 +62,26 @@ The following table lists the configurable parameters of the chart and the defau
6262
| nodeSelector | object | `{}` | Selects the nodes where a pod can be scheduled based on node labels |
6363
| podAnnotations | object | `{}` | Key-value metadata for individual pods |
6464
| podSecurityContext | object | `{}` | Defines the security settings and privileges for a pod |
65+
| postgresOperator.MasterLoadBalancer | bool | `false` | |
66+
| postgresOperator.ReplicaLoadBalancer | bool | `false` | |
67+
| postgresOperator.connectionPooler.enabled | bool | `false` | Enable the connection pooler |
68+
| postgresOperator.connectionPooler.instanceCount | int | `3` | |
69+
| postgresOperator.connectionPooler.mode | string | `"session"` | In which mode to run connection pooler, transaction or session. |
70+
| postgresOperator.connectionPooler.resources | object | `{}` | Consumers of this chart can override postgres cluster pod resource limits as follows: |
71+
| postgresOperator.databases.fider | string | `"fider"` | |
72+
| postgresOperator.enableLogicalBackup | bool | `false` | Consumers of this chart can enable logical backups on a set schedule: |
73+
| postgresOperator.enabled | bool | `false` | Enable the [Postgres Operator](https://postgres-operator.readthedocs.io/)? |
74+
| postgresOperator.instanceCount | int | `1` | |
75+
| postgresOperator.logicalBackupSchedule | string | `"0 0 * * *"` | |
76+
| postgresOperator.parameters | object | `{}` | Consumers of this chart can override postgres parameters as follows: |
77+
| postgresOperator.patroni | object | `{"retry_timeout":30,"ttl":70}` | Patroni is a template for high availability (HA) PostgreSQL solutions using Python |
78+
| postgresOperator.podPriorityClassName | string | `""` | Consumers of this chart can set pod priority for postgres pods |
79+
| postgresOperator.resources | object | `{}` | |
80+
| postgresOperator.tls.enabled | bool | `false` | |
81+
| postgresOperator.tls.issuer | string | `"cert-manager-issuer-common"` | |
82+
| postgresOperator.users.fider[0] | string | `"superuser"` | |
83+
| postgresOperator.users.fider[1] | string | `"createdb"` | |
84+
| postgresOperator.volumeSize | string | `"8Gi"` | |
6585
| postgresql.enabled | bool | `false` | Enable the PostgreSQL subchart? |
6686
| postgresql.global.postgresql.auth.database | string | `"fider"` | PostgreSQL database |
6787
| postgresql.global.postgresql.auth.password | string | `"s0m3g00dp4ssw0rd"` | PostgreSQL password |
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{{- if .Values.postgresOperator.enabled }}
2+
{{- $fullName := include "fider.fullname" . }}
3+
apiVersion: "acid.zalan.do/v1"
4+
kind: postgresql
5+
metadata:
6+
name: {{ $fullName }}-db
7+
labels:
8+
{{- include "fider.labels" . | nindent 4 }}
9+
spec:
10+
teamId: {{ $fullName }}
11+
volume:
12+
size: {{ .Values.postgresOperator.volumeSize }}
13+
numberOfInstances: {{ .Values.postgresOperator.instanceCount }}
14+
{{- if .Values.postgresOperator.podPriorityClassName }}
15+
podPriorityClassName: {{ .Values.postgresOperator.podPriorityClassName }}
16+
{{- end }}
17+
{{- if .Values.postgresOperator.resources }}
18+
{{- with .Values.postgresOperator.resources }}
19+
resources:
20+
{{- toYaml . | nindent 4 }}
21+
{{- end -}}
22+
{{- end }}
23+
users:
24+
{{- with .Values.postgresOperator.users -}}
25+
{{ toYaml . | nindent 4 -}}
26+
{{- end }}
27+
databases:
28+
{{- with .Values.postgresOperator.databases -}}
29+
{{ toYaml . | nindent 4 -}}
30+
{{- end }}
31+
enableMasterLoadBalancer: {{ .Values.postgresOperator.MasterLoadBalancer }}
32+
enableReplicaLoadBalancer: {{ .Values.postgresOperator.ReplicaLoadBalancer }}
33+
enableLogicalBackup: {{ .Values.postgresOperator.enableLogicalBackup }}
34+
logicalBackupSchedule: {{ .Values.postgresOperator.logicalBackupSchedule }}
35+
36+
{{- if .Values.postgresOperator.connectionPooler.enabled }}
37+
enableConnectionPooler: true
38+
connectionPooler:
39+
numberOfInstances: {{ .Values.postgresOperator.connectionPooler.instanceCount }}
40+
mode: {{ .Values.postgresOperator.connectionPooler.mode }}
41+
{{- end }}
42+
postgresql:
43+
version: "15"
44+
{{- if .Values.postgresOperator.parameters }}
45+
{{- with .Values.postgresOperator.parameters }}
46+
parameters:
47+
{{- toYaml . | nindent 6 }}
48+
{{- end }}
49+
{{- end }}
50+
{{- if .Values.postgresOperator.patroni }}
51+
{{- with .Values.postgresOperator.patroni }}
52+
patroni:
53+
{{- toYaml . | nindent 4 }}
54+
{{- end }}
55+
{{- end }}
56+
{{- if .Values.postgresOperator.tls.enabled }}
57+
tls:
58+
secretName: "{{ $fullName }}-postgres-tls"
59+
{{- end }}
60+
{{- end }}

charts/fider/values.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,44 @@ postgresql:
228228
primary:
229229
persistence:
230230
size: 8Gi
231+
232+
postgresOperator:
233+
# -- Enable the [Postgres Operator](https://postgres-operator.readthedocs.io/)?
234+
enabled: false
235+
instanceCount: 1
236+
volumeSize: 8Gi
237+
# -- Consumers of this chart can set pod priority for postgres pods
238+
podPriorityClassName: ""
239+
MasterLoadBalancer: false
240+
ReplicaLoadBalancer: false
241+
users:
242+
fider: ["superuser", "createdb"]
243+
databases:
244+
fider: fider
245+
resources: {}
246+
tls:
247+
enabled: false
248+
issuer: cert-manager-issuer-common
249+
connectionPooler:
250+
# -- Enable the connection pooler
251+
enabled: false
252+
instanceCount: 3
253+
# -- In which mode to run connection pooler, transaction or session.
254+
mode: session
255+
# -- Consumers of this chart can override postgres cluster pod resource limits as follows:
256+
resources: {}
257+
# limits:
258+
# cpu: "1"
259+
# memory: 500Mi
260+
# requests:
261+
# cpu: 100m
262+
# memory: 100Mi
263+
# -- Consumers of this chart can override postgres parameters as follows:
264+
parameters: {}
265+
# -- Patroni is a template for high availability (HA) PostgreSQL solutions using Python
266+
patroni:
267+
retry_timeout: 30
268+
ttl: 70
269+
# -- Consumers of this chart can enable logical backups on a set schedule:
270+
enableLogicalBackup: false
271+
logicalBackupSchedule: "0 0 * * *"

0 commit comments

Comments
 (0)