Skip to content

Commit

Permalink
Merge pull request #33 from small-hack/fix/resource-request-too-big
Browse files Browse the repository at this point in the history
fix issue with missing m on cpu requets. we want 100m, not 100
  • Loading branch information
cloudymax authored Mar 31, 2024
2 parents aec91db + 0d3d320 commit e6f0b9f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci-helm-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ jobs:
postgresql:
pg_hba:
- hostssl all all all cert
resources:
requests:
cpu: "50m"
memory: "256Mi"
limits:
cpu: "1000m"
memory: "1024Mi"
storage:
size: 1Gi
testApp:
Expand Down
2 changes: 1 addition & 1 deletion charts/cloudnative-pg-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: cnpg-cluster
description: Create postgres tenant clusters managed by the CNPG Operator
type: application
version: 0.3.13
version: 0.3.14

maintainers:
- name: "cloudymax"
Expand Down
8 changes: 4 additions & 4 deletions charts/cloudnative-pg-cluster/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cnpg-cluster

![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)
![Version: 0.3.14](https://img.shields.io/badge/Version-0.3.14-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Create postgres tenant clusters managed by the CNPG Operator

Expand Down Expand Up @@ -43,8 +43,8 @@ Create postgres tenant clusters managed by the CNPG Operator
| name | string | `"cnpg"` | |
| 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 |
| primaryUpdateStrategy | string | `"unsupervised"` | |
| resources.limits | object | `{"cpu":1000,"memory":"1024Mi"}` | resource limit for pods |
| resources.requests | object | `{"cpu":500,"memory":"512Mi"}` | minimum resources guaranteed for pods |
| resources.limits | object | `{"cpu":"1000m","memory":"512Mi"}` | resource limit for pods |
| resources.requests | object | `{"cpu":"50m","memory":"64Mi"}` | minimum resources guaranteed for pods |
| scheduledBackup.name | string | `"example-backup"` | name to use for your scheduled backup job |
| scheduledBackup.spec.backupOwnerReference | string | `"self"` | |
| scheduledBackup.spec.cluster.name | string | `"pg-backup"` | |
Expand All @@ -54,4 +54,4 @@ Create postgres tenant clusters managed by the CNPG Operator
| testApp.enabled | bool | `false` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
4 changes: 3 additions & 1 deletion charts/cloudnative-pg-cluster/templates/cnpg_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ spec:
postgresql:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml .Values.resources | nindent 4 }}
{{- toYaml . | nindent 4 }}
{{- end }}
storage:
size: {{ .Values.storage.size }}
bootstrap:
Expand Down
15 changes: 8 additions & 7 deletions charts/cloudnative-pg-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,16 @@ storage:
# -- how much storage to allocate to the postgresql cluster
size: 1Gi

resources:
# from https://cloudnative-pg.io/documentation/1.22/resource_management/
resources: {}
# -- minimum resources guaranteed for pods
requests:
cpu: 500
memory: "512Mi"
# requests:
# cpu: "50m"
# memory: "64Mi"
# -- resource limit for pods
limits:
cpu: 1000
memory: "1024Mi"
# limits:
# cpu: "1000m"
# memory: "512Mi"

testApp:
## -- create a test deployment to verify db connectivity.
Expand Down

0 comments on commit e6f0b9f

Please sign in to comment.