[bitnami/postgresql] Allow specifying different resource requests/limits on slaves (#3800)

This commit is contained in:
Douglas Vaghetti
2020-09-29 17:26:32 +02:00
committed by GitHub
parent add3303181
commit 204d41df2b
5 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: postgresql
version: 9.7.4
version: 9.8.0
appVersion: 11.9.0
description: Chart for PostgreSQL, an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.
keywords:
+1
View File
@@ -182,6 +182,7 @@ The following tables lists the configurable parameters of the PostgreSQL chart a
| `slave.affinity` | Affinity labels for pod assignment (postgresql slave) | `{}` |
| `slave.tolerations` | Toleration labels for pod assignment (postgresql slave) | `[]` |
| `slave.anotations` | Map of annotations to add to the statefulsets (postgresql slave) | `{}` |
| `slave.resources` | CPU/Memory resource requests/limits override for slaves. Will fallback to `values.resources` if not defined. | `{}` |
| `slave.labels` | Map of labels to add to the statefulsets (postgresql slave) | `{}` |
| `slave.podAnnotations` | Map of annotations to add to the pods (postgresql slave) | `{}` |
| `slave.podLabels` | Map of labels to add to the pods (postgresql slave) | `{}` |
@@ -1,4 +1,5 @@
{{- if .Values.replication.enabled }}
{{- $slaveResources := coalesce .Values.slave.resources .Values.resources -}}
apiVersion: {{ template "postgresql.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
@@ -134,8 +135,8 @@ spec:
- name: {{ template "postgresql.fullname" . }}
image: {{ template "postgresql.image" . }}
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- if $slaveResources }}
resources: {{- toYaml $slaveResources | nindent 12 }}
{{- end }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
@@ -517,6 +517,12 @@ slave:
persistence:
enabled: true
# Override the resource configuration for slave
resources: {}
# requests:
# memory: 256Mi
# cpu: 250m
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
+7
View File
@@ -517,11 +517,18 @@ slave:
# type:
# nodePort:
# clusterIP:
## Whether to enable PostgreSQL slave replicas data Persistent
##
persistence:
enabled: true
# Override the resource configuration for slave
resources: {}
# requests:
# memory: 256Mi
# cpu: 250m
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##