values.yaml 72 KB

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