Skip to content

Commit d69fa24

Browse files
committed
add resource limits for clusters
1 parent 041b2a0 commit d69fa24

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

charts/cloudnative-pg-cluster/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: cnpg-cluster
33
description: Create postgres tenant clusters managed by the CNPG Operator
44
type: application
5-
version: 0.3.12
5+
version: 0.3.13
66

77
maintainers:
88
- name: "cloudymax"

charts/cloudnative-pg-cluster/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# cnpg-cluster
22

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

55
Create postgres tenant clusters managed by the CNPG Operator
66

@@ -43,6 +43,8 @@ Create postgres tenant clusters managed by the CNPG Operator
4343
| name | string | `"cnpg"` | |
4444
| postgresql.pg_hba | list | `["hostnossl all all 0.0.0.0/0 reject","hostssl all all 0.0.0.0/0 cert clientcert=verify-full"]` | records for the pg_hba.conf file. ref: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html |
4545
| primaryUpdateStrategy | string | `"unsupervised"` | |
46+
| resources.limits | object | `{"cpu":1000,"memory":"1024Mi"}` | resource limit for pods |
47+
| resources.requests | object | `{"cpu":500,"memory":"512Mi"}` | minimum resources guaranteed for pods |
4648
| scheduledBackup.name | string | `"example-backup"` | name to use for your scheduled backup job |
4749
| scheduledBackup.spec.backupOwnerReference | string | `"self"` | |
4850
| scheduledBackup.spec.cluster.name | string | `"pg-backup"` | |
@@ -52,4 +54,4 @@ Create postgres tenant clusters managed by the CNPG Operator
5254
| testApp.enabled | bool | `false` | |
5355

5456
----------------------------------------------
55-
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
57+
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)

charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ spec:
2828
postgresql:
2929
{{- toYaml . | nindent 4 }}
3030
{{- end }}
31+
resources:
32+
{{- toYaml .Values.resources | nindent 4 }}
3133
storage:
3234
size: {{ .Values.storage.size }}
3335
bootstrap:
@@ -72,4 +74,3 @@ spec:
7274
{{- toYaml . | nindent 6 }}
7375
{{- end }}
7476
{{- end }}
75-

charts/cloudnative-pg-cluster/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,16 @@ storage:
145145
# -- how much storage to allocate to the postgresql cluster
146146
size: 1Gi
147147

148+
resources:
149+
# -- minimum resources guaranteed for pods
150+
requests:
151+
cpu: 500
152+
memory: "512Mi"
153+
# -- resource limit for pods
154+
limits:
155+
cpu: 1000
156+
memory: "1024Mi"
157+
148158
testApp:
149159
## -- create a test deployment to verify db connectivity.
150160
# Populates user and DB from the Initdb owner and database values

0 commit comments

Comments
 (0)