mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Postgresql: Adding affinity section to deployment (#2585)
* adding affinity setting to postgresql deployment * bumpding postgresql chart version * postgresql: fixing a yamllint complain * [stable/postgresql] adding affinity to values and readme
This commit is contained in:
committed by
Reinhard Nägele
parent
599b41c103
commit
752cfe95bb
@@ -1,5 +1,5 @@
|
||||
name: postgresql
|
||||
version: 0.8.3
|
||||
version: 0.8.4
|
||||
description: Object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.
|
||||
keywords:
|
||||
- postgresql
|
||||
|
||||
@@ -71,6 +71,7 @@ The following tables lists the configurable parameters of the PostgresSQL chart
|
||||
| `networkPolicy.enabled` | Enable NetworkPolicy | `false` |
|
||||
| `networkPolicy.allowExternal` | Don't require client label for connections | `true` |
|
||||
| `nodeSelector` | Node labels for pod assignment | {} |
|
||||
| `affinity` | Affinity settings for pod assignment | {} |
|
||||
| `tolerations` | Toleration labels for pod assignment | [] |
|
||||
|
||||
The above parameters map to the env variables defined in [postgres](http://github.com/docker-library/postgres). For more information please refer to the [postgres](http://github.com/docker-library/postgres) image documentation.
|
||||
|
||||
@@ -13,6 +13,10 @@ spec:
|
||||
labels:
|
||||
app: {{ template "postgresql.fullname" . }}
|
||||
spec:
|
||||
{{- if .Values.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.nodeSelector | indent 8 }}
|
||||
|
||||
@@ -56,18 +56,18 @@ metrics:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 100m
|
||||
## Define additional custom metrics
|
||||
## ref: https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file
|
||||
#customMetrics:
|
||||
# pg_database:
|
||||
# query: "SELECT d.datname AS name, CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catalog.pg_database_size(d.datname) ELSE 0 END AS size FROM pg_catalog.pg_database d where datname not in ('template0', 'template1', 'postgres')"
|
||||
# metrics:
|
||||
# - name:
|
||||
# usage: "LABEL"
|
||||
# description: "Name of the database"
|
||||
# - size_bytes:
|
||||
# usage: "GAUGE"
|
||||
# description: "Size of the database in bytes"
|
||||
## Define additional custom metrics
|
||||
## ref: https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file
|
||||
# customMetrics:
|
||||
# pg_database:
|
||||
# query: "SELECT d.datname AS name, CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT') THEN pg_catalog.pg_database_size(d.datname) ELSE 0 END AS size FROM pg_catalog.pg_database d where datname not in ('template0', 'template1', 'postgres')"
|
||||
# metrics:
|
||||
# - name:
|
||||
# usage: "LABEL"
|
||||
# description: "Name of the database"
|
||||
# - size_bytes:
|
||||
# usage: "GAUGE"
|
||||
# description: "Size of the database in bytes"
|
||||
|
||||
## Configure resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
@@ -99,3 +99,4 @@ networkPolicy:
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
Reference in New Issue
Block a user