values.yaml 60 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374
  1. ## @section Global parameters
  2. ## Please, note that this will override the parameters, including dependencies, configured to use the global value
  3. ##
  4. global:
  5. ## @param global.imageRegistry Global Docker image registry
  6. ##
  7. imageRegistry: ""
  8. ## @param global.imagePullSecrets Global Docker registry secret names as an array
  9. ## e.g.
  10. ## imagePullSecrets:
  11. ## - myRegistryKeySecretName
  12. ##
  13. imagePullSecrets: []
  14. ## @param global.storageClass Global StorageClass for Persistent Volume(s)
  15. ##
  16. storageClass: "ceph-block"
  17. postgresql:
  18. ## @param global.postgresql.auth.postgresPassword Password for the "postgres" admin user (overrides `auth.postgresPassword`)
  19. ## @param global.postgresql.auth.username Name for a custom user to create (overrides `auth.username`)
  20. ## @param global.postgresql.auth.password Password for the custom user to create (overrides `auth.password`)
  21. ## @param global.postgresql.auth.database Name for a custom database to create (overrides `auth.database`)
  22. ## @param global.postgresql.auth.existingSecret Name of existing secret to use for PostgreSQL credentials (overrides `auth.existingSecret`).
  23. ## @param global.postgresql.auth.secretKeys.adminPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.adminPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set.
  24. ## @param global.postgresql.auth.secretKeys.userPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.userPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set.
  25. ## @param global.postgresql.auth.secretKeys.replicationPasswordKey Name of key in existing secret to use for PostgreSQL credentials (overrides `auth.secretKeys.replicationPasswordKey`). Only used when `global.postgresql.auth.existingSecret` is set.
  26. ##
  27. auth:
  28. postgresPassword: ""
  29. username: ""
  30. password: ""
  31. database: ""
  32. existingSecret: ""
  33. secretKeys:
  34. adminPasswordKey: ""
  35. userPasswordKey: ""
  36. replicationPasswordKey: ""
  37. ## @param global.postgresql.service.ports.postgresql PostgreSQL service port (overrides `service.ports.postgresql`)
  38. ##
  39. service:
  40. ports:
  41. postgresql: ""
  42. ## @section Common parameters
  43. ##
  44. ## @param kubeVersion Override Kubernetes version
  45. ##
  46. kubeVersion: ""
  47. ## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
  48. ##
  49. nameOverride: ""
  50. ## @param fullnameOverride String to fully override common.names.fullname template
  51. ##
  52. fullnameOverride: ""
  53. ## @param clusterDomain Kubernetes Cluster Domain
  54. ##
  55. clusterDomain: cluster.local
  56. ## @param extraDeploy Array of extra objects to deploy with the release (evaluated as a template)
  57. ##
  58. extraDeploy: []
  59. ## @param commonLabels Add labels to all the deployed resources
  60. ##
  61. commonLabels: {}
  62. ## @param commonAnnotations Add annotations to all the deployed resources
  63. ##
  64. commonAnnotations: {}
  65. ## Enable diagnostic mode in the statefulset
  66. ##
  67. diagnosticMode:
  68. ## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
  69. ##
  70. enabled: false
  71. ## @param diagnosticMode.command Command to override all containers in the statefulset
  72. ##
  73. command:
  74. - sleep
  75. ## @param diagnosticMode.args Args to override all containers in the statefulset
  76. ##
  77. args:
  78. - infinity
  79. ## @section PostgreSQL common parameters
  80. ##
  81. ## Bitnami PostgreSQL image version
  82. ## ref: https://hub.docker.com/r/bitnami/postgresql/tags/
  83. ## @param image.registry PostgreSQL image registry
  84. ## @param image.repository PostgreSQL image repository
  85. ## @param image.tag PostgreSQL image tag (immutable tags are recommended)
  86. ## @param image.pullPolicy PostgreSQL image pull policy
  87. ## @param image.pullSecrets Specify image pull secrets
  88. ## @param image.debug Specify if debug values should be set
  89. ##
  90. image:
  91. registry: docker.io
  92. repository: bitnami/postgresql
  93. tag: 14.4.0-debian-11-r0
  94. ## Specify a imagePullPolicy
  95. ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  96. ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  97. ##
  98. pullPolicy: IfNotPresent
  99. ## Optionally specify an array of imagePullSecrets.
  100. ## Secrets must be manually created in the namespace.
  101. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  102. ## Example:
  103. ## pullSecrets:
  104. ## - myRegistryKeySecretName
  105. ##
  106. pullSecrets: []
  107. ## Set to true if you would like to see extra information on logs
  108. ##
  109. debug: false
  110. ## Authentication parameters
  111. ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#setting-the-root-password-on-first-run
  112. ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#creating-a-database-on-first-run
  113. ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#creating-a-database-user-on-first-run
  114. ##
  115. auth:
  116. ## @param auth.enablePostgresUser Assign a password to the "postgres" admin user. Otherwise, remote access will be blocked for this user
  117. ##
  118. enablePostgresUser: true
  119. ## @param auth.postgresPassword Password for the "postgres" admin user. Ignored if `auth.existingSecret` with key `postgres-password` is provided
  120. ##
  121. postgresPassword: ""
  122. ## @param auth.username Name for a custom user to create
  123. ##
  124. username: ""
  125. ## @param auth.password Password for the custom user to create. Ignored if `auth.existingSecret` with key `password` is provided
  126. ##
  127. password: ""
  128. ## @param auth.database Name for a custom database to create
  129. ##
  130. database: ""
  131. ## @param auth.replicationUsername Name of the replication user
  132. ##
  133. replicationUsername: repl_user
  134. ## @param auth.replicationPassword Password for the replication user. Ignored if `auth.existingSecret` with key `replication-password` is provided
  135. ##
  136. replicationPassword: ""
  137. ## @param auth.existingSecret Name of existing secret to use for PostgreSQL credentials. `auth.postgresPassword`, `auth.password`, and `auth.replicationPassword` will be ignored and picked up from this secret. The secret might also contains the key `ldap-password` if LDAP is enabled. `ldap.bind_password` will be ignored and picked from this secret in this case.
  138. ##
  139. existingSecret: ""
  140. ## @param auth.secretKeys.adminPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set.
  141. ## @param auth.secretKeys.userPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set.
  142. ## @param auth.secretKeys.replicationPasswordKey Name of key in existing secret to use for PostgreSQL credentials. Only used when `auth.existingSecret` is set.
  143. ##
  144. secretKeys:
  145. adminPasswordKey: postgres-password
  146. userPasswordKey: password
  147. replicationPasswordKey: replication-password
  148. ## @param auth.usePasswordFiles Mount credentials as a files instead of using an environment variable
  149. ##
  150. usePasswordFiles: false
  151. ## @param architecture PostgreSQL architecture (`standalone` or `replication`)
  152. ##
  153. architecture: standalone
  154. ## Replication configuration
  155. ## Ignored if `architecture` is `standalone`
  156. ##
  157. replication:
  158. ## @param replication.synchronousCommit Set synchronous commit mode. Allowed values: `on`, `remote_apply`, `remote_write`, `local` and `off`
  159. ## @param replication.numSynchronousReplicas Number of replicas that will have synchronous replication. Note: Cannot be greater than `readReplicas.replicaCount`.
  160. ## ref: https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT
  161. ##
  162. synchronousCommit: "off"
  163. numSynchronousReplicas: 0
  164. ## @param replication.applicationName Cluster application name. Useful for advanced replication settings
  165. ##
  166. applicationName: my_application
  167. ## @param containerPorts.postgresql PostgreSQL container port
  168. ##
  169. containerPorts:
  170. postgresql: 5432
  171. ## Audit settings
  172. ## https://github.com/bitnami/bitnami-docker-postgresql#auditing
  173. ## @param audit.logHostname Log client hostnames
  174. ## @param audit.logConnections Add client log-in operations to the log file
  175. ## @param audit.logDisconnections Add client log-outs operations to the log file
  176. ## @param audit.pgAuditLog Add operations to log using the pgAudit extension
  177. ## @param audit.pgAuditLogCatalog Log catalog using pgAudit
  178. ## @param audit.clientMinMessages Message log level to share with the user
  179. ## @param audit.logLinePrefix Template for log line prefix (default if not set)
  180. ## @param audit.logTimezone Timezone for the log timestamps
  181. ##
  182. audit:
  183. logHostname: false
  184. logConnections: false
  185. logDisconnections: false
  186. pgAuditLog: ""
  187. pgAuditLogCatalog: "off"
  188. clientMinMessages: error
  189. logLinePrefix: ""
  190. logTimezone: ""
  191. ## LDAP configuration
  192. ## @param ldap.enabled Enable LDAP support
  193. ## DEPRECATED ldap.url It will removed in a future, please use 'ldap.uri' instead
  194. ## @param ldap.server IP address or name of the LDAP server.
  195. ## @param ldap.port Port number on the LDAP server to connect to
  196. ## @param ldap.prefix String to prepend to the user name when forming the DN to bind
  197. ## @param ldap.suffix String to append to the user name when forming the DN to bind
  198. ## DEPRECATED ldap.baseDN It will removed in a future, please use 'ldap.basedn' instead
  199. ## DEPRECATED ldap.bindDN It will removed in a future, please use 'ldap.binddn' instead
  200. ## DEPRECATED ldap.bind_password It will removed in a future, please use 'ldap.bindpw' instead
  201. ## @param ldap.basedn Root DN to begin the search for the user in
  202. ## @param ldap.binddn DN of user to bind to LDAP
  203. ## @param ldap.bindpw Password for the user to bind to LDAP
  204. ## DEPRECATED ldap.search_attr It will removed in a future, please use 'ldap.searchAttribute' instead
  205. ## DEPRECATED ldap.search_filter It will removed in a future, please use 'ldap.searchFilter' instead
  206. ## @param ldap.searchAttribute Attribute to match against the user name in the search
  207. ## @param ldap.searchFilter The search filter to use when doing search+bind authentication
  208. ## @param ldap.scheme Set to `ldaps` to use LDAPS
  209. ## DEPRECATED ldap.tls as string is deprecated,please use 'ldap.tls.enabled' instead
  210. ## @param ldap.tls.enabled Se to true to enable TLS encryption
  211. ##
  212. ldap:
  213. enabled: false
  214. server: ""
  215. port: ""
  216. prefix: ""
  217. suffix: ""
  218. basedn: ""
  219. binddn: ""
  220. bindpw: ""
  221. searchAttribute: ""
  222. searchFilter: ""
  223. scheme: ""
  224. tls:
  225. enabled: false
  226. ## @param ldap.uri LDAP URL beginning in the form `ldap[s]://host[:port]/basedn`. If provided, all the other LDAP parameters will be ignored.
  227. ## Ref: https://www.postgresql.org/docs/current/auth-ldap.html
  228. uri: ""
  229. ## @param postgresqlDataDir PostgreSQL data dir folder
  230. ##
  231. postgresqlDataDir: /bitnami/postgresql/data
  232. ## @param postgresqlSharedPreloadLibraries Shared preload libraries (comma-separated list)
  233. ##
  234. postgresqlSharedPreloadLibraries: "pgaudit"
  235. ## Start PostgreSQL pod(s) without limitations on shm memory.
  236. ## By default docker and containerd (and possibly other container runtimes) limit `/dev/shm` to `64M`
  237. ## ref: https://github.com/docker-library/postgres/issues/416
  238. ## ref: https://github.com/containerd/containerd/issues/3654
  239. ##
  240. shmVolume:
  241. ## @param shmVolume.enabled Enable emptyDir volume for /dev/shm for PostgreSQL pod(s)
  242. ##
  243. enabled: true
  244. ## @param shmVolume.sizeLimit Set this to enable a size limit on the shm tmpfs
  245. ## Note: the size of the tmpfs counts against container's memory limit
  246. ## e.g:
  247. ## sizeLimit: 1Gi
  248. ##
  249. sizeLimit: ""
  250. ## TLS configuration
  251. ##
  252. tls:
  253. ## @param tls.enabled Enable TLS traffic support
  254. ##
  255. enabled: false
  256. ## @param tls.autoGenerated Generate automatically self-signed TLS certificates
  257. ##
  258. autoGenerated: false
  259. ## @param tls.preferServerCiphers Whether to use the server's TLS cipher preferences rather than the client's
  260. ##
  261. preferServerCiphers: true
  262. ## @param tls.certificatesSecret Name of an existing secret that contains the certificates
  263. ##
  264. certificatesSecret: ""
  265. ## @param tls.certFilename Certificate filename
  266. ##
  267. certFilename: ""
  268. ## @param tls.certKeyFilename Certificate key filename
  269. ##
  270. certKeyFilename: ""
  271. ## @param tls.certCAFilename CA Certificate filename
  272. ## If provided, PostgreSQL will authenticate TLS/SSL clients by requesting them a certificate
  273. ## ref: https://www.postgresql.org/docs/9.6/auth-methods.html
  274. ##
  275. certCAFilename: ""
  276. ## @param tls.crlFilename File containing a Certificate Revocation List
  277. ##
  278. crlFilename: ""
  279. ## @section PostgreSQL Primary parameters
  280. ##
  281. primary:
  282. ## @param primary.configuration PostgreSQL Primary main configuration to be injected as ConfigMap
  283. ## ref: https://www.postgresql.org/docs/current/static/runtime-config.html
  284. ##
  285. configuration: ""
  286. ## @param primary.pgHbaConfiguration PostgreSQL Primary client authentication configuration
  287. ## ref: https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html
  288. ## e.g:#
  289. ## pgHbaConfiguration: |-
  290. ## local all all trust
  291. ## host all all localhost trust
  292. ## host mydatabase mysuser 192.168.0.0/24 md5
  293. ##
  294. pgHbaConfiguration: ""
  295. ## @param primary.existingConfigmap Name of an existing ConfigMap with PostgreSQL Primary configuration
  296. ## NOTE: `primary.configuration` and `primary.pgHbaConfiguration` will be ignored
  297. ##
  298. existingConfigmap: ""
  299. ## @param primary.extendedConfiguration Extended PostgreSQL Primary configuration (appended to main or default configuration)
  300. ## ref: https://github.com/bitnami/bitnami-docker-postgresql#allow-settings-to-be-loaded-from-files-other-than-the-default-postgresqlconf
  301. ##
  302. extendedConfiguration: ""
  303. ## @param primary.existingExtendedConfigmap Name of an existing ConfigMap with PostgreSQL Primary extended configuration
  304. ## NOTE: `primary.extendedConfiguration` will be ignored
  305. ##
  306. existingExtendedConfigmap: ""
  307. ## Initdb configuration
  308. ## ref: https://github.com/bitnami/bitnami-docker-postgresql/blob/master/README.md#specifying-initdb-arguments
  309. ##
  310. initdb:
  311. ## @param primary.initdb.args PostgreSQL initdb extra arguments
  312. ##
  313. args: ""
  314. ## @param primary.initdb.postgresqlWalDir Specify a custom location for the PostgreSQL transaction log
  315. ##
  316. postgresqlWalDir: ""
  317. ## @param primary.initdb.scripts Dictionary of initdb scripts
  318. ## Specify dictionary of scripts to be run at first boot
  319. ## e.g:
  320. ## scripts:
  321. ## my_init_script.sh: |
  322. ## #!/bin/sh
  323. ## echo "Do something."
  324. ##
  325. scripts: {}
  326. ## @param primary.initdb.scriptsConfigMap ConfigMap with scripts to be run at first boot
  327. ## NOTE: This will override `primary.initdb.scripts`
  328. ##
  329. scriptsConfigMap: ""
  330. ## @param primary.initdb.scriptsSecret Secret with scripts to be run at first boot (in case it contains sensitive information)
  331. ## NOTE: This can work along `primary.initdb.scripts` or `primary.initdb.scriptsConfigMap`
  332. ##
  333. scriptsSecret: ""
  334. ## @param primary.initdb.user Specify the PostgreSQL username to execute the initdb scripts
  335. ##
  336. user: ""
  337. ## @param primary.initdb.password Specify the PostgreSQL password to execute the initdb scripts
  338. ##
  339. password: ""
  340. ## Configure current cluster's primary server to be the standby server in other cluster.
  341. ## This will allow cross cluster replication and provide cross cluster high availability.
  342. ## You will need to configure pgHbaConfiguration if you want to enable this feature with local cluster replication enabled.
  343. ## @param primary.standby.enabled Whether to enable current cluster's primary as standby server of another cluster or not
  344. ## @param primary.standby.primaryHost The Host of replication primary in the other cluster
  345. ## @param primary.standby.primaryPort The Port of replication primary in the other cluster
  346. ##
  347. standby:
  348. enabled: false
  349. primaryHost: ""
  350. primaryPort: ""
  351. ## @param primary.extraEnvVars Array with extra environment variables to add to PostgreSQL Primary nodes
  352. ## e.g:
  353. ## extraEnvVars:
  354. ## - name: FOO
  355. ## value: "bar"
  356. ##
  357. extraEnvVars: []
  358. ## @param primary.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for PostgreSQL Primary nodes
  359. ##
  360. extraEnvVarsCM: ""
  361. ## @param primary.extraEnvVarsSecret Name of existing Secret containing extra env vars for PostgreSQL Primary nodes
  362. ##
  363. extraEnvVarsSecret: ""
  364. ## @param primary.command Override default container command (useful when using custom images)
  365. ##
  366. command: []
  367. ## @param primary.args Override default container args (useful when using custom images)
  368. ##
  369. args: []
  370. ## Configure extra options for PostgreSQL Primary containers' liveness, readiness and startup probes
  371. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
  372. ## @param primary.livenessProbe.enabled Enable livenessProbe on PostgreSQL Primary containers
  373. ## @param primary.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  374. ## @param primary.livenessProbe.periodSeconds Period seconds for livenessProbe
  375. ## @param primary.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  376. ## @param primary.livenessProbe.failureThreshold Failure threshold for livenessProbe
  377. ## @param primary.livenessProbe.successThreshold Success threshold for livenessProbe
  378. ##
  379. livenessProbe:
  380. enabled: true
  381. initialDelaySeconds: 30
  382. periodSeconds: 10
  383. timeoutSeconds: 5
  384. failureThreshold: 6
  385. successThreshold: 1
  386. ## @param primary.readinessProbe.enabled Enable readinessProbe on PostgreSQL Primary containers
  387. ## @param primary.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  388. ## @param primary.readinessProbe.periodSeconds Period seconds for readinessProbe
  389. ## @param primary.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  390. ## @param primary.readinessProbe.failureThreshold Failure threshold for readinessProbe
  391. ## @param primary.readinessProbe.successThreshold Success threshold for readinessProbe
  392. ##
  393. readinessProbe:
  394. enabled: true
  395. initialDelaySeconds: 5
  396. periodSeconds: 10
  397. timeoutSeconds: 5
  398. failureThreshold: 6
  399. successThreshold: 1
  400. ## @param primary.startupProbe.enabled Enable startupProbe on PostgreSQL Primary containers
  401. ## @param primary.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  402. ## @param primary.startupProbe.periodSeconds Period seconds for startupProbe
  403. ## @param primary.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  404. ## @param primary.startupProbe.failureThreshold Failure threshold for startupProbe
  405. ## @param primary.startupProbe.successThreshold Success threshold for startupProbe
  406. ##
  407. startupProbe:
  408. enabled: false
  409. initialDelaySeconds: 30
  410. periodSeconds: 10
  411. timeoutSeconds: 1
  412. failureThreshold: 15
  413. successThreshold: 1
  414. ## @param primary.customLivenessProbe Custom livenessProbe that overrides the default one
  415. ##
  416. customLivenessProbe: {}
  417. ## @param primary.customReadinessProbe Custom readinessProbe that overrides the default one
  418. ##
  419. customReadinessProbe: {}
  420. ## @param primary.customStartupProbe Custom startupProbe that overrides the default one
  421. ##
  422. customStartupProbe: {}
  423. ## @param primary.lifecycleHooks for the PostgreSQL Primary container to automate configuration before or after startup
  424. ##
  425. lifecycleHooks: {}
  426. ## PostgreSQL Primary resource requests and limits
  427. ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
  428. ## @param primary.resources.limits The resources limits for the PostgreSQL Primary containers
  429. ## @param primary.resources.requests.memory The requested memory for the PostgreSQL Primary containers
  430. ## @param primary.resources.requests.cpu The requested cpu for the PostgreSQL Primary containers
  431. ##
  432. resources:
  433. limits: {}
  434. requests:
  435. memory: 256Mi
  436. cpu: 250m
  437. ## Pod Security Context
  438. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  439. ## @param primary.podSecurityContext.enabled Enable security context
  440. ## @param primary.podSecurityContext.fsGroup Group ID for the pod
  441. ##
  442. podSecurityContext:
  443. enabled: true
  444. fsGroup: 1001
  445. ## Container Security Context
  446. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  447. ## @param primary.containerSecurityContext.enabled Enable container security context
  448. ## @param primary.containerSecurityContext.runAsUser User ID for the container
  449. ##
  450. containerSecurityContext:
  451. enabled: true
  452. runAsUser: 1001
  453. ## @param primary.hostAliases PostgreSQL primary pods host aliases
  454. ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
  455. ##
  456. hostAliases: []
  457. ## @param primary.hostNetwork Specify if host network should be enabled for PostgreSQL pod (postgresql primary)
  458. ##
  459. hostNetwork: false
  460. ## @param primary.hostIPC Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary)
  461. ##
  462. hostIPC: false
  463. ## @param primary.labels Map of labels to add to the statefulset (postgresql primary)
  464. ##
  465. labels: {}
  466. ## @param primary.annotations Annotations for PostgreSQL primary pods
  467. ##
  468. annotations: {}
  469. ## @param primary.podLabels Map of labels to add to the pods (postgresql primary)
  470. ##
  471. podLabels: {}
  472. ## @param primary.podAnnotations Map of annotations to add to the pods (postgresql primary)
  473. ##
  474. podAnnotations: {}
  475. ## @param primary.podAffinityPreset PostgreSQL primary pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
  476. ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  477. ##
  478. podAffinityPreset: ""
  479. ## @param primary.podAntiAffinityPreset PostgreSQL primary pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
  480. ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  481. ##
  482. podAntiAffinityPreset: soft
  483. ## PostgreSQL Primary node affinity preset
  484. ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
  485. ##
  486. nodeAffinityPreset:
  487. ## @param primary.nodeAffinityPreset.type PostgreSQL primary node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
  488. ##
  489. type: ""
  490. ## @param primary.nodeAffinityPreset.key PostgreSQL primary node label key to match Ignored if `primary.affinity` is set.
  491. ## E.g.
  492. ## key: "kubernetes.io/e2e-az-name"
  493. ##
  494. key: ""
  495. ## @param primary.nodeAffinityPreset.values PostgreSQL primary node label values to match. Ignored if `primary.affinity` is set.
  496. ## E.g.
  497. ## values:
  498. ## - e2e-az1
  499. ## - e2e-az2
  500. ##
  501. values: []
  502. ## @param primary.affinity Affinity for PostgreSQL primary pods assignment
  503. ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  504. ## Note: primary.podAffinityPreset, primary.podAntiAffinityPreset, and primary.nodeAffinityPreset will be ignored when it's set
  505. ##
  506. affinity: {}
  507. ## @param primary.nodeSelector Node labels for PostgreSQL primary pods assignment
  508. ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  509. ##
  510. nodeSelector: {}
  511. ## @param primary.tolerations Tolerations for PostgreSQL primary pods assignment
  512. ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  513. ##
  514. tolerations: []
  515. ## @param primary.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
  516. ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
  517. ##
  518. topologySpreadConstraints: []
  519. ## @param primary.priorityClassName Priority Class to use for each pod (postgresql primary)
  520. ##
  521. priorityClassName: ""
  522. ## @param primary.schedulerName Use an alternate scheduler, e.g. "stork".
  523. ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
  524. ##
  525. schedulerName: ""
  526. ## @param primary.terminationGracePeriodSeconds Seconds PostgreSQL primary pod needs to terminate gracefully
  527. ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
  528. ##
  529. terminationGracePeriodSeconds: ""
  530. ## @param primary.updateStrategy.type PostgreSQL Primary statefulset strategy type
  531. ## @param primary.updateStrategy.rollingUpdate PostgreSQL Primary statefulset rolling update configuration parameters
  532. ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
  533. ##
  534. updateStrategy:
  535. type: RollingUpdate
  536. rollingUpdate: {}
  537. ## @param primary.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the PostgreSQL Primary container(s)
  538. ##
  539. extraVolumeMounts: []
  540. ## @param primary.extraVolumes Optionally specify extra list of additional volumes for the PostgreSQL Primary pod(s)
  541. ##
  542. extraVolumes: []
  543. ## @param primary.sidecars Add additional sidecar containers to the PostgreSQL Primary pod(s)
  544. ## For example:
  545. ## sidecars:
  546. ## - name: your-image-name
  547. ## image: your-image
  548. ## imagePullPolicy: Always
  549. ## ports:
  550. ## - name: portname
  551. ## containerPort: 1234
  552. ##
  553. sidecars: []
  554. ## @param primary.initContainers Add additional init containers to the PostgreSQL Primary pod(s)
  555. ## Example
  556. ##
  557. ## initContainers:
  558. ## - name: do-something
  559. ## image: busybox
  560. ## command: ['do', 'something']
  561. ##
  562. initContainers: []
  563. ## @param primary.extraPodSpec Optionally specify extra PodSpec for the PostgreSQL Primary pod(s)
  564. ##
  565. extraPodSpec: {}
  566. ## PostgreSQL Primary service configuration
  567. ##
  568. service:
  569. ## @param primary.service.type Kubernetes Service type
  570. ##
  571. type: ClusterIP
  572. ## @param primary.service.ports.postgresql PostgreSQL service port
  573. ##
  574. ports:
  575. postgresql: 5432
  576. ## Node ports to expose
  577. ## NOTE: choose port between <30000-32767>
  578. ## @param primary.service.nodePorts.postgresql Node port for PostgreSQL
  579. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  580. ##
  581. nodePorts:
  582. postgresql: ""
  583. ## @param primary.service.clusterIP Static clusterIP or None for headless services
  584. ## e.g:
  585. ## clusterIP: None
  586. ##
  587. clusterIP: ""
  588. ## @param primary.service.annotations Annotations for PostgreSQL primary service
  589. ##
  590. annotations: {}
  591. ## @param primary.service.loadBalancerIP Load balancer IP if service type is `LoadBalancer`
  592. ## Set the LoadBalancer service type to internal only
  593. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
  594. ##
  595. loadBalancerIP: ""
  596. ## @param primary.service.externalTrafficPolicy Enable client source IP preservation
  597. ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
  598. ##
  599. externalTrafficPolicy: Cluster
  600. ## @param primary.service.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer
  601. ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
  602. ##
  603. ## loadBalancerSourceRanges:
  604. ## - 10.10.10.0/24
  605. ##
  606. loadBalancerSourceRanges: []
  607. ## @param primary.service.extraPorts Extra ports to expose in the PostgreSQL primary service
  608. ##
  609. extraPorts: []
  610. ## @param primary.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
  611. ## If "ClientIP", consecutive client requests will be directed to the same Pod
  612. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  613. ##
  614. sessionAffinity: None
  615. ## @param primary.service.sessionAffinityConfig Additional settings for the sessionAffinity
  616. ## sessionAffinityConfig:
  617. ## clientIP:
  618. ## timeoutSeconds: 300
  619. ##
  620. sessionAffinityConfig: {}
  621. ## PostgreSQL Primary persistence configuration
  622. ##
  623. persistence:
  624. ## @param primary.persistence.enabled Enable PostgreSQL Primary data persistence using PVC
  625. ##
  626. enabled: true
  627. ## @param primary.persistence.existingClaim Name of an existing PVC to use
  628. ##
  629. existingClaim: ""
  630. ## @param primary.persistence.mountPath The path the volume will be mounted at
  631. ## Note: useful when using custom PostgreSQL images
  632. ##
  633. mountPath: /bitnami/postgresql
  634. ## @param primary.persistence.subPath The subdirectory of the volume to mount to
  635. ## Useful in dev environments and one PV for multiple services
  636. ##
  637. subPath: ""
  638. ## @param primary.persistence.storageClass PVC Storage Class for PostgreSQL Primary data volume
  639. ## If defined, storageClassName: <storageClass>
  640. ## If set to "-", storageClassName: "", which disables dynamic provisioning
  641. ## If undefined (the default) or set to null, no storageClassName spec is
  642. ## set, choosing the default provisioner. (gp2 on AWS, standard on
  643. ## GKE, AWS & OpenStack)
  644. ##
  645. storageClass: ""
  646. ## @param primary.persistence.accessModes PVC Access Mode for PostgreSQL volume
  647. ##
  648. accessModes:
  649. - ReadWriteOnce
  650. ## @param primary.persistence.size PVC Storage Request for PostgreSQL volume
  651. ##
  652. size: 200Gi
  653. ## @param primary.persistence.annotations Annotations for the PVC
  654. ##
  655. annotations: {}
  656. ## @param primary.persistence.selector Selector to match an existing Persistent Volume (this value is evaluated as a template)
  657. ## selector:
  658. ## matchLabels:
  659. ## app: my-app
  660. ##
  661. selector: {}
  662. ## @param primary.persistence.dataSource Custom PVC data source
  663. ##
  664. dataSource: {}
  665. ## @section PostgreSQL read only replica parameters
  666. ##
  667. readReplicas:
  668. ## @param readReplicas.replicaCount Number of PostgreSQL read only replicas
  669. ##
  670. replicaCount: 1
  671. ## @param readReplicas.extraEnvVars Array with extra environment variables to add to PostgreSQL read only nodes
  672. ## e.g:
  673. ## extraEnvVars:
  674. ## - name: FOO
  675. ## value: "bar"
  676. ##
  677. extraEnvVars: []
  678. ## @param readReplicas.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for PostgreSQL read only nodes
  679. ##
  680. extraEnvVarsCM: ""
  681. ## @param readReplicas.extraEnvVarsSecret Name of existing Secret containing extra env vars for PostgreSQL read only nodes
  682. ##
  683. extraEnvVarsSecret: ""
  684. ## @param readReplicas.command Override default container command (useful when using custom images)
  685. ##
  686. command: []
  687. ## @param readReplicas.args Override default container args (useful when using custom images)
  688. ##
  689. args: []
  690. ## Configure extra options for PostgreSQL read only containers' liveness, readiness and startup probes
  691. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
  692. ## @param readReplicas.livenessProbe.enabled Enable livenessProbe on PostgreSQL read only containers
  693. ## @param readReplicas.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  694. ## @param readReplicas.livenessProbe.periodSeconds Period seconds for livenessProbe
  695. ## @param readReplicas.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  696. ## @param readReplicas.livenessProbe.failureThreshold Failure threshold for livenessProbe
  697. ## @param readReplicas.livenessProbe.successThreshold Success threshold for livenessProbe
  698. ##
  699. livenessProbe:
  700. enabled: true
  701. initialDelaySeconds: 30
  702. periodSeconds: 10
  703. timeoutSeconds: 5
  704. failureThreshold: 6
  705. successThreshold: 1
  706. ## @param readReplicas.readinessProbe.enabled Enable readinessProbe on PostgreSQL read only containers
  707. ## @param readReplicas.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  708. ## @param readReplicas.readinessProbe.periodSeconds Period seconds for readinessProbe
  709. ## @param readReplicas.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  710. ## @param readReplicas.readinessProbe.failureThreshold Failure threshold for readinessProbe
  711. ## @param readReplicas.readinessProbe.successThreshold Success threshold for readinessProbe
  712. ##
  713. readinessProbe:
  714. enabled: true
  715. initialDelaySeconds: 5
  716. periodSeconds: 10
  717. timeoutSeconds: 5
  718. failureThreshold: 6
  719. successThreshold: 1
  720. ## @param readReplicas.startupProbe.enabled Enable startupProbe on PostgreSQL read only containers
  721. ## @param readReplicas.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  722. ## @param readReplicas.startupProbe.periodSeconds Period seconds for startupProbe
  723. ## @param readReplicas.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  724. ## @param readReplicas.startupProbe.failureThreshold Failure threshold for startupProbe
  725. ## @param readReplicas.startupProbe.successThreshold Success threshold for startupProbe
  726. ##
  727. startupProbe:
  728. enabled: false
  729. initialDelaySeconds: 30
  730. periodSeconds: 10
  731. timeoutSeconds: 1
  732. failureThreshold: 15
  733. successThreshold: 1
  734. ## @param readReplicas.customLivenessProbe Custom livenessProbe that overrides the default one
  735. ##
  736. customLivenessProbe: {}
  737. ## @param readReplicas.customReadinessProbe Custom readinessProbe that overrides the default one
  738. ##
  739. customReadinessProbe: {}
  740. ## @param readReplicas.customStartupProbe Custom startupProbe that overrides the default one
  741. ##
  742. customStartupProbe: {}
  743. ## @param readReplicas.lifecycleHooks for the PostgreSQL read only container to automate configuration before or after startup
  744. ##
  745. lifecycleHooks: {}
  746. ## PostgreSQL read only resource requests and limits
  747. ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
  748. ## @param readReplicas.resources.limits The resources limits for the PostgreSQL read only containers
  749. ## @param readReplicas.resources.requests.memory The requested memory for the PostgreSQL read only containers
  750. ## @param readReplicas.resources.requests.cpu The requested cpu for the PostgreSQL read only containers
  751. ##
  752. resources:
  753. limits: {}
  754. requests:
  755. memory: 256Mi
  756. cpu: 250m
  757. ## Pod Security Context
  758. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  759. ## @param readReplicas.podSecurityContext.enabled Enable security context
  760. ## @param readReplicas.podSecurityContext.fsGroup Group ID for the pod
  761. ##
  762. podSecurityContext:
  763. enabled: true
  764. fsGroup: 1001
  765. ## Container Security Context
  766. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  767. ## @param readReplicas.containerSecurityContext.enabled Enable container security context
  768. ## @param readReplicas.containerSecurityContext.runAsUser User ID for the container
  769. ##
  770. containerSecurityContext:
  771. enabled: true
  772. runAsUser: 1001
  773. ## @param readReplicas.hostAliases PostgreSQL read only pods host aliases
  774. ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
  775. ##
  776. hostAliases: []
  777. ## @param readReplicas.hostNetwork Specify if host network should be enabled for PostgreSQL pod (PostgreSQL read only)
  778. ##
  779. hostNetwork: false
  780. ## @param readReplicas.hostIPC Specify if host IPC should be enabled for PostgreSQL pod (postgresql primary)
  781. ##
  782. hostIPC: false
  783. ## @param readReplicas.labels Map of labels to add to the statefulset (PostgreSQL read only)
  784. ##
  785. labels: {}
  786. ## @param readReplicas.annotations Annotations for PostgreSQL read only pods
  787. ##
  788. annotations: {}
  789. ## @param readReplicas.podLabels Map of labels to add to the pods (PostgreSQL read only)
  790. ##
  791. podLabels: {}
  792. ## @param readReplicas.podAnnotations Map of annotations to add to the pods (PostgreSQL read only)
  793. ##
  794. podAnnotations: {}
  795. ## @param readReplicas.podAffinityPreset PostgreSQL read only pod affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
  796. ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  797. ##
  798. podAffinityPreset: ""
  799. ## @param readReplicas.podAntiAffinityPreset PostgreSQL read only pod anti-affinity preset. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
  800. ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  801. ##
  802. podAntiAffinityPreset: soft
  803. ## PostgreSQL read only node affinity preset
  804. ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
  805. ##
  806. nodeAffinityPreset:
  807. ## @param readReplicas.nodeAffinityPreset.type PostgreSQL read only node affinity preset type. Ignored if `primary.affinity` is set. Allowed values: `soft` or `hard`
  808. ##
  809. type: ""
  810. ## @param readReplicas.nodeAffinityPreset.key PostgreSQL read only node label key to match Ignored if `primary.affinity` is set.
  811. ## E.g.
  812. ## key: "kubernetes.io/e2e-az-name"
  813. ##
  814. key: ""
  815. ## @param readReplicas.nodeAffinityPreset.values PostgreSQL read only node label values to match. Ignored if `primary.affinity` is set.
  816. ## E.g.
  817. ## values:
  818. ## - e2e-az1
  819. ## - e2e-az2
  820. ##
  821. values: []
  822. ## @param readReplicas.affinity Affinity for PostgreSQL read only pods assignment
  823. ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  824. ## Note: primary.podAffinityPreset, primary.podAntiAffinityPreset, and primary.nodeAffinityPreset will be ignored when it's set
  825. ##
  826. affinity: {}
  827. ## @param readReplicas.nodeSelector Node labels for PostgreSQL read only pods assignment
  828. ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  829. ##
  830. nodeSelector: {}
  831. ## @param readReplicas.tolerations Tolerations for PostgreSQL read only pods assignment
  832. ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  833. ##
  834. tolerations: []
  835. ## @param readReplicas.topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
  836. ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
  837. ##
  838. topologySpreadConstraints: []
  839. ## @param readReplicas.priorityClassName Priority Class to use for each pod (PostgreSQL read only)
  840. ##
  841. priorityClassName: ""
  842. ## @param readReplicas.schedulerName Use an alternate scheduler, e.g. "stork".
  843. ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
  844. ##
  845. schedulerName: ""
  846. ## @param readReplicas.terminationGracePeriodSeconds Seconds PostgreSQL read only pod needs to terminate gracefully
  847. ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
  848. ##
  849. terminationGracePeriodSeconds: ""
  850. ## @param readReplicas.updateStrategy.type PostgreSQL read only statefulset strategy type
  851. ## @param readReplicas.updateStrategy.rollingUpdate PostgreSQL read only statefulset rolling update configuration parameters
  852. ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
  853. ##
  854. updateStrategy:
  855. type: RollingUpdate
  856. rollingUpdate: {}
  857. ## @param readReplicas.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the PostgreSQL read only container(s)
  858. ##
  859. extraVolumeMounts: []
  860. ## @param readReplicas.extraVolumes Optionally specify extra list of additional volumes for the PostgreSQL read only pod(s)
  861. ##
  862. extraVolumes: []
  863. ## @param readReplicas.sidecars Add additional sidecar containers to the PostgreSQL read only pod(s)
  864. ## For example:
  865. ## sidecars:
  866. ## - name: your-image-name
  867. ## image: your-image
  868. ## imagePullPolicy: Always
  869. ## ports:
  870. ## - name: portname
  871. ## containerPort: 1234
  872. ##
  873. sidecars: []
  874. ## @param readReplicas.initContainers Add additional init containers to the PostgreSQL read only pod(s)
  875. ## Example
  876. ##
  877. ## initContainers:
  878. ## - name: do-something
  879. ## image: busybox
  880. ## command: ['do', 'something']
  881. ##
  882. initContainers: []
  883. ## @param readReplicas.extraPodSpec Optionally specify extra PodSpec for the PostgreSQL read only pod(s)
  884. ##
  885. extraPodSpec: {}
  886. ## PostgreSQL read only service configuration
  887. ##
  888. service:
  889. ## @param readReplicas.service.type Kubernetes Service type
  890. ##
  891. type: ClusterIP
  892. ## @param readReplicas.service.ports.postgresql PostgreSQL service port
  893. ##
  894. ports:
  895. postgresql: 5432
  896. ## Node ports to expose
  897. ## NOTE: choose port between <30000-32767>
  898. ## @param readReplicas.service.nodePorts.postgresql Node port for PostgreSQL
  899. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  900. ##
  901. nodePorts:
  902. postgresql: ""
  903. ## @param readReplicas.service.clusterIP Static clusterIP or None for headless services
  904. ## e.g:
  905. ## clusterIP: None
  906. ##
  907. clusterIP: ""
  908. ## @param readReplicas.service.annotations Annotations for PostgreSQL read only service
  909. ##
  910. annotations: {}
  911. ## @param readReplicas.service.loadBalancerIP Load balancer IP if service type is `LoadBalancer`
  912. ## Set the LoadBalancer service type to internal only
  913. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
  914. ##
  915. loadBalancerIP: ""
  916. ## @param readReplicas.service.externalTrafficPolicy Enable client source IP preservation
  917. ## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
  918. ##
  919. externalTrafficPolicy: Cluster
  920. ## @param readReplicas.service.loadBalancerSourceRanges Addresses that are allowed when service is LoadBalancer
  921. ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
  922. ##
  923. ## loadBalancerSourceRanges:
  924. ## - 10.10.10.0/24
  925. ##
  926. loadBalancerSourceRanges: []
  927. ## @param readReplicas.service.extraPorts Extra ports to expose in the PostgreSQL read only service
  928. ##
  929. extraPorts: []
  930. ## @param readReplicas.service.sessionAffinity Session Affinity for Kubernetes service, can be "None" or "ClientIP"
  931. ## If "ClientIP", consecutive client requests will be directed to the same Pod
  932. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
  933. ##
  934. sessionAffinity: None
  935. ## @param readReplicas.service.sessionAffinityConfig Additional settings for the sessionAffinity
  936. ## sessionAffinityConfig:
  937. ## clientIP:
  938. ## timeoutSeconds: 300
  939. ##
  940. sessionAffinityConfig: {}
  941. ## PostgreSQL read only persistence configuration
  942. ##
  943. persistence:
  944. ## @param readReplicas.persistence.enabled Enable PostgreSQL read only data persistence using PVC
  945. ##
  946. enabled: true
  947. ## @param readReplicas.persistence.mountPath The path the volume will be mounted at
  948. ## Note: useful when using custom PostgreSQL images
  949. ##
  950. mountPath: /bitnami/postgresql
  951. ## @param readReplicas.persistence.subPath The subdirectory of the volume to mount to
  952. ## Useful in dev environments and one PV for multiple services
  953. ##
  954. subPath: ""
  955. ## @param readReplicas.persistence.storageClass PVC Storage Class for PostgreSQL read only data volume
  956. ## If defined, storageClassName: <storageClass>
  957. ## If set to "-", storageClassName: "", which disables dynamic provisioning
  958. ## If undefined (the default) or set to null, no storageClassName spec is
  959. ## set, choosing the default provisioner. (gp2 on AWS, standard on
  960. ## GKE, AWS & OpenStack)
  961. ##
  962. storageClass: ""
  963. ## @param readReplicas.persistence.accessModes PVC Access Mode for PostgreSQL volume
  964. ##
  965. accessModes:
  966. - ReadWriteOnce
  967. ## @param readReplicas.persistence.size PVC Storage Request for PostgreSQL volume
  968. ##
  969. size: 8Gi
  970. ## @param readReplicas.persistence.annotations Annotations for the PVC
  971. ##
  972. annotations: {}
  973. ## @param readReplicas.persistence.selector Selector to match an existing Persistent Volume (this value is evaluated as a template)
  974. ## selector:
  975. ## matchLabels:
  976. ## app: my-app
  977. ##
  978. selector: {}
  979. ## @param readReplicas.persistence.dataSource Custom PVC data source
  980. ##
  981. dataSource: {}
  982. ## @section NetworkPolicy parameters
  983. ## Add networkpolicies
  984. ##
  985. networkPolicy:
  986. ## @param networkPolicy.enabled Enable network policies
  987. ##
  988. enabled: false
  989. ## @param networkPolicy.metrics.enabled Enable network policies for metrics (prometheus)
  990. ## @param networkPolicy.metrics.namespaceSelector [object] Monitoring namespace selector labels. These labels will be used to identify the prometheus' namespace.
  991. ## @param networkPolicy.metrics.podSelector [object] Monitoring pod selector labels. These labels will be used to identify the Prometheus pods.
  992. ##
  993. metrics:
  994. enabled: false
  995. ## e.g:
  996. ## namespaceSelector:
  997. ## label: monitoring
  998. ##
  999. namespaceSelector: {}
  1000. ## e.g:
  1001. ## podSelector:
  1002. ## label: monitoring
  1003. ##
  1004. podSelector: {}
  1005. ## Ingress Rules
  1006. ##
  1007. ingressRules:
  1008. ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled Enable ingress rule that makes PostgreSQL primary node only accessible from a particular origin.
  1009. ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.namespaceSelector [object] Namespace selector label that is allowed to access the PostgreSQL primary node. This label will be used to identified the allowed namespace(s).
  1010. ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.podSelector [object] Pods selector label that is allowed to access the PostgreSQL primary node. This label will be used to identified the allowed pod(s).
  1011. ## @param networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules [object] Custom network policy for the PostgreSQL primary node.
  1012. ##
  1013. primaryAccessOnlyFrom:
  1014. enabled: false
  1015. ## e.g:
  1016. ## namespaceSelector:
  1017. ## label: ingress
  1018. ##
  1019. namespaceSelector: {}
  1020. ## e.g:
  1021. ## podSelector:
  1022. ## label: access
  1023. ##
  1024. podSelector: {}
  1025. ## custom ingress rules
  1026. ## e.g:
  1027. ## customRules:
  1028. ## - from:
  1029. ## - namespaceSelector:
  1030. ## matchLabels:
  1031. ## label: example
  1032. customRules: {}
  1033. ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.enabled Enable ingress rule that makes PostgreSQL read-only nodes only accessible from a particular origin.
  1034. ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.namespaceSelector [object] Namespace selector label that is allowed to access the PostgreSQL read-only nodes. This label will be used to identified the allowed namespace(s).
  1035. ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.podSelector [object] Pods selector label that is allowed to access the PostgreSQL read-only nodes. This label will be used to identified the allowed pod(s).
  1036. ## @param networkPolicy.ingressRules.readReplicasAccessOnlyFrom.customRules [object] Custom network policy for the PostgreSQL read-only nodes.
  1037. ##
  1038. readReplicasAccessOnlyFrom:
  1039. enabled: false
  1040. ## e.g:
  1041. ## namespaceSelector:
  1042. ## label: ingress
  1043. ##
  1044. namespaceSelector: {}
  1045. ## e.g:
  1046. ## podSelector:
  1047. ## label: access
  1048. ##
  1049. podSelector: {}
  1050. ## custom ingress rules
  1051. ## e.g:
  1052. ## CustomRules:
  1053. ## - from:
  1054. ## - namespaceSelector:
  1055. ## matchLabels:
  1056. ## label: example
  1057. customRules: {}
  1058. ## @param networkPolicy.egressRules.denyConnectionsToExternal Enable egress rule that denies outgoing traffic outside the cluster, except for DNS (port 53).
  1059. ## @param networkPolicy.egressRules.customRules [object] Custom network policy rule
  1060. ##
  1061. egressRules:
  1062. # Deny connections to external. This is not compatible with an external database.
  1063. denyConnectionsToExternal: false
  1064. ## Additional custom egress rules
  1065. ## e.g:
  1066. ## customRules:
  1067. ## - to:
  1068. ## - namespaceSelector:
  1069. ## matchLabels:
  1070. ## label: example
  1071. customRules: {}
  1072. ## @section Volume Permissions parameters
  1073. ## Init containers parameters:
  1074. ## volumePermissions: Change the owner and group of the persistent volume(s) mountpoint(s) to 'runAsUser:fsGroup' on each node
  1075. ##
  1076. volumePermissions:
  1077. ## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume
  1078. ##
  1079. enabled: false
  1080. ## @param volumePermissions.image.registry Init container volume-permissions image registry
  1081. ## @param volumePermissions.image.repository Init container volume-permissions image repository
  1082. ## @param volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)
  1083. ## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy
  1084. ## @param volumePermissions.image.pullSecrets Init container volume-permissions image pull secrets
  1085. ##
  1086. image:
  1087. registry: docker.io
  1088. repository: bitnami/bitnami-shell
  1089. tag: 11-debian-11-r5
  1090. pullPolicy: IfNotPresent
  1091. ## Optionally specify an array of imagePullSecrets.
  1092. ## Secrets must be manually created in the namespace.
  1093. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  1094. ## Example:
  1095. ## pullSecrets:
  1096. ## - myRegistryKeySecretName
  1097. ##
  1098. pullSecrets: []
  1099. ## Init container resource requests and limits
  1100. ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
  1101. ## @param volumePermissions.resources.limits Init container volume-permissions resource limits
  1102. ## @param volumePermissions.resources.requests Init container volume-permissions resource requests
  1103. ##
  1104. resources:
  1105. limits: {}
  1106. requests: {}
  1107. ## Init container' Security Context
  1108. ## Note: the chown of the data folder is done to containerSecurityContext.runAsUser
  1109. ## and not the below volumePermissions.containerSecurityContext.runAsUser
  1110. ## @param volumePermissions.containerSecurityContext.runAsUser User ID for the init container
  1111. ##
  1112. containerSecurityContext:
  1113. runAsUser: 0
  1114. ## @section Other Parameters
  1115. ## Service account for PostgreSQL to use.
  1116. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
  1117. ##
  1118. serviceAccount:
  1119. ## @param serviceAccount.create Enable creation of ServiceAccount for PostgreSQL pod
  1120. ##
  1121. create: false
  1122. ## @param serviceAccount.name The name of the ServiceAccount to use.
  1123. ## If not set and create is true, a name is generated using the common.names.fullname template
  1124. ##
  1125. name: ""
  1126. ## @param serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the serviceAccount created
  1127. ## Can be set to false if pods using this serviceAccount do not need to use K8s API
  1128. ##
  1129. automountServiceAccountToken: true
  1130. ## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount
  1131. ##
  1132. annotations: {}
  1133. ## Creates role for ServiceAccount
  1134. ## @param rbac.create Create Role and RoleBinding (required for PSP to work)
  1135. ##
  1136. rbac:
  1137. create: false
  1138. ## @param rbac.rules Custom RBAC rules to set
  1139. ## e.g:
  1140. ## rules:
  1141. ## - apiGroups:
  1142. ## - ""
  1143. ## resources:
  1144. ## - pods
  1145. ## verbs:
  1146. ## - get
  1147. ## - list
  1148. ##
  1149. rules: []
  1150. ## Pod Security Policy
  1151. ## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
  1152. ## @param psp.create Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later
  1153. ##
  1154. psp:
  1155. create: false
  1156. ## @section Metrics Parameters
  1157. metrics:
  1158. ## @param metrics.enabled Start a prometheus exporter
  1159. ##
  1160. enabled: false
  1161. ## @param metrics.image.registry PostgreSQL Prometheus Exporter image registry
  1162. ## @param metrics.image.repository PostgreSQL Prometheus Exporter image repository
  1163. ## @param metrics.image.tag PostgreSQL Prometheus Exporter image tag (immutable tags are recommended)
  1164. ## @param metrics.image.pullPolicy PostgreSQL Prometheus Exporter image pull policy
  1165. ## @param metrics.image.pullSecrets Specify image pull secrets
  1166. ##
  1167. image:
  1168. registry: docker.io
  1169. repository: bitnami/postgres-exporter
  1170. tag: 0.10.1-debian-11-r6
  1171. pullPolicy: IfNotPresent
  1172. ## Optionally specify an array of imagePullSecrets.
  1173. ## Secrets must be manually created in the namespace.
  1174. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  1175. ## Example:
  1176. ## pullSecrets:
  1177. ## - myRegistryKeySecretName
  1178. ##
  1179. pullSecrets: []
  1180. ## @param metrics.customMetrics Define additional custom metrics
  1181. ## ref: https://github.com/wrouesnel/postgres_exporter#adding-new-metrics-via-a-config-file
  1182. ## customMetrics:
  1183. ## pg_database:
  1184. ## 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_bytes FROM pg_catalog.pg_database d where datname not in ('template0', 'template1', 'postgres')"
  1185. ## metrics:
  1186. ## - name:
  1187. ## usage: "LABEL"
  1188. ## description: "Name of the database"
  1189. ## - size_bytes:
  1190. ## usage: "GAUGE"
  1191. ## description: "Size of the database in bytes"
  1192. ##
  1193. customMetrics: {}
  1194. ## @param metrics.extraEnvVars Extra environment variables to add to PostgreSQL Prometheus exporter
  1195. ## see: https://github.com/wrouesnel/postgres_exporter#environment-variables
  1196. ## For example:
  1197. ## extraEnvVars:
  1198. ## - name: PG_EXPORTER_DISABLE_DEFAULT_METRICS
  1199. ## value: "true"
  1200. ##
  1201. extraEnvVars: []
  1202. ## PostgreSQL Prometheus exporter containers' Security Context
  1203. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  1204. ## @param metrics.containerSecurityContext.enabled Enable PostgreSQL Prometheus exporter containers' Security Context
  1205. ## @param metrics.containerSecurityContext.runAsUser Set PostgreSQL Prometheus exporter containers' Security Context runAsUser
  1206. ## @param metrics.containerSecurityContext.runAsNonRoot Set PostgreSQL Prometheus exporter containers' Security Context runAsNonRoot
  1207. ##
  1208. containerSecurityContext:
  1209. enabled: true
  1210. runAsUser: 1001
  1211. runAsNonRoot: true
  1212. ## Configure extra options for PostgreSQL Prometheus exporter containers' liveness, readiness and startup probes
  1213. ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
  1214. ## @param metrics.livenessProbe.enabled Enable livenessProbe on PostgreSQL Prometheus exporter containers
  1215. ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  1216. ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe
  1217. ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  1218. ## @param metrics.livenessProbe.failureThreshold Failure threshold for livenessProbe
  1219. ## @param metrics.livenessProbe.successThreshold Success threshold for livenessProbe
  1220. ##
  1221. livenessProbe:
  1222. enabled: true
  1223. initialDelaySeconds: 5
  1224. periodSeconds: 10
  1225. timeoutSeconds: 5
  1226. failureThreshold: 6
  1227. successThreshold: 1
  1228. ## @param metrics.readinessProbe.enabled Enable readinessProbe on PostgreSQL Prometheus exporter containers
  1229. ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  1230. ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe
  1231. ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  1232. ## @param metrics.readinessProbe.failureThreshold Failure threshold for readinessProbe
  1233. ## @param metrics.readinessProbe.successThreshold Success threshold for readinessProbe
  1234. ##
  1235. readinessProbe:
  1236. enabled: true
  1237. initialDelaySeconds: 5
  1238. periodSeconds: 10
  1239. timeoutSeconds: 5
  1240. failureThreshold: 6
  1241. successThreshold: 1
  1242. ## @param metrics.startupProbe.enabled Enable startupProbe on PostgreSQL Prometheus exporter containers
  1243. ## @param metrics.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  1244. ## @param metrics.startupProbe.periodSeconds Period seconds for startupProbe
  1245. ## @param metrics.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  1246. ## @param metrics.startupProbe.failureThreshold Failure threshold for startupProbe
  1247. ## @param metrics.startupProbe.successThreshold Success threshold for startupProbe
  1248. ##
  1249. startupProbe:
  1250. enabled: false
  1251. initialDelaySeconds: 10
  1252. periodSeconds: 10
  1253. timeoutSeconds: 1
  1254. failureThreshold: 15
  1255. successThreshold: 1
  1256. ## @param metrics.customLivenessProbe Custom livenessProbe that overrides the default one
  1257. ##
  1258. customLivenessProbe: {}
  1259. ## @param metrics.customReadinessProbe Custom readinessProbe that overrides the default one
  1260. ##
  1261. customReadinessProbe: {}
  1262. ## @param metrics.customStartupProbe Custom startupProbe that overrides the default one
  1263. ##
  1264. customStartupProbe: {}
  1265. ## @param metrics.containerPorts.metrics PostgreSQL Prometheus exporter metrics container port
  1266. ##
  1267. containerPorts:
  1268. metrics: 9187
  1269. ## PostgreSQL Prometheus exporter resource requests and limits
  1270. ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
  1271. ## @param metrics.resources.limits The resources limits for the PostgreSQL Prometheus exporter container
  1272. ## @param metrics.resources.requests The requested resources for the PostgreSQL Prometheus exporter container
  1273. ##
  1274. resources:
  1275. limits: {}
  1276. requests: {}
  1277. ## Service configuration
  1278. ##
  1279. service:
  1280. ## @param metrics.service.ports.metrics PostgreSQL Prometheus Exporter service port
  1281. ##
  1282. ports:
  1283. metrics: 9187
  1284. ## @param metrics.service.clusterIP Static clusterIP or None for headless services
  1285. ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
  1286. ##
  1287. clusterIP: ""
  1288. ## @param metrics.service.sessionAffinity Control where client requests go, to the same pod or round-robin
  1289. ## Values: ClientIP or None
  1290. ## ref: https://kubernetes.io/docs/user-guide/services/
  1291. ##
  1292. sessionAffinity: None
  1293. ## @param metrics.service.annotations [object] Annotations for Prometheus to auto-discover the metrics endpoint
  1294. ##
  1295. annotations:
  1296. prometheus.io/scrape: "true"
  1297. prometheus.io/port: "{{ .Values.metrics.service.ports.metrics }}"
  1298. ## Prometheus Operator ServiceMonitor configuration
  1299. ##
  1300. serviceMonitor:
  1301. ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using Prometheus Operator
  1302. ##
  1303. enabled: false
  1304. ## @param metrics.serviceMonitor.namespace Namespace for the ServiceMonitor Resource (defaults to the Release Namespace)
  1305. ##
  1306. namespace: ""
  1307. ## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped.
  1308. ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
  1309. ##
  1310. interval: ""
  1311. ## @param metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
  1312. ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
  1313. ##
  1314. scrapeTimeout: ""
  1315. ## @param metrics.serviceMonitor.labels Additional labels that can be used so ServiceMonitor will be discovered by Prometheus
  1316. ##
  1317. labels: {}
  1318. ## @param metrics.serviceMonitor.selector Prometheus instance selector labels
  1319. ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
  1320. ##
  1321. selector: {}
  1322. ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping
  1323. ##
  1324. relabelings: []
  1325. ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion
  1326. ##
  1327. metricRelabelings: []
  1328. ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint
  1329. ##
  1330. honorLabels: false
  1331. ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
  1332. ##
  1333. jobLabel: ""
  1334. ## Custom PrometheusRule to be defined
  1335. ## The value is evaluated as a template, so, for example, the value can depend on .Release or .Chart
  1336. ## ref: https://github.com/coreos/prometheus-operator#customresourcedefinitions
  1337. ##
  1338. prometheusRule:
  1339. ## @param metrics.prometheusRule.enabled Create a PrometheusRule for Prometheus Operator
  1340. ##
  1341. enabled: false
  1342. ## @param metrics.prometheusRule.namespace Namespace for the PrometheusRule Resource (defaults to the Release Namespace)
  1343. ##
  1344. namespace: ""
  1345. ## @param metrics.prometheusRule.labels Additional labels that can be used so PrometheusRule will be discovered by Prometheus
  1346. ##
  1347. labels: {}
  1348. ## @param metrics.prometheusRule.rules PrometheusRule definitions
  1349. ## Make sure to constraint the rules to the current postgresql service.
  1350. ## rules:
  1351. ## - alert: HugeReplicationLag
  1352. ## expr: pg_replication_lag{service="{{ printf "%s-metrics" (include "common.names.fullname" .) }}"} / 3600 > 1
  1353. ## for: 1m
  1354. ## labels:
  1355. ## severity: critical
  1356. ## annotations:
  1357. ## description: replication for {{ include "common.names.fullname" . }} PostgreSQL is lagging by {{ "{{ $value }}" }} hour(s).
  1358. ## summary: PostgreSQL replication is lagging by {{ "{{ $value }}" }} hour(s).
  1359. ##
  1360. rules: []