SGCluster.yaml 272 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370
  1. apiVersion: apiextensions.k8s.io/v1
  2. kind: CustomResourceDefinition
  3. metadata:
  4. name: sgclusters.stackgres.io
  5. spec:
  6. group: stackgres.io
  7. scope: Namespaced
  8. names:
  9. kind: SGCluster
  10. listKind: SGClusterList
  11. plural: sgclusters
  12. singular: sgcluster
  13. shortNames:
  14. - sgclu
  15. versions:
  16. - name: v1
  17. served: true
  18. storage: true
  19. additionalPrinterColumns:
  20. - name: version
  21. type: string
  22. jsonPath: .spec.postgres.version
  23. - name: instances
  24. type: integer
  25. jsonPath: .spec.instances
  26. - name: Profile
  27. type: string
  28. jsonPath: .spec.sgInstanceProfile
  29. - name: Disk
  30. type: string
  31. jsonPath: .spec.pods.persistentVolume.size
  32. - name: prometheus-autobind
  33. type: string
  34. jsonPath: .spec.configurations.observability.prometheusAutobind
  35. priority: 1
  36. - name: pool-config
  37. type: string
  38. jsonPath: .spec.configurations.sgPoolingConfig
  39. priority: 1
  40. - name: postgres-config
  41. type: string
  42. jsonPath: .spec.configurations.sgPostgresConfig
  43. priority: 1
  44. subresources:
  45. # scale enables the scale subresource.
  46. scale:
  47. specReplicasPath: .spec.instances
  48. statusReplicasPath: .status.instances
  49. labelSelectorPath: .status.labelSelector
  50. schema:
  51. openAPIV3Schema:
  52. type: object
  53. required: ["metadata", "spec"]
  54. properties:
  55. metadata:
  56. type: object
  57. properties:
  58. name:
  59. type: string
  60. maxLength: 44
  61. pattern: "^[a-z]([-a-z0-9]*[a-z0-9])?$"
  62. description: |
  63. Name of the StackGres cluster. Following [Kubernetes naming conventions](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/identifiers.md), it must be an rfc1035/rfc1123 subdomain, that is, up to 253 characters consisting of one or more lowercase labels separated by `.`. Where each label is an alphanumeric (a-z, and 0-9) string, with the `-` character allowed anywhere except the first or last character.
  64. The name must be unique across all SGCluster, SGShardedCluster and SGDistributedLogs in the same namespace.
  65. spec:
  66. type: object
  67. description: |
  68. Specification of the desired behavior of a StackGres cluster.
  69. required: ["instances", "postgres", "pods"]
  70. properties:
  71. profile:
  72. type: string
  73. description: |
  74. The profile allow to change in a convenient place a set of configuration defaults that affect how the cluster is generated.
  75. All those defaults can be overwritten by setting the correspoinding fields.
  76. Available profiles are:
  77. * `production`:
  78. Prevents two Pods from running in the same Node (set `.spec.nonProductionOptions.disableClusterPodAntiAffinity` to `false` by default).
  79. Sets both limits and requests using `SGInstanceProfile` for `patroni` container that runs both Patroni and Postgres (set `.spec.nonProductionOptions.disablePatroniResourceRequirements` to `false` by default).
  80. Sets requests using the referenced `SGInstanceProfile` for sidecar containers other than `patroni` (set `.spec.nonProductionOptions.disableClusterResourceRequirements` to `false` by default).
  81. * `testing`:
  82. Allows two Pods to running in the same Node (set `.spec.nonProductionOptions.disableClusterPodAntiAffinity` to `true` by default).
  83. Sets both limits and requests using `SGInstanceProfile` for `patroni` container that runs both Patroni and Postgres (set `.spec.nonProductionOptions.disablePatroniResourceRequirements` to `false` by default).
  84. Sets requests using the referenced `SGInstanceProfile` for sidecar containers other than `patroni` (set `.spec.nonProductionOptions.disableClusterResourceRequirements` to `false` by default).
  85. * `development`:
  86. Allows two Pods from running in the same Node (set `.spec.nonProductionOptions.disableClusterPodAntiAffinity` to `true` by default).
  87. Unset both limits and requests for `patroni` container that runs both Patroni and Postgres (set `.spec.nonProductionOptions.disablePatroniResourceRequirements` to `true` by default).
  88. Unsets requests for sidecar containers other than `patroni` (set `.spec.nonProductionOptions.disableClusterResourceRequirements` to `true` by default).
  89. **Changing this field may require a restart.**
  90. default: production
  91. postgres:
  92. type: object
  93. description: |
  94. This section allows to configure Postgres features
  95. required: [ "version" ]
  96. properties:
  97. version:
  98. type: string
  99. description: |
  100. Postgres version used on the cluster. It is either of:
  101. * The string 'latest', which automatically sets the latest major.minor Postgres version.
  102. * A major version, like '14' or '13', which sets that major version and the latest minor version.
  103. * A specific major.minor version, like '14.4'.
  104. flavor:
  105. type: string
  106. description: |
  107. Postgres flavor used on the cluster. It is either of:
  108. * `vanilla` will use the [Official Postgres](https://www.postgresql.org/)
  109. * `babelfish` will use the [Babelfish for Postgres](https://babelfish-for-postgresql.github.io/babelfish-for-postgresql/).
  110. If not specified then the vanilla Postgres will be used for the cluster.
  111. **This field can only be set on creation.**
  112. default: vanilla
  113. extensions:
  114. type: array
  115. description: |
  116. StackGres support deploy of extensions at runtime by simply adding an entry to this array. A deployed extension still
  117. requires the creation in a database using the [`CREATE EXTENSION`](https://www.postgresql.org/docs/current/sql-createextension.html)
  118. statement. After an extension is deployed correctly it will be present until removed and the cluster restarted.
  119. A cluster restart is required for:
  120. * Extensions that requires to add an entry to [`shared_preload_libraries`](https://postgresqlco.nf/en/doc/param/shared_preload_libraries/) configuration parameter.
  121. * Upgrading extensions that overwrite any file that is not the extension''s control file or extension''s script file.
  122. * Removing extensions. Until the cluster is not restarted a removed extension will still be available.
  123. * Install of extensions that require extra mount. After installed the cluster will require to be restarted.
  124. **Example:**
  125. ``` yaml
  126. apiVersion: stackgres.io/v1
  127. kind: SGCluster
  128. metadata:
  129. name: stackgres
  130. spec:
  131. postgres:
  132. extensions:
  133. - {name: 'timescaledb', version: '2.3.1'}
  134. ```
  135. items:
  136. type: object
  137. required: ["name"]
  138. properties:
  139. name:
  140. type: string
  141. description: The name of the extension to deploy.
  142. publisher:
  143. type: string
  144. description: The id of the publisher of the extension to deploy. If not specified `com.ongres` will be used by default.
  145. default: com.ongres
  146. version:
  147. type: string
  148. description: The version of the extension to deploy. If not specified version of `stable` channel will be used by default and if only a version is available that one will be used.
  149. repository:
  150. type: string
  151. description: |
  152. The repository base URL from where to obtain the extension to deploy.
  153. **This section is filled by the operator.**
  154. ssl:
  155. type: object
  156. description: |
  157. This section allows to use SSL when connecting to Postgres
  158. **Example:**
  159. ```yaml
  160. apiVersion: stackgres.io/v1
  161. kind: SGCluster
  162. metadata:
  163. name: stackgres
  164. spec:
  165. postgres:
  166. ssl:
  167. enabled: true
  168. certificateSecretKeySelector:
  169. name: stackgres-secrets
  170. key: cert
  171. privateKeySecretKeySelector:
  172. name: stackgres-secrets
  173. key: key
  174. ```
  175. properties:
  176. enabled:
  177. type: boolean
  178. description: |
  179. Allow to enable SSL for connections to Postgres. By default is `false`.
  180. If `true` certificate and private key will be auto-generated unless fields `certificateSecretKeySelector` and `privateKeySecretKeySelector` are specified.
  181. certificateSecretKeySelector:
  182. type: object
  183. description: |
  184. Secret key selector for the certificate or certificate chain used for SSL connections.
  185. required: [ "name", "key" ]
  186. properties:
  187. name:
  188. type: string
  189. description: |
  190. The name of Secret that contains the certificate or certificate chain for SSL connections
  191. key:
  192. type: string
  193. description: |
  194. The key of Secret that contains the certificate or certificate chain for SSL connections
  195. privateKeySecretKeySelector:
  196. type: object
  197. description: |
  198. Secret key selector for the private key used for SSL connections.
  199. required: [ "name", "key" ]
  200. properties:
  201. name:
  202. type: string
  203. description: |
  204. The name of Secret that contains the private key for SSL connections
  205. key:
  206. type: string
  207. description: |
  208. The key of Secret that contains the private key for SSL connections
  209. instances:
  210. type: integer
  211. minimum: 0
  212. description: |
  213. Number of instances for the StackGres cluster. Each instance is a Pod containing one Postgres server.
  214. Out of all of the Postgres servers, one is elected as the primary, the rest remain as read-only replicas.
  215. autoscaling:
  216. type: object
  217. description: |
  218. This section allows to configure horizontal and vertical Pod autoscaling for the SGCluster's Pods.
  219. Horizontal Pod Autoscaling will use replicas connections usage (active connections / max connections) as the metric to control the upscale or downscale of the replicas.
  220. Horizontal Pod Autoscaling require the [KEDA operator](https://github.com/kedacore/keda) to be installed in the Kuberentes cluster.
  221. Vertical Pod Autoscaling will use cpu and memory usage as the metric to control the upscale or downscale of the Pod requests and limits resources.
  222. Vertical Pod Autoscaling requires the [Vertical Pod Autoscaler operator](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler) to be installed in the Kuberentes cluster.
  223. properties:
  224. mode:
  225. type: string
  226. description: |
  227. Allow to enable or disable any of horizontal and vertical Pod autoscaling.
  228. Possible values are:
  229. * `all`: both horizontal and vertical Pod autoscaling will be enabled (default)
  230. * `horizontal`: only horizontal Pod autoscaling will be enabled
  231. * `vertical`: only vertical Pod autoscaling will be enabled
  232. * `none`: all autoscaling will be disabled
  233. default: all
  234. minInstances:
  235. type: integer
  236. description: |
  237. The total minimum number of instances that the SGCluster will have (including the primary instance).
  238. This field is ignored when horizontal Pod autoscaling is disabled.
  239. minimum: 2
  240. maxInstances:
  241. type: integer
  242. description: |
  243. The total maximum number of instances that the SGCluster will have (including the primary instance).
  244. This field is ignored when horizontal Pod autoscaling is disabled.
  245. minimum: 2
  246. minAllowed:
  247. type: object
  248. description: |
  249. Allow to define the lower bound for Pod resources of patroni, pgbouncer and envoy containers
  250. properties:
  251. patroni:
  252. type: object
  253. description: |
  254. Allow to define the lower bound for Pod resources of patroni container
  255. properties:
  256. cpu:
  257. type: string
  258. description: The minimum allowed CPU for the patroni container
  259. memory:
  260. type: string
  261. description: The minimum allowed memory for the patroni container
  262. pgbouncer:
  263. type: object
  264. description: |
  265. Allow to define the lower bound for Pod resources of pgbouncer container
  266. properties:
  267. cpu:
  268. type: string
  269. description: The minimum allowed CPU for the pgbouncer container
  270. memory:
  271. type: string
  272. description: The minimum allowed memory for the pgbouncer container
  273. envoy:
  274. type: object
  275. description: |
  276. Allow to define the lower bound for Pod resources of envoy container
  277. properties:
  278. cpu:
  279. type: string
  280. description: The minimum allowed CPU for the envoy container
  281. memory:
  282. type: string
  283. description: The minimum allowed memory for the envoy container
  284. maxAllowed:
  285. type: object
  286. description: |
  287. Allow to define the higher bound for Pod resources of patroni, pgbouncer and envoy containers
  288. properties:
  289. patroni:
  290. type: object
  291. description: |
  292. Allow to define the higher bound for Pod resources of patroni container
  293. properties:
  294. cpu:
  295. type: string
  296. description: The maximum allowed CPU for the patroni container
  297. memory:
  298. type: string
  299. description: The maximum allowed memory for the patroni container
  300. pgbouncer:
  301. type: object
  302. description: |
  303. Allow to define the higher bound for Pod resources of pgbouncer container
  304. properties:
  305. cpu:
  306. type: string
  307. description: The maximum allowed CPU for the pgbouncer container
  308. memory:
  309. type: string
  310. description: The maximum allowed memory for the pgbouncer container
  311. envoy:
  312. type: object
  313. description: |
  314. Allow to define the higher bound for Pod resources of envoy container
  315. properties:
  316. cpu:
  317. type: string
  318. description: The maximum allowed CPU for the envoy container
  319. memory:
  320. type: string
  321. description: The maximum allowed memory for the envoy container
  322. horizontal:
  323. type: object
  324. description: |
  325. Section to configure horizontal Pod autoscaling aspects.
  326. properties:
  327. replicasConnectionsUsageTarget:
  328. type: string
  329. description: |
  330. The target value for replicas connections used in order to trigger the upscale of replica instances.
  331. default: "0.8"
  332. replicasConnectionsUsageMetricType:
  333. type: string
  334. description: |
  335. The metric type for connections used metric. See https://keda.sh/docs/latest/concepts/scaling-deployments/#triggers
  336. default: AverageValue
  337. cooldownPeriod:
  338. type: integer
  339. description: |
  340. The period in seconds before the downscale of replica instances can be triggered.
  341. default: 300
  342. pollingInterval:
  343. type: integer
  344. description: |
  345. The interval in seconds to check if the scaleup or scaledown have to be triggered.
  346. default: 30
  347. vertical:
  348. type: object
  349. description: |
  350. Section to configure vertical Pod autoscaling aspects.
  351. properties:
  352. recommender:
  353. type: string
  354. description: |
  355. Recommender responsible for generating recommendation for vertical Pod autoscaling. If not specified the default one will be used.
  356. replication:
  357. type: object
  358. description: |
  359. This section allows to configure Postgres replication mode and HA roles groups.
  360. The main replication group is implicit and contains the total number of instances less the sum of all
  361. instances in other replication groups.
  362. The total number of instances is always specified by `.spec.instances`.
  363. properties:
  364. mode:
  365. type: string
  366. description: |
  367. The replication mode applied to the whole cluster.
  368. Possible values are:
  369. * `async` (default)
  370. * `sync`
  371. * `strict-sync`
  372. * `sync-all`
  373. * `strict-sync-all`
  374. **async**
  375. When in asynchronous mode the cluster is allowed to lose some committed transactions.
  376. When the primary server fails or becomes unavailable for any other reason a sufficiently healthy standby
  377. will automatically be promoted to primary. Any transactions that have not been replicated to that standby
  378. remain in a "forked timeline" on the primary, and are effectively unrecoverable (the data is still there,
  379. but recovering it requires a manual recovery effort by data recovery specialists).
  380. **sync**
  381. When in synchronous mode a standby will not be promoted unless it is certain that the standby contains all
  382. transactions that may have returned a successful commit status to client (clients can change the behavior
  383. per transaction using PostgreSQL’s `synchronous_commit` setting. Transactions with `synchronous_commit`
  384. values of `off` and `local` may be lost on fail over, but will not be blocked by replication delays). This
  385. means that the system may be unavailable for writes even though some servers are available. System
  386. administrators can still use manual failover commands to promote a standby even if it results in transaction
  387. loss.
  388. Synchronous mode does not guarantee multi node durability of commits under all circumstances. When no suitable
  389. standby is available, primary server will still accept writes, but does not guarantee their replication. When
  390. the primary fails in this mode no standby will be promoted. When the host that used to be the primary comes
  391. back it will get promoted automatically, unless system administrator performed a manual failover. This behavior
  392. makes synchronous mode usable with 2 node clusters.
  393. When synchronous mode is used and a standby crashes, commits will block until the primary is switched to standalone
  394. mode. Manually shutting down or restarting a standby will not cause a commit service interruption. Standby will
  395. signal the primary to release itself from synchronous standby duties before PostgreSQL shutdown is initiated.
  396. **strict-sync**
  397. When it is absolutely necessary to guarantee that each write is stored durably on at least two nodes, use the strict
  398. synchronous mode. This mode prevents synchronous replication to be switched off on the primary when no synchronous
  399. standby candidates are available. As a downside, the primary will not be available for writes (unless the Postgres
  400. transaction explicitly turns off `synchronous_mode` parameter), blocking all client write requests until at least one
  401. synchronous replica comes up.
  402. **Note**: Because of the way synchronous replication is implemented in PostgreSQL it is still possible to lose
  403. transactions even when using strict synchronous mode. If the PostgreSQL backend is cancelled while waiting to acknowledge
  404. replication (as a result of packet cancellation due to client timeout or backend failure) transaction changes become
  405. visible for other backends. Such changes are not yet replicated and may be lost in case of standby promotion.
  406. **sync-all**
  407. The same as `sync` but `syncInstances` is ignored and the number of synchronous instances is equals to the total number
  408. of instances less one.
  409. **strict-sync-all**
  410. The same as `strict-sync` but `syncInstances` is ignored and the number of synchronous instances is equals to the total number
  411. of instances less one.
  412. default: async
  413. role:
  414. type: string
  415. description: |
  416. This role is applied to the instances of the implicit replication group that is composed by `.spec.instances` number of instances.
  417. Possible values are:
  418. * `ha-read` (default)
  419. * `ha`
  420. The primary instance will be elected among all the replication groups that are either `ha` or `ha-read`.
  421. Only if the role is set to `ha-read` instances of main replication group will be exposed via the replicas service.
  422. default: ha-read
  423. syncInstances:
  424. type: integer
  425. minimum: 1
  426. description: |
  427. Number of synchronous standby instances. Must be less than the total number of instances. It is set to 1 by default.
  428. Only setteable if mode is `sync` or `strict-sync`.
  429. groups:
  430. type: array
  431. description: |
  432. StackGres support replication groups where a replication group of a specified number of instances could have different
  433. replication role. The main replication group is implicit and contains the total number of instances less the sum of all
  434. instances in other replication groups.
  435. items:
  436. type: object
  437. required: ["role", "instances"]
  438. properties:
  439. name:
  440. type: string
  441. description: The name of the replication group. If not set will default to the `group-<index>`.
  442. role:
  443. type: string
  444. description: |
  445. This role is applied to the instances of this replication group.
  446. Possible values are:
  447. * `ha-read`
  448. * `ha`
  449. * `readonly`
  450. * `none`
  451. The primary instance will be elected among all the replication groups that are either `ha` or `ha-read`.
  452. Only if the role is set to `readonly` or `ha-read` instances of such replication group will be exposed via the replicas service.
  453. instances:
  454. type: integer
  455. minimum: 1
  456. description: |
  457. Number of StackGres instances for this replication group.
  458. The total number of instance of a cluster is always `.spec.instances`. The sum of the instances in all the replication groups must be
  459. less than the total number of instances.
  460. minInstances:
  461. type: integer
  462. minimum: 1
  463. description: |
  464. Minimum number of StackGres instances for this replication group. It is ignored when horizontal Pod autoscaling is disabled (see `.spec.autoscaling`)
  465. The total minimum number of instance of a cluster is always `.spec.autoscaling.minInstances`. The sum of the minimum instances in all the replication groups must be
  466. less than the total minimum number of instances.
  467. When this field is set the instances value that is provided by the user it is overwritten using the following formula to calculate it:
  468. ```
  469. <instances> = max(<minInstances>, <minInstances> * <cluster instances> / <cluster autoscaling minInstances>)
  470. ```
  471. initialization:
  472. type: object
  473. description: |
  474. Allow to specify how the replicas are initialized.
  475. properties:
  476. mode:
  477. type: string
  478. description: |
  479. Allow to specify how the replicas are initialized.
  480. Possible values are:
  481. * `FromPrimary`: When this mode is used replicas will be always created from the primary using `pg_basebackup`.
  482. * `FromReplica`: When this mode is used replicas will be created from another existing replica using
  483. `pg_basebackup`. Fallsback to `FromPrimary` if there's no replica or it fails.
  484. * `FromExistingBackup`: When this mode is used replicas will be created from an existing SGBackup. If `backupNewerThan` is set
  485. the SGBackup must be newer than its value. When this mode fails to restore an SGBackup it will try with a previous one (if exists).
  486. Fallsback to `FromReplica` if there's no backup left or it fails.
  487. * `FromNewlyCreatedBackup`: When this mode is used replicas will be created from a newly created SGBackup.
  488. Fallsback to `FromExistingBackup` if `backupNewerThan` is set and exists a recent backup newer than its value or it fails.
  489. default: FromExistingBackup
  490. backupNewerThan:
  491. type: string
  492. description: |
  493. An ISO 8601 duration in the format `PnDTnHnMn.nS`, that specifies how old an SGBackup have to be in order to be seleceted
  494. to initialize a replica.
  495. When `FromExistingBackup` mode is set this field restrict the selection of SGBackup to be used for recovery newer than the
  496. specified value.
  497. When `FromNewlyCreatedBackup` mode is set this field skip the creation SGBackup to be used for recovery if one newer than
  498. the specified value exists.
  499. backupRestorePerformance:
  500. type: object
  501. description: |
  502. Configuration that affects the backup network and disk usage performance during recovery.
  503. properties:
  504. maxNetworkBandwidth:
  505. type: integer
  506. description: |
  507. Maximum storage upload bandwidth used when storing a backup. In bytes (per second).
  508. maxDiskBandwidth:
  509. type: integer
  510. description: |
  511. Maximum disk read I/O when performing a backup. In bytes (per second).
  512. downloadConcurrency:
  513. type: integer
  514. minimum: 1
  515. description: |
  516. Backup storage may use several concurrent streams to read the data. This parameter configures the number of parallel streams to use. By default, it's set to the minimum between the number of file to read and 10.
  517. sgInstanceProfile:
  518. type: string
  519. description: |
  520. Name of the [SGInstanceProfile](https://stackgres.io/doc/latest/reference/crd/sginstanceprofile/).
  521. A SGInstanceProfile defines CPU and memory limits. Must exist before creating a cluster.
  522. When no profile is set, a default (1 core, 2 GiB RAM) one is used.
  523. **Changing this field may require a restart.**
  524. metadata:
  525. type: object
  526. description: Metadata information from cluster created resources.
  527. properties:
  528. annotations:
  529. type: object
  530. description: |
  531. Custom Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) to be passed to resources created and managed by StackGres.
  532. **Example:**
  533. ```yaml
  534. apiVersion: stackgres.io/v1
  535. kind: SGCluster
  536. metadata:
  537. name: stackgres
  538. spec:
  539. metadata:
  540. annotations:
  541. clusterPods:
  542. customAnnotations: customAnnotationValue
  543. primaryService:
  544. customAnnotations: customAnnotationValue
  545. replicasService:
  546. customAnnotations: customAnnotationValue
  547. ```
  548. properties:
  549. allResources:
  550. type: object
  551. description: Annotations to attach to any resource created or managed by StackGres.
  552. additionalProperties:
  553. type: string
  554. clusterPods:
  555. type: object
  556. description: Annotations to attach to pods created or managed by StackGres.
  557. additionalProperties:
  558. type: string
  559. services:
  560. type: object
  561. description: Annotations to attach to all services created or managed by StackGres.
  562. additionalProperties:
  563. type: string
  564. primaryService:
  565. type: object
  566. description: Custom Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) passed to the `-primary` service.
  567. additionalProperties:
  568. type: string
  569. replicasService:
  570. type: object
  571. description: Custom Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) passed to the `-replicas` service.
  572. additionalProperties:
  573. type: string
  574. labels:
  575. type: object
  576. description: |
  577. Custom Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to be passed to resources created and managed by StackGres.
  578. **Example:**
  579. ```yaml
  580. apiVersion: stackgres.io/v1
  581. kind: SGCluster
  582. metadata:
  583. name: stackgres
  584. spec:
  585. metadata:
  586. labels:
  587. clusterPods:
  588. customLabel: customLabelValue
  589. services:
  590. customLabel: customLabelValue
  591. ```
  592. properties:
  593. clusterPods:
  594. type: object
  595. description: Labels to attach to Pods created or managed by StackGres.
  596. additionalProperties:
  597. type: string
  598. services:
  599. type: object
  600. description: Labels to attach to Services and Endpoints created or managed by StackGres.
  601. additionalProperties:
  602. type: string
  603. postgresServices:
  604. type: object
  605. description: Kubernetes [services](https://kubernetes.io/docs/concepts/services-networking/service/) created or managed by StackGres.
  606. properties:
  607. primary:
  608. type: object
  609. description: |
  610. Configure the service to the primary with the same name as the SGCluster. A legacy service
  611. Provides a stable connection (regardless of primary failures or switchovers) to the read-write Postgres server of the cluster.
  612. See also https://kubernetes.io/docs/concepts/services-networking/service/
  613. properties: &service-properties
  614. enabled:
  615. type: boolean
  616. description: Specify if the service should be created or not.
  617. default: true
  618. type:
  619. type: string
  620. enum: ["ClusterIP", "LoadBalancer", "NodePort"]
  621. description: |
  622. type determines how the Service is exposed. Defaults to ClusterIP. Valid
  623. options are ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates
  624. a cluster-internal IP address for load-balancing to endpoints.
  625. "NodePort" builds on ClusterIP and allocates a port on every node.
  626. "LoadBalancer" builds on NodePort and creates
  627. an external load-balancer (if supported in the current cloud).
  628. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
  629. default: ClusterIP
  630. customPorts:
  631. type: array
  632. description: |
  633. The list of custom ports that will be exposed by the service.
  634. The names of custom ports will be prefixed with the string `custom-` so they do not
  635. conflict with ports defined for the service.
  636. The names of target ports will be prefixed with the string `custom-` so that the ports
  637. that can be referenced in this section will be only those defined under
  638. .spec.pods.customContainers[].ports sections were names are also prepended with the same
  639. prefix.
  640. **Changing this field may require a restart.**
  641. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#serviceport-v1-core
  642. items:
  643. description: |
  644. A custom port that will be exposed by the service.
  645. The name of the custom port will be prefixed with the string `custom-` so it does not
  646. conflict with ports defined for the service.
  647. The name of target port will be prefixed with the string `custom-` so that the port
  648. that can be referenced in this section will be only those defined under
  649. .spec.pods.customContainers[].ports sections were names are also prepended with the same
  650. prefix.
  651. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#serviceport-v1-core
  652. properties: &ports-items-properties #!jq_placeholder .definitions["io.k8s.api.core.v1.ServicePort"].properties
  653. {"appProtocol":{"description":"The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:\n\n* Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).\n\n* Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-\n * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.","type":"string"},"name":{"description":"The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.","type":"string"},"nodePort":{"description":"The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport","format":"int32","type":"integer"},"port":{"description":"The port that will be exposed by this service.","format":"int32","type":"integer"},"protocol":{"description":"The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.","type":"string"},"targetPort":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"}}
  654. required:
  655. - port
  656. type: object
  657. allocateLoadBalancerNodePorts: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.allocateLoadBalancerNodePorts
  658. {"description":"allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is \"true\". It may be set to \"false\" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.","type":"boolean"}
  659. externalIPs: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.externalIPs #allocateloadbalancernodeports-v1-core
  660. {"description":"externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#allocateloadbalancernodeports-v1-core","items":{"type":"string"},"type":"array"}
  661. externalTrafficPolicy: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.externalTrafficPolicy
  662. {"description":"externalTrafficPolicy describes how nodes distribute service traffic they receive on one of the Service's \"externally-facing\" addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). If set to \"Local\", the proxy will configure the service in a way that assumes that external load balancers will take care of balancing the service traffic between nodes, and so each node will deliver traffic only to the node-local endpoints of the service, without masquerading the client source IP. (Traffic mistakenly sent to a node with no endpoints will be dropped.) The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features). Note that traffic sent to an External IP or LoadBalancer IP from within the cluster will always get \"Cluster\" semantics, but clients sending to a NodePort from within the cluster may need to take traffic policy into account when picking a node.","type":"string"}
  663. healthCheckNodePort: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.healthCheckNodePort
  664. {"description":"healthCheckNodePort specifies the healthcheck nodePort for the service. This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). This field cannot be updated once set.","format":"int32","type":"integer"}
  665. internalTrafficPolicy: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.internalTrafficPolicy
  666. {"description":"InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. If set to \"Local\", the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, \"Cluster\", uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).","type":"string"}
  667. ipFamilies: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.ipFamilies
  668. {"description":"IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are \"IPv4\" and \"IPv6\". This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to \"headless\" services. This field will be wiped when updating a Service to type ExternalName.\n\nThis field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.","items":{"type":"string"},"type":"array"}
  669. ipFamilyPolicy: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.ipFamilyPolicy
  670. {"description":"IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. If there is no value provided, then this field will be set to SingleStack. Services can be \"SingleStack\" (a single IP family), \"PreferDualStack\" (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or \"RequireDualStack\" (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.","type":"string"}
  671. loadBalancerClass: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.loadBalancerClass
  672. {"description":"loadBalancerClass is the class of the load balancer implementation this Service belongs to. If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. \"internal-vip\" or \"example.com/internal-vip\". Unprefixed names are reserved for end-users. This field can only be set when the Service type is 'LoadBalancer'. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type 'LoadBalancer'. Once set, it can not be changed. This field will be wiped when a service is updated to a non 'LoadBalancer' type.","type":"string"}
  673. loadBalancerIP: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.loadBalancerIP
  674. {"description":"Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available.","type":"string"}
  675. loadBalancerSourceRanges: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.loadBalancerSourceRanges
  676. {"description":"If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. This field will be ignored if the cloud-provider does not support the feature.\" More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/","items":{"type":"string"},"type":"array"}
  677. publishNotReadyAddresses: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.publishNotReadyAddresses
  678. {"description":"publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. The primary use case for setting this field is for a StatefulSet's Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered \"ready\" even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.","type":"boolean"}
  679. sessionAffinity: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.sessionAffinity
  680. {"description":"Supports \"ClientIP\" and \"None\". Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies","type":"string"}
  681. sessionAffinityConfig: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.sessionAffinityConfig #sessionaffinityconfig-v1-core
  682. {"description":"SessionAffinityConfig represents the configurations of session affinity.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#sessionaffinityconfig-v1-core","properties":{"clientIP":{"description":"ClientIPConfig represents the configurations of Client IP based session affinity.","properties":{"timeoutSeconds":{"description":"timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).","format":"int32","type":"integer"}},"type":"object"}},"type":"object"}
  683. nodePorts:
  684. type: object
  685. description: nodePorts is a list of ports for exposing a cluster services to the outside
  686. world
  687. properties:
  688. pgport:
  689. type: integer
  690. description: the node port that will be exposed to connect to Postgres instance
  691. replicationport:
  692. type: integer
  693. description: the node port that will be exposed to connect to Postgres instance
  694. for replication purpose
  695. babelfish:
  696. type: integer
  697. description: the node port that will be exposed to connect to Babelfish instance
  698. using SQL Server wire-protocol and T-SQL
  699. replicas:
  700. type: object
  701. description: |
  702. Configure the service to any replica with the name as the SGCluster plus the `-replicas` suffix.
  703. It provides a stable connection (regardless of replica node failures) to any read-only Postgres server of the cluster. Read-only servers are load-balanced via this service.
  704. See also https://kubernetes.io/docs/concepts/services-networking/service/
  705. properties: *service-properties
  706. pods:
  707. type: object
  708. description: Cluster pod's configuration.
  709. required: ["persistentVolume"]
  710. properties:
  711. persistentVolume:
  712. type: object
  713. description: |
  714. Pod's persistent volume configuration.
  715. **Example:**
  716. ```yaml
  717. apiVersion: stackgres.io/v1
  718. kind: SGCluster
  719. metadata:
  720. name: stackgres
  721. spec:
  722. pods:
  723. persistentVolume:
  724. size: '5Gi'
  725. storageClass: default
  726. ```
  727. required: ["size"]
  728. properties:
  729. size:
  730. type: string
  731. pattern: '^[0-9]+(\.[0-9]+)?(Mi|Gi|Ti)$'
  732. description: |
  733. Size of the PersistentVolume set for each instance of the cluster. This size is specified either in Mebibytes, Gibibytes or Tebibytes (multiples of 2^20, 2^30 or 2^40, respectively).
  734. storageClass:
  735. type: string
  736. description: |
  737. Name of an existing StorageClass in the Kubernetes cluster, used to create the PersistentVolumes for the instances of the cluster.
  738. disableConnectionPooling:
  739. type: boolean
  740. description: |
  741. If set to `true`, avoids creating a connection pooling (using [PgBouncer](https://www.pgbouncer.org/)) sidecar.
  742. **Changing this field may require a restart.**
  743. default: false
  744. disableMetricsExporter:
  745. type: boolean
  746. description: |
  747. **Deprecated** use instead .spec.configurations.observability.disableMetrics.
  748. disablePostgresUtil:
  749. type: boolean
  750. description: |
  751. If set to `true`, avoids creating the `postgres-util` sidecar. This sidecar contains usual Postgres administration utilities *that are not present in the main (`patroni`) container*, like `psql`. Only disable if you know what you are doing.
  752. **Changing this field may require a restart.**
  753. default: false
  754. resources:
  755. type: object
  756. description: Pod custom resources configuration.
  757. properties:
  758. enableClusterLimitsRequirements:
  759. type: boolean
  760. description: |
  761. When enabled resource limits for containers other than the patroni container wil be set just like for patroni contianer as specified in the SGInstanceProfile.
  762. **Changing this field may require a restart.**
  763. default: false
  764. disableResourcesRequestsSplitFromTotal:
  765. type: boolean
  766. description: |
  767. When set to `true` the resources requests values in fields `SGInstanceProfile.spec.requests.cpu` and `SGInstanceProfile.spec.requests.memory` will represent the resources
  768. requests of the patroni container and the total resources requests calculated by adding the resources requests of all the containers (including the patroni container).
  769. **Changing this field may require a restart.**
  770. failWhenTotalIsHigher:
  771. type: boolean
  772. description: |
  773. When set to `true` the reconciliation of the cluster will fail if `disableResourcesRequestsSplitFromTotal` is not set or set to `false` and the sum of the CPU or memory
  774. of all the containers except patroni is equals or higher than the total specified in `SGInstanceProfile.spec.requests.cpu` or `SGInstanceProfile.spec.requests.memory`.
  775. When `false` (the default) and `disableResourcesRequestsSplitFromTotal` is not set or set to `false` and the sum of the CPU or memory
  776. of all the containers except patroni is equals or higher than the total specified in `SGInstanceProfile.spec.requests.cpu` or `SGInstanceProfile.spec.requests.memory`
  777. then the patroni container resources will be set to 0.
  778. scheduling:
  779. type: object
  780. description: |
  781. Pod custom scheduling, affinity and topology spread constratins configuration.
  782. **Changing this field may require a restart.**
  783. properties:
  784. nodeSelector: &node-selector
  785. type: object
  786. additionalProperties:
  787. type: string
  788. description: |
  789. NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
  790. tolerations: &tolerations #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.tolerations #toleration-v1-core
  791. {"description":"If specified, the pod's tolerations.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#toleration-v1-core","items":{"description":"The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.","properties":{"effect":{"description":"Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.","type":"string"},"key":{"description":"Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.","type":"string"},"operator":{"description":"Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.","type":"string"},"tolerationSeconds":{"description":"TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.","format":"int64","type":"integer"},"value":{"description":"Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.","type":"string"}},"type":"object"},"type":"array"}
  792. nodeAffinity: &node-affinity #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.affinity.properties.nodeAffinity #nodeaffinity-v1-core
  793. {"description":"Node affinity is a group of node affinity scheduling rules.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#nodeaffinity-v1-core","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.","items":{"description":"An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).","properties":{"preference":{"description":"A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchFields":{"description":"A list of node selector requirements by node's fields.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"}},"type":"object"},"weight":{"description":"Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","preference"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.","properties":{"nodeSelectorTerms":{"description":"Required. A list of node selector terms. The terms are ORed.","items":{"description":"A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.","properties":{"matchExpressions":{"description":"A list of node selector requirements by node's labels.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchFields":{"description":"A list of node selector requirements by node's fields.","items":{"description":"A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"The label key that the selector applies to.","type":"string"},"operator":{"description":"Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.","type":"string"},"values":{"description":"An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"}},"type":"object"},"type":"array"}},"required":["nodeSelectorTerms"],"type":"object"}},"type":"object"}
  794. priorityClassName: &priority-class-name #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.priorityClassName
  795. {"description":"If specified, indicates the pod's priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default.","type":"string"}
  796. podAffinity: &pod-affinity #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.affinity.properties.podAffinity #podaffinity-v1-core
  797. {"description":"Pod affinity is a group of inter pod affinity scheduling rules.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podaffinity-v1-core","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.","items":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","properties":{"podAffinityTerm":{"description":"Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"matchLabelKeys":{"description":"MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"mismatchLabelKeys":{"description":"MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"namespaceSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.","type":"string"}},"required":["topologyKey"],"type":"object"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","podAffinityTerm"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.","items":{"description":"Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"matchLabelKeys":{"description":"MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"mismatchLabelKeys":{"description":"MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"namespaceSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.","type":"string"}},"required":["topologyKey"],"type":"object"},"type":"array"}},"type":"object"}
  798. podAntiAffinity: &pod-anti-affinity #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.affinity.properties.podAntiAffinity #podantiaffinity-v1-core
  799. {"description":"Pod anti affinity is a group of inter pod anti affinity scheduling rules.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#podantiaffinity-v1-core","properties":{"preferredDuringSchedulingIgnoredDuringExecution":{"description":"The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.","items":{"description":"The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)","properties":{"podAffinityTerm":{"description":"Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"matchLabelKeys":{"description":"MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"mismatchLabelKeys":{"description":"MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"namespaceSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.","type":"string"}},"required":["topologyKey"],"type":"object"},"weight":{"description":"weight associated with matching the corresponding podAffinityTerm, in the range 1-100.","format":"int32","type":"integer"}},"required":["weight","podAffinityTerm"],"type":"object"},"type":"array"},"requiredDuringSchedulingIgnoredDuringExecution":{"description":"If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.","items":{"description":"Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running","properties":{"labelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"matchLabelKeys":{"description":"MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"mismatchLabelKeys":{"description":"MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.","items":{"type":"string"},"type":"array"},"namespaceSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"namespaces":{"description":"namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod's namespace\".","items":{"type":"string"},"type":"array"},"topologyKey":{"description":"This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.","type":"string"}},"required":["topologyKey"],"type":"object"},"type":"array"}},"type":"object"}
  800. topologySpreadConstraints: #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.topologySpreadConstraints #topologyspreadconstraint-v1-core
  801. {"description":"TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#topologyspreadconstraint-v1-core","items":{"description":"TopologySpreadConstraint specifies how to spread matching pods among the given topology.","properties":{"labelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"matchLabelKeys":{"description":"MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.\n\nThis is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).","items":{"type":"string"},"type":"array"},"maxSkew":{"description":"MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.","format":"int32","type":"integer"},"minDomains":{"description":"MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.\n\nFor example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew.\n\nThis is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default).","format":"int32","type":"integer"},"nodeAffinityPolicy":{"description":"NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.\n\nIf this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.","type":"string"},"nodeTaintsPolicy":{"description":"NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.\n\nIf this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.","type":"string"},"topologyKey":{"description":"TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a \"bucket\", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is \"kubernetes.io/hostname\", each Node is a domain of that topology. And, if TopologyKey is \"topology.kubernetes.io/zone\", each zone is a domain of that topology. It's a required field.","type":"string"},"whenUnsatisfiable":{"description":"WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location,\n but giving higher precedence to topologies that would help reduce the\n skew.\nA constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.","type":"string"}},"required":["maxSkew","topologyKey","whenUnsatisfiable"],"type":"object"},"type":"array"}
  802. backup:
  803. type: object
  804. description: Backup Pod custom scheduling and affinity configuration.
  805. properties:
  806. nodeSelector: *node-selector
  807. tolerations: *tolerations
  808. nodeAffinity: *node-affinity
  809. priorityClassName: *priority-class-name
  810. podAffinity: *pod-affinity
  811. podAntiAffinity: *pod-anti-affinity
  812. managementPolicy:
  813. type: string
  814. description: |
  815. managementPolicy controls how pods are created during initial scale up, when replacing pods
  816. on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created
  817. in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is
  818. ready before continuing. When scaling down, the pods are removed in the opposite order.
  819. The alternative policy is `Parallel` which will create pods in parallel to match the desired
  820. scale without waiting, and on scale down will delete all pods at once.
  821. default: OrderedReady
  822. customVolumes:
  823. type: array
  824. description: |
  825. A list of custom volumes that may be used along with any container defined in
  826. customInitContainers or customContainers sections.
  827. The name used in this section will be prefixed with the string `custom-` so that when
  828. referencing them in the customInitContainers or customContainers sections the name used
  829. have to be prepended with the same prefix.
  830. Only the following volume types are allowed: configMap, downwardAPI, emptyDir,
  831. gitRepo, glusterfs, hostPath, nfs, projected and secret
  832. **Changing this field may require a restart.**
  833. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#volume-v1-core
  834. items:
  835. type: object
  836. description: |
  837. A custom volume that may be used along with any container defined in
  838. customInitContainers or customContainers sections.
  839. The name used in this section will be prefixed with the string `custom-` so that when
  840. referencing them in the customInitContainers or customContainers sections the name used
  841. have to be prepended with the same prefix.
  842. Only the following volume types are allowed: configMap, downwardAPI, emptyDir,
  843. gitRepo, glusterfs, hostPath, nfs, projected and secret
  844. **Changing this field may require a restart.**
  845. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#volume-v1-core
  846. required: ["name"]
  847. properties:
  848. name:
  849. description: |
  850. name of the custom volume. The name will be implicitly prefixed with `custom-` to avoid clashing with internal operator volume names. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
  851. type: string
  852. configMap: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.configMap #configmapvolumesource-v1-core
  853. {"description":"Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#configmapvolumesource-v1-core","properties":{"defaultMode":{"description":"defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","items":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"key is the key to project.","type":"string"},"mode":{"description":"mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"path":{"description":"path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"}
  854. downwardAPI: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.downwardAPI #downwardapivolumesource-v1-core
  855. {"description":"DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#downwardapivolumesource-v1-core","properties":{"defaultMode":{"description":"Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"items":{"description":"Items is a list of downward API volume file","items":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","properties":{"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"mode":{"description":"Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"path":{"description":"Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'","type":"string"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"}
  856. emptyDir: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.emptyDir #emptydirvolumesource-v1-core
  857. {"description":"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#emptydirvolumesource-v1-core","properties":{"medium":{"description":"medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir","type":"string"},"sizeLimit":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"}},"type":"object"}
  858. gitRepo: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.gitRepo #gitrepovolumesource-v1-core
  859. {"description":"Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#gitrepovolumesource-v1-core","properties":{"directory":{"description":"directory is the target directory name. Must not contain or start with '..'. If '.' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.","type":"string"},"repository":{"description":"repository is the URL","type":"string"},"revision":{"description":"revision is the commit hash for the specified revision.","type":"string"}},"required":["repository"],"type":"object"}
  860. glusterfs: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.glusterfs #glusterfsvolumesource-v1-core
  861. {"description":"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#glusterfsvolumesource-v1-core","properties":{"endpoints":{"description":"endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string"},"path":{"description":"path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"string"},"readOnly":{"description":"readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod","type":"boolean"}},"required":["endpoints","path"],"type":"object"}
  862. hostPath: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.hostPath #hostpathvolumesource-v1-core
  863. {"description":"Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#hostpathvolumesource-v1-core","properties":{"path":{"description":"path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string"},"type":{"description":"type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath","type":"string"}},"required":["path"],"type":"object"}
  864. nfs: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.nfs #nfsvolumesource-v1-core
  865. {"description":"Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#nfsvolumesource-v1-core","properties":{"path":{"description":"path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string"},"readOnly":{"description":"readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"boolean"},"server":{"description":"server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs","type":"string"}},"required":["server","path"],"type":"object"}
  866. projected: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.projected #projectedvolumesource-v1-core
  867. {"description":"Represents a projected volume source\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#projectedvolumesource-v1-core","properties":{"defaultMode":{"description":"defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"sources":{"description":"sources is the list of volume projections","items":{"description":"Projection that may be projected along with other supported volume types","properties":{"clusterTrustBundle":{"description":"ClusterTrustBundleProjection describes how to select a set of ClusterTrustBundle objects and project their contents into the pod filesystem.","properties":{"labelSelector":{"description":"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.","properties":{"matchExpressions":{"description":"matchExpressions is a list of label selector requirements. The requirements are ANDed.","items":{"description":"A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.","properties":{"key":{"description":"key is the label key that the selector applies to.","type":"string"},"operator":{"description":"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.","type":"string"},"values":{"description":"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.","items":{"type":"string"},"type":"array"}},"required":["key","operator"],"type":"object"},"type":"array"},"matchLabels":{"additionalProperties":{"type":"string"},"description":"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.","type":"object"}},"type":"object"},"name":{"description":"Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector.","type":"string"},"optional":{"description":"If true, don't block pod startup if the referenced ClusterTrustBundle(s) aren't available. If using name, then the named ClusterTrustBundle is allowed not to exist. If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles.","type":"boolean"},"path":{"description":"Relative path from the volume root to write the bundle.","type":"string"},"signerName":{"description":"Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated.","type":"string"}},"required":["path"],"type":"object"},"configMap":{"description":"Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.","properties":{"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","items":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"key is the key to project.","type":"string"},"mode":{"description":"mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"path":{"description":"path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional specify whether the ConfigMap or its keys must be defined","type":"boolean"}},"type":"object"},"downwardAPI":{"description":"Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.","properties":{"items":{"description":"Items is a list of DownwardAPIVolume file","items":{"description":"DownwardAPIVolumeFile represents information to create the file containing the pod field","properties":{"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"mode":{"description":"Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"path":{"description":"Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'","type":"string"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"}},"required":["path"],"type":"object"},"type":"array"}},"type":"object"},"secret":{"description":"Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.","properties":{"items":{"description":"items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","items":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"key is the key to project.","type":"string"},"mode":{"description":"mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"path":{"description":"path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"optional field specify whether the Secret or its key must be defined","type":"boolean"}},"type":"object"},"serviceAccountToken":{"description":"ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).","properties":{"audience":{"description":"audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver.","type":"string"},"expirationSeconds":{"description":"expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes.","format":"int64","type":"integer"},"path":{"description":"path is the path relative to the mount point of the file to project the token into.","type":"string"}},"required":["path"],"type":"object"}},"type":"object"},"type":"array"}},"type":"object"}
  868. secret: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.secret #secretvolumesource-v1-core
  869. {"description":"Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretvolumesource-v1-core","properties":{"defaultMode":{"description":"defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"items":{"description":"items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.","items":{"description":"Maps a string key to a path within a volume.","properties":{"key":{"description":"key is the key to project.","type":"string"},"mode":{"description":"mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.","format":"int32","type":"integer"},"path":{"description":"path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.","type":"string"}},"required":["key","path"],"type":"object"},"type":"array"},"optional":{"description":"optional field specify whether the Secret or its keys must be defined","type":"boolean"},"secretName":{"description":"secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret","type":"string"}},"type":"object"}
  870. persistentVolumeClaim: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.persistentVolumeClaim #persistentvolumeclaimvolumesource-v1-core
  871. {"description":"PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#persistentvolumeclaimvolumesource-v1-core","properties":{"claimName":{"description":"claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims","type":"string"},"readOnly":{"description":"readOnly Will force the ReadOnly setting in VolumeMounts. Default false.","type":"boolean"}},"required":["claimName"],"type":"object"}
  872. customInitContainers:
  873. type: array
  874. description: |
  875. A list of custom application init containers that run within the cluster's Pods. The
  876. custom init containers will run following the defined sequence as the end of
  877. cluster's Pods init containers.
  878. The name used in this section will be prefixed with the string `custom-` so that when
  879. referencing them in the .spec.containers section of SGInstanceProfile the name used
  880. have to be prepended with the same prefix.
  881. **Changing this field may require a restart.**
  882. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core
  883. items:
  884. type: object
  885. description: |
  886. A custom application init container that run within the cluster's Pods. The custom init
  887. containers will run following the defined sequence as the end of cluster's Pods init
  888. containers.
  889. The name used in this section will be prefixed with the string `custom-` so that when
  890. referencing them in the .spec.containers section of SGInstanceProfile the name used
  891. have to be prepended with the same prefix.
  892. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core\n
  893. **Changing this field may require a restart.**
  894. required: ["name"]
  895. properties: &containers-items-properties #!jq_placeholder .definitions["io.k8s.api.core.v1.Container"].properties
  896. {"args":{"description":"Arguments to the entrypoint. The container image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","items":{"type":"string"},"type":"array"},"command":{"description":"Entrypoint array. Not executed within a shell. The container image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell","items":{"type":"string"},"type":"array"},"env":{"description":"List of environment variables to set in the container. Cannot be updated.","items":{"description":"EnvVar represents an environment variable present in a Container.","properties":{"name":{"description":"Name of the environment variable. Must be a C_IDENTIFIER.","type":"string"},"value":{"description":"Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".","type":"string"},"valueFrom":{"description":"EnvVarSource represents a source for the value of an EnvVar.","properties":{"configMapKeyRef":{"description":"Selects a key from a ConfigMap.","properties":{"key":{"description":"The key to select.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"},"fieldRef":{"description":"ObjectFieldSelector selects an APIVersioned field of an object.","properties":{"apiVersion":{"description":"Version of the schema the FieldPath is written in terms of, defaults to \"v1\".","type":"string"},"fieldPath":{"description":"Path of the field to select in the specified API version.","type":"string"}},"required":["fieldPath"],"type":"object"},"resourceFieldRef":{"description":"ResourceFieldSelector represents container resources (cpu, memory) and their output format","properties":{"containerName":{"description":"Container name: required for volumes, optional for env vars","type":"string"},"divisor":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"},"resource":{"description":"Required: resource to select","type":"string"}},"required":["resource"],"type":"object"},"secretKeyRef":{"description":"SecretKeySelector selects a key of a Secret.","properties":{"key":{"description":"The key of the secret to select from. Must be a valid secret key.","type":"string"},"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret or its key must be defined","type":"boolean"}},"required":["key"],"type":"object"}},"type":"object"}},"required":["name"],"type":"object"},"type":"array"},"envFrom":{"description":"List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.","items":{"description":"EnvFromSource represents the source of a set of ConfigMaps","properties":{"configMapRef":{"description":"ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the ConfigMap must be defined","type":"boolean"}},"type":"object"},"prefix":{"description":"An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.","type":"string"},"secretRef":{"description":"SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.","properties":{"name":{"description":"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names","type":"string"},"optional":{"description":"Specify whether the Secret must be defined","type":"boolean"}},"type":"object"}},"type":"object"},"type":"array"},"image":{"description":"Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets.","type":"string"},"imagePullPolicy":{"description":"Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images","type":"string"},"lifecycle":{"description":"Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.","properties":{"postStart":{"description":"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"sleep":{"description":"SleepAction describes a \"sleep\" action.","properties":{"seconds":{"description":"Seconds is the number of seconds to sleep.","format":"int64","type":"integer"}},"required":["seconds"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"}},"required":["port"],"type":"object"}},"type":"object"},"preStop":{"description":"LifecycleHandler defines a specific action that should be taken in a lifecycle hook. One and only one of the fields, except TCPSocket must be specified.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.","items":{"type":"string"},"type":"array"}},"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"sleep":{"description":"SleepAction describes a \"sleep\" action.","properties":{"seconds":{"description":"Seconds is the number of seconds to sleep.","format":"int64","type":"integer"}},"required":["seconds"],"type":"object"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"}},"required":["port"],"type":"object"}},"type":"object"}},"type":"object"},"livenessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"grpc":{"properties":{"port":{"description":"Port number of the gRPC service. Number must be in the range 1 to 65535.","format":"int32","type":"integer"},"service":{"description":"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.","type":"string"}},"required":["port"],"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"}},"required":["port"],"type":"object"},"terminationGracePeriodSeconds":{"description":"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.","format":"int64","type":"integer"},"timeoutSeconds":{"description":"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","format":"int32","type":"integer"}},"type":"object"},"name":{"description":"Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.","type":"string"},"ports":{"description":"List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated.","items":{"description":"ContainerPort represents a network port in a single container.","properties":{"containerPort":{"description":"Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536.","format":"int32","type":"integer"},"hostIP":{"description":"What host IP to bind the external port to.","type":"string"},"hostPort":{"description":"Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.","format":"int32","type":"integer"},"name":{"description":"If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services.","type":"string"},"protocol":{"description":"Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\".","type":"string"}},"required":["containerPort"],"type":"object"},"type":"array"},"readinessProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"grpc":{"properties":{"port":{"description":"Port number of the gRPC service. Number must be in the range 1 to 65535.","format":"int32","type":"integer"},"service":{"description":"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.","type":"string"}},"required":["port"],"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"}},"required":["port"],"type":"object"},"terminationGracePeriodSeconds":{"description":"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.","format":"int64","type":"integer"},"timeoutSeconds":{"description":"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","format":"int32","type":"integer"}},"type":"object"},"resizePolicy":{"description":"Resources resize policy for the container.","items":{"description":"ContainerResizePolicy represents resource resize policy for the container.","properties":{"resourceName":{"description":"Name of the resource to which this resource resize policy applies. Supported values: cpu, memory.","type":"string"},"restartPolicy":{"description":"Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired.","type":"string"}},"required":["resourceName","restartPolicy"],"type":"object"},"type":"array"},"resources":{"description":"ResourceRequirements describes the compute resource requirements.","properties":{"claims":{"description":"Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.\n\nThis is an alpha field and requires enabling the DynamicResourceAllocation feature gate.\n\nThis field is immutable. It can only be set for containers.","items":{"description":"ResourceClaim references one entry in PodSpec.ResourceClaims.","properties":{"name":{"description":"Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.","type":"string"}},"required":["name"],"type":"object"},"type":"array"},"limits":{"additionalProperties":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"},"description":"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","type":"object"},"requests":{"additionalProperties":{"description":"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.","type":"string"},"description":"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/","type":"object"}},"type":"object"},"restartPolicy":{"description":"RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed.","type":"string"},"securityContext":{"description":"SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.","properties":{"allowPrivilegeEscalation":{"description":"AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"capabilities":{"description":"Adds and removes POSIX capabilities from running containers.","properties":{"add":{"description":"Added capabilities","items":{"type":"string"},"type":"array"},"drop":{"description":"Removed capabilities","items":{"type":"string"},"type":"array"}},"type":"object"},"privileged":{"description":"Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"procMount":{"description":"procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.","type":"string"},"readOnlyRootFilesystem":{"description":"Whether this container has a read-only root filesystem. Default is false. Note that this field cannot be set when spec.os.name is windows.","type":"boolean"},"runAsGroup":{"description":"The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","format":"int64","type":"integer"},"runAsNonRoot":{"description":"Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"boolean"},"runAsUser":{"description":"The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.","format":"int64","type":"integer"},"seLinuxOptions":{"description":"SELinuxOptions are the labels to be applied to the container","properties":{"level":{"description":"Level is SELinux level label that applies to the container.","type":"string"},"role":{"description":"Role is a SELinux role label that applies to the container.","type":"string"},"type":{"description":"Type is a SELinux type label that applies to the container.","type":"string"},"user":{"description":"User is a SELinux user label that applies to the container.","type":"string"}},"type":"object"},"seccompProfile":{"description":"SeccompProfile defines a pod/container's seccomp profile settings. Only one profile source may be set.","properties":{"localhostProfile":{"description":"localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is \"Localhost\". Must NOT be set for any other type.","type":"string"},"type":{"description":"type indicates which kind of seccomp profile will be applied. Valid options are:\n\nLocalhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.","type":"string"}},"required":["type"],"type":"object"},"windowsOptions":{"description":"WindowsSecurityContextOptions contain Windows-specific options and credentials.","properties":{"gmsaCredentialSpec":{"description":"GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.","type":"string"},"gmsaCredentialSpecName":{"description":"GMSACredentialSpecName is the name of the GMSA credential spec to use.","type":"string"},"hostProcess":{"description":"HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.","type":"boolean"},"runAsUserName":{"description":"The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.","type":"string"}},"type":"object"}},"type":"object"},"startupProbe":{"description":"Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.","properties":{"exec":{"description":"ExecAction describes a \"run in container\" action.","properties":{"command":{"description":"Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.","items":{"type":"string"},"type":"array"}},"type":"object"},"failureThreshold":{"description":"Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.","format":"int32","type":"integer"},"grpc":{"properties":{"port":{"description":"Port number of the gRPC service. Number must be in the range 1 to 65535.","format":"int32","type":"integer"},"service":{"description":"Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).\n\nIf this is not specified, the default behavior is defined by gRPC.","type":"string"}},"required":["port"],"type":"object"},"httpGet":{"description":"HTTPGetAction describes an action based on HTTP Get requests.","properties":{"host":{"description":"Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.","type":"string"},"httpHeaders":{"description":"Custom headers to set in the request. HTTP allows repeated headers.","items":{"description":"HTTPHeader describes a custom header to be used in HTTP probes","properties":{"name":{"description":"The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header.","type":"string"},"value":{"description":"The header field value","type":"string"}},"required":["name","value"],"type":"object"},"type":"array"},"path":{"description":"Path to access on the HTTP server.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"},"scheme":{"description":"Scheme to use for connecting to the host. Defaults to HTTP.","type":"string"}},"required":["port"],"type":"object"},"initialDelaySeconds":{"description":"Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","format":"int32","type":"integer"},"periodSeconds":{"description":"How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1.","format":"int32","type":"integer"},"successThreshold":{"description":"Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.","format":"int32","type":"integer"},"tcpSocket":{"description":"TCPSocketAction describes an action based on opening a socket","properties":{"host":{"description":"Optional: Host name to connect to, defaults to the pod IP.","type":"string"},"port":{"description":"IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.","format":"int-or-string","type":"string"}},"required":["port"],"type":"object"},"terminationGracePeriodSeconds":{"description":"Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.","format":"int64","type":"integer"},"timeoutSeconds":{"description":"Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes","format":"int32","type":"integer"}},"type":"object"},"stdin":{"description":"Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false.","type":"boolean"},"stdinOnce":{"description":"Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false","type":"boolean"},"terminationMessagePath":{"description":"Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.","type":"string"},"terminationMessagePolicy":{"description":"Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.","type":"string"},"tty":{"description":"Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false.","type":"boolean"},"volumeDevices":{"description":"volumeDevices is the list of block devices to be used by the container.","items":{"description":"volumeDevice describes a mapping of a raw block device within a container.","properties":{"devicePath":{"description":"devicePath is the path inside of the container that the device will be mapped to.","type":"string"},"name":{"description":"name must match the name of a persistentVolumeClaim in the pod","type":"string"}},"required":["name","devicePath"],"type":"object"},"type":"array"},"volumeMounts":{"description":"Pod volumes to mount into the container's filesystem. Cannot be updated.","items":{"description":"VolumeMount describes a mounting of a Volume within a container.","properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string"},"mountPropagation":{"description":"mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string"},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.","type":"string"}},"required":["name","mountPath"],"type":"object"},"type":"array"},"workingDir":{"description":"Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.","type":"string"}}
  897. customContainers:
  898. type: array
  899. description: |
  900. A list of custom application containers that run within the cluster's Pods.
  901. The name used in this section will be prefixed with the string `custom-` so that when
  902. referencing them in the .spec.containers section of SGInstanceProfile the name used
  903. have to be prepended with the same prefix.
  904. **Changing this field may require a restart.**
  905. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core
  906. items:
  907. type: object
  908. description: |
  909. A custom application container that run within the cluster's Pods. The custom
  910. containers will run following the defined sequence as the end of cluster's Pods
  911. containers.
  912. The name used in this section will be prefixed with the string `custom-` so that when
  913. referencing them in the .spec.containers section of SGInstanceProfile the name used
  914. have to be prepended with the same prefix.
  915. See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core\n
  916. **Changing this field may require a restart.**
  917. required: ["name"]
  918. properties: *containers-items-properties
  919. customVolumeMounts:
  920. type: object
  921. description: Custom Pod volumes to mount into the specified container's filesystem.
  922. additionalProperties:
  923. type: array
  924. description: Custom Pod volumes to mount into the specified container's filesystem.
  925. items: &volume-mounts-items #!jq_placeholder .definitions["io.k8s.api.core.v1.VolumeMount"] #volumemount-v1-core
  926. {"description":"VolumeMount describes a mounting of a Volume within a container.\n\nSee https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#volumemount-v1-core","properties":{"mountPath":{"description":"Path within the container at which the volume should be mounted. Must not contain ':'.","type":"string"},"mountPropagation":{"description":"mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10.","type":"string"},"name":{"description":"This must match the Name of a Volume.","type":"string"},"readOnly":{"description":"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.","type":"boolean"},"subPath":{"description":"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).","type":"string"},"subPathExpr":{"description":"Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive.","type":"string"}},"required":["name","mountPath"],"type":"object"}
  927. customInitVolumeMounts:
  928. type: object
  929. description: Custom Pod volumes to mount into the specified init container's filesystem.
  930. additionalProperties:
  931. type: array
  932. description: Custom Pod volumes to mount into the specified init container's filesystem.
  933. items: *volume-mounts-items
  934. configurations:
  935. type: object
  936. description: |
  937. Cluster custom configurations.
  938. **Example:**
  939. ``` yaml
  940. apiVersion: stackgres.io/v1
  941. kind: SGCluster
  942. metadata:
  943. name: stackgres
  944. spec:
  945. configurations:
  946. sgPostgresConfig: 'postgresconf'
  947. sgPoolingConfig: 'pgbouncerconf'
  948. backups:
  949. - sgObjectStorage: 'backupconf'
  950. ```
  951. properties:
  952. sgPostgresConfig:
  953. type: string
  954. description: |
  955. Name of the [SGPostgresConfig](https://stackgres.io/doc/latest/reference/crd/sgpgconfig) used for the cluster.
  956. It must exist. When not set, a default Postgres config, for the major version selected, is used.
  957. **Changing this field may require a restart.**
  958. sgPoolingConfig:
  959. type: string
  960. description: |
  961. Name of the [SGPoolingConfig](https://stackgres.io/doc/latest/reference/crd/sgpoolconfig) used for this cluster.
  962. Each pod contains a sidecar with a connection pooler (currently: [PgBouncer](https://www.pgbouncer.org/)). The connection pooler is implemented as a sidecar.
  963. If not set, a default configuration will be used. Disabling connection pooling altogether is possible if the disableConnectionPooling property of the pods object is set to true.
  964. **Changing this field may require a restart.**
  965. observability:
  966. type: object
  967. description: Allow to specify Observability configuration (related to logs, metrics and traces)
  968. properties:
  969. disableMetrics:
  970. type: boolean
  971. description: |
  972. If set to `true`, avoids creating the Prometheus exporter sidecar. Recommended when there's no intention to use internal monitoring.
  973. **Changing this field may require a restart.**
  974. default: false
  975. receiver:
  976. type: string
  977. description: Indicate the receiver name (for type prometheus) in the configuration for the collector scraper (if not specified the default empty name will be used).
  978. prometheusAutobind:
  979. type: boolean
  980. description: If set to `true`, a PodMonitor is created for each Prometheus instance as specified in the SGConfig.spec.collector.prometheusOperator.monitors section.
  981. default: false
  982. backups:
  983. type: array
  984. description: |
  985. List of backups configurations for this SGCluster
  986. items:
  987. type: object
  988. description: |
  989. Backup configuration for this SGCluster
  990. required: ["sgObjectStorage"]
  991. properties:
  992. compression:
  993. type: string
  994. description: |
  995. Specifies the backup compression algorithm. Possible options are: lz4, lzma, brotli. The default method is `lz4`. LZ4 is the fastest method, but compression ratio is the worst. LZMA is way slower, but it compresses backups about 6 times better than LZ4. Brotli is a good trade-off between speed and compression ratio, being about 3 times better than LZ4.
  996. enum: [ "lz4", "lzma", "brotli" ]
  997. cronSchedule:
  998. type: string
  999. description: |
  1000. Continuous Archiving backups are composed of periodic *base backups* and all the WAL segments produced in between those base backups. This parameter specifies at what time and with what frequency to start performing a new base backup.
  1001. Use cron syntax (`m h dom mon dow`) for this parameter, i.e., 5 values separated by spaces:
  1002. * `m`: minute, 0 to 59.
  1003. * `h`: hour, 0 to 23.
  1004. * `dom`: day of month, 1 to 31 (recommended not to set it higher than 28).
  1005. * `mon`: month, 1 to 12.
  1006. * `dow`: day of week, 0 to 7 (0 and 7 both represent Sunday).
  1007. Also ranges of values (`start-end`), the symbol `*` (meaning `first-last`) or even `*/N`, where `N` is a number, meaning ""every `N`, may be used. All times are UTC. It is recommended to avoid 00:00 as base backup time, to avoid overlapping with any other external operations happening at this time.
  1008. If not set, full backups are never performed automatically.
  1009. performance:
  1010. type: object
  1011. description: |
  1012. Configuration that affects the backup network and disk usage performance.
  1013. properties:
  1014. maxNetworkBandwidth:
  1015. type: integer
  1016. description: |
  1017. Maximum storage upload bandwidth used when storing a backup. In bytes (per second).
  1018. maxDiskBandwidth:
  1019. type: integer
  1020. description: |
  1021. Maximum disk read I/O when performing a backup. In bytes (per second).
  1022. uploadDiskConcurrency:
  1023. type: integer
  1024. minimum: 1
  1025. description: |
  1026. Backup storage may use several concurrent streams to store the data. This parameter configures the number of parallel streams to use to reading from disk. By default, it's set to 1.
  1027. uploadConcurrency:
  1028. type: integer
  1029. minimum: 1
  1030. description: |
  1031. Backup storage may use several concurrent streams to store the data. This parameter configures the number of parallel streams to use. By default, it's set to 16.
  1032. downloadConcurrency:
  1033. type: integer
  1034. minimum: 1
  1035. description: |
  1036. Backup storage may use several concurrent streams to read the data. This parameter configures the number of parallel streams to use. By default, it's set to the minimum between the number of file to read and 10.
  1037. retention:
  1038. type: integer
  1039. minimum: 1
  1040. description: |
  1041. When an automatic retention policy is defined to delete old base backups, this parameter specifies the number of base backups to keep, in a sliding window.
  1042. Consequently, the time range covered by backups is `periodicity*retention`, where `periodicity` is the separation between backups as specified by the `cronSchedule` property.
  1043. Default is 5.
  1044. default: 5
  1045. sgObjectStorage:
  1046. type: string
  1047. description: |
  1048. Name of the [SGObjectStorage](https://stackgres.io/doc/latest/reference/crd/sgobjectstorage) to use for the cluster.
  1049. It defines the location in which the the backups will be stored.
  1050. path:
  1051. type: string
  1052. description: |
  1053. The path were the backup is stored. If not set this field is filled up by the operator.
  1054. When provided will indicate were the backups and WAL files will be stored.
  1055. > **WARNING**: Most users should leave this field empty since having it manually set could be dangerous. If the value is repeated due to re-creating an SGCluster or
  1056. re-using the same value in another SGCluster and you may get a mixed WAL history with unrecoverable backups.
  1057. useVolumeSnapshot:
  1058. type: boolean
  1059. description: |
  1060. If specified SGBackup will use VolumeSnapshot to create backups.
  1061. This functionality still require to store WAL files in an SGObjectStorage but could result in much faster backups and restore of those backups.
  1062. See also https://kubernetes.io/docs/concepts/storage/volume-snapshots/
  1063. volumeSnapshotClass:
  1064. type: string
  1065. description: |
  1066. The name of the VolumeSnaphostClass to use to create the VolumeSnapshot for backups.
  1067. See also https://kubernetes.io/docs/concepts/storage/volume-snapshots/
  1068. fastVolumeSnapshot:
  1069. type: boolean
  1070. description: |
  1071. If specified SGBackup will create a backup forcing a fast start (by setting parameter `fast` to `true` when calling `pg_backup_start`) that will reduce the time the backups may take at the expense of more IO usage.
  1072. See also https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP
  1073. timeout:
  1074. type: integer
  1075. description: |
  1076. Allow to set a timeout for the backup creation.
  1077. If not set it will be disabled and the backup operation will continue until the backup completes or fail. If set to 0 is the same as not being set.
  1078. Make sure to set a reasonable high value in order to allow for any unexpected delays during backup creation (network low bandwidth, disk low throughput and so forth).
  1079. reconciliationTimeout:
  1080. type: integer
  1081. default: 300
  1082. description: |
  1083. Allow to set a timeout for the reconciliation process that take place after the backup.
  1084. If not set defaults to 300 (5 minutes). If set to 0 it will disable timeout.
  1085. Failure of reconciliation will not make the backup fail and will be re-tried the next time a SGBackup
  1086. or shecduled backup Job take place.
  1087. maxRetries:
  1088. type: integer
  1089. description: |
  1090. The maximum number of retries the backup operation is allowed to do after a failure.
  1091. A value of `0` (zero) means no retries are made. Defaults to: `3`.
  1092. retainWalsForUnmanagedLifecycle:
  1093. type: boolean
  1094. description: |
  1095. If specified, WAL created after any unmanaged lifecycle backups will be retained.
  1096. patroni:
  1097. type: object
  1098. description: Allow to specify Patroni configuration that will extend the generated one
  1099. properties:
  1100. dynamicConfig:
  1101. type: object
  1102. description: |
  1103. Allow to specify Patroni dynamic configuration that will overwrite the generated one. See https://patroni.readthedocs.io/en/latest/dynamic_configuration.html
  1104. The following configuration fields will be ignored:
  1105. * synchronous_mode
  1106. * synchronous_mode_strict
  1107. * failsafe_mode
  1108. * postgresql
  1109. * standby_cluster
  1110. "x-kubernetes-preserve-unknown-fields": true
  1111. initialConfig:
  1112. type: object
  1113. description: |
  1114. Allow to specify Patroni configuration that will overwrite the generated one. See https://patroni.readthedocs.io/en/latest/yaml_configuration.html
  1115. The following configuration fields will be ignored:
  1116. * name
  1117. * namespace
  1118. * log
  1119. * bootstrap
  1120. * citus
  1121. * postgresql # with the exception of postgresql.callbacks, postgresql.pre_promote, postgresql.before_stop and postgresql.pg_ctl_timeout
  1122. * restapi
  1123. * ctl
  1124. * watchdog
  1125. * tags
  1126. **This field can only be set on creation.**
  1127. "x-kubernetes-preserve-unknown-fields": true
  1128. credentials:
  1129. type: object
  1130. description: |
  1131. Allow to specify custom credentials for Postgres users and Patroni REST API
  1132. properties:
  1133. patroni:
  1134. type: object
  1135. description: |
  1136. Kubernetes [SecretKeySelectors](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials for patroni REST API.
  1137. **Changing this field may require a restart.**
  1138. properties:
  1139. restApiPassword:
  1140. type: object
  1141. description: |
  1142. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password for the patroni REST API.
  1143. required: ["name", "key"]
  1144. properties:
  1145. name:
  1146. type: string
  1147. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1148. key:
  1149. type: string
  1150. description: The key of the secret to select from. Must be a valid secret key.
  1151. users:
  1152. type: object
  1153. description: |
  1154. Kubernetes [SecretKeySelectors](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the users.
  1155. **Changing this field may require a manual modification of the database users to reflect the new values specified.**
  1156. In particular you may have to create those users if username is changed or alter password if it is changed. Here are the SQL commands to perform such operation (replace
  1157. default usernames with the new ones and `***` with their respective passwords):
  1158. * Superuser username changed:
  1159. ```
  1160. CREATE ROLE postgres;
  1161. ```
  1162. * Superuser password changed:
  1163. ```
  1164. ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD '***';
  1165. ```
  1166. * Replication username changed:
  1167. ```
  1168. CREATE ROLE replicator;
  1169. ```
  1170. * Replication password changed:
  1171. ```
  1172. ALTER ROLE replicator WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN REPLICATION NOBYPASSRLS PASSWORD '***';
  1173. ```
  1174. * Authenticator username changed:
  1175. ```
  1176. CREATE ROLE authenticator;
  1177. ```
  1178. * Authenticator password changed:
  1179. ```
  1180. ALTER ROLE authenticator WITH SUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD '***';
  1181. ```
  1182. **Changing this field may require a restart.**
  1183. properties:
  1184. superuser:
  1185. type: object
  1186. description: |
  1187. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the superuser (usually the postgres user).
  1188. properties:
  1189. username:
  1190. type: object
  1191. description: |
  1192. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
  1193. required: ["name", "key"]
  1194. properties:
  1195. name:
  1196. type: string
  1197. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1198. key:
  1199. type: string
  1200. description: The key of the secret to select from. Must be a valid secret key.
  1201. password:
  1202. type: object
  1203. description: |
  1204. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
  1205. required: ["name", "key"]
  1206. properties:
  1207. name:
  1208. type: string
  1209. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1210. key:
  1211. type: string
  1212. description: The key of the secret to select from. Must be a valid secret key.
  1213. replication:
  1214. type: object
  1215. description: |
  1216. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the replication user used to replicate from the primary cluster and from replicas of this cluster.
  1217. properties:
  1218. username:
  1219. type: object
  1220. description: |
  1221. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
  1222. required: ["name", "key"]
  1223. properties:
  1224. name:
  1225. type: string
  1226. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1227. key:
  1228. type: string
  1229. description: The key of the secret to select from. Must be a valid secret key.
  1230. password:
  1231. type: object
  1232. description: |
  1233. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
  1234. required: ["name", "key"]
  1235. properties:
  1236. name:
  1237. type: string
  1238. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1239. key:
  1240. type: string
  1241. description: The key of the secret to select from. Must be a valid secret key.
  1242. authenticator:
  1243. type: object
  1244. description: |
  1245. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the authenticator user used by pgbouncer to authenticate other users.
  1246. properties:
  1247. username:
  1248. type: object
  1249. description: |
  1250. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
  1251. required: ["name", "key"]
  1252. properties:
  1253. name:
  1254. type: string
  1255. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1256. key:
  1257. type: string
  1258. description: The key of the secret to select from. Must be a valid secret key.
  1259. password:
  1260. type: object
  1261. description: |
  1262. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
  1263. required: ["name", "key"]
  1264. properties:
  1265. name:
  1266. type: string
  1267. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1268. key:
  1269. type: string
  1270. description: The key of the secret to select from. Must be a valid secret key.
  1271. binding:
  1272. type: object
  1273. description: |
  1274. This section allows to specify the properties of [Service Binding spec for provisioned service](https://servicebinding.io/spec/core/1.0.0/#provisioned-service).
  1275. If not specified, then some default will be used.
  1276. For more information see https://servicebinding.io/spec/core/1.0.0/
  1277. properties:
  1278. provider:
  1279. type: string
  1280. description: It's the reference of custom provider name. If not specified, then the default value will be `stackgres`
  1281. database:
  1282. type: string
  1283. description: Allow to specify the database name. If not specified, then the default value is `postgres`
  1284. username:
  1285. type: string
  1286. description: Allow to specify the username. If not specified, then the superuser username will be used.
  1287. password:
  1288. type: object
  1289. description: Allow to reference Secret that contains the user's password. If not specified, then the superuser password will be used.
  1290. properties:
  1291. name:
  1292. type: string
  1293. description: The name of the Secret
  1294. key:
  1295. type: string
  1296. description: The key of the Secret
  1297. managedSql:
  1298. type: object
  1299. description: |
  1300. This section allows to reference SQL scripts that will be applied to the cluster live.
  1301. properties:
  1302. continueOnSGScriptError:
  1303. type: boolean
  1304. description: If true, when any entry of any `SGScript` fail will not prevent subsequent `SGScript` from being executed. By default is `false`.
  1305. default: false
  1306. scripts:
  1307. type: array
  1308. description: |
  1309. A list of script references that will be executed in sequence.
  1310. items:
  1311. type: object
  1312. description: |
  1313. A script reference. Each version of each entry of the script referenced will be executed exactly once following the sequence defined
  1314. in the referenced script and skipping any script entry that have already been executed.
  1315. properties:
  1316. id:
  1317. type: integer
  1318. description: |
  1319. The id is immutable and must be unique across all the `SGScript` entries. It is replaced by the operator and is used to identify the `SGScript` entry.
  1320. sgScript:
  1321. type: string
  1322. description: A reference to an `SGScript`
  1323. initialData:
  1324. type: object
  1325. description: |
  1326. Cluster initialization data options. Cluster may be initialized empty, or from a backup restoration.
  1327. **This field can only be set on creation.**
  1328. properties:
  1329. restore:
  1330. type: object
  1331. description: |
  1332. This section allows to restore a cluster from an existing copy of the metadata and data.
  1333. properties:
  1334. fromBackup:
  1335. type: object
  1336. description: |
  1337. From which backup to restore and how the process is configured
  1338. **Example:**
  1339. ```yaml
  1340. apiVersion: stackgres.io/v1
  1341. kind: SGCluster
  1342. metadata:
  1343. name: stackgres
  1344. spec:
  1345. initialData:
  1346. restore:
  1347. fromBackup:
  1348. name: stackgres-backup
  1349. downloadDiskConcurrency: 1
  1350. ```
  1351. properties:
  1352. uid:
  1353. type: string
  1354. description: |
  1355. When set to the UID of an existing [SGBackup](https://stackgres.io/doc/latest/reference/crd/sgbackup), the cluster is initialized by restoring the
  1356. backup data to it. If not set, the cluster is initialized empty. This field is deprecated.
  1357. name:
  1358. type: string
  1359. description: |
  1360. When set to the name of an existing [SGBackup](https://stackgres.io/doc/latest/reference/crd/sgbackup), the cluster is initialized by restoring the
  1361. backup data to it. If not set, the cluster is initialized empty. The selected backup must be in the same namespace.
  1362. target:
  1363. type: string
  1364. description: |
  1365. Specify the [recovery_target](https://postgresqlco.nf/doc/en/param/recovery_target/) that specifies that recovery should end as soon as a consistent
  1366. state is reached, i.e., as early as possible. When restoring from an online backup, this means the point where taking the backup ended.
  1367. Technically, this is a string parameter, but 'immediate' is currently the only allowed value.
  1368. targetTimeline:
  1369. type: string
  1370. description: |
  1371. Specify the [recovery_target_timeline](https://postgresqlco.nf/doc/en/param/recovery_target_timeline/) to recover into a particular timeline.
  1372. The default is to recover along the same timeline that was current when the base backup was taken. Setting this to latest recovers to the latest
  1373. timeline found in the archive, which is useful in a standby server. Other than that you only need to set this parameter in complex re-recovery
  1374. situations, where you need to return to a state that itself was reached after a point-in-time recovery.
  1375. targetInclusive:
  1376. type: boolean
  1377. description: |
  1378. Specify the [recovery_target_inclusive](https://postgresqlco.nf/doc/en/param/recovery_target_timeline/) to stop recovery just after the specified
  1379. recovery target (true), or just before the recovery target (false). Applies when targetLsn, pointInTimeRecovery, or targetXid is specified. This
  1380. setting controls whether transactions having exactly the target WAL location (LSN), commit time, or transaction ID, respectively, will be included
  1381. in the recovery. Default is true.
  1382. targetName:
  1383. type: string
  1384. description: |
  1385. [recovery_target_name](https://postgresqlco.nf/doc/en/param/recovery_target_name/) specifies the named restore point
  1386. (created with pg_create_restore_point()) to which recovery will proceed.
  1387. targetXid:
  1388. type: string
  1389. description: |
  1390. [recovery_target_xid](https://postgresqlco.nf/doc/en/param/recovery_target_xid/) specifies the transaction ID up to which recovery will proceed.
  1391. Keep in mind that while transaction IDs are assigned sequentially at transaction start, transactions can complete in a different numeric order.
  1392. The transactions that will be recovered are those that committed before (and optionally including) the specified one. The precise stopping point
  1393. is also influenced by targetInclusive.
  1394. targetLsn:
  1395. type: string
  1396. description: |
  1397. [recovery_target_lsn](https://postgresqlco.nf/doc/en/param/recovery_target_lsn/) specifies the LSN of the write-ahead log location up to which
  1398. recovery will proceed. The precise stopping point is also influenced by targetInclusive. This parameter is parsed using the system data type
  1399. pg_lsn.
  1400. pointInTimeRecovery:
  1401. type: object
  1402. description: |
  1403. Using Point-in-Time Recovery (PITR) it is possible to restore the database to its state at any moment in the past by setting `restoreToTimestamp`
  1404. to a value between the timestamps at which your chosen SGBackup and the subsequent one were taken. If the chosen SGBackup is the latest one, the
  1405. `restoreToTimestamp` value can be between the timestamps at which that last SGBackup was taken and the current one.
  1406. See also: https://www.postgresql.org/docs/current/continuous-archiving.html
  1407. properties:
  1408. restoreToTimestamp:
  1409. type: string
  1410. description: |
  1411. An ISO 8601 date, that holds UTC date indicating at which point-in-time the database have to be restored.
  1412. downloadDiskConcurrency:
  1413. type: integer
  1414. minimum: 1
  1415. description: |
  1416. The backup fetch process may fetch several streams in parallel. Parallel fetching is enabled when set to a value larger than one.
  1417. If not specified it will be interpreted as latest.
  1418. scripts:
  1419. type: array
  1420. description: |
  1421. **Deprecated** use instead .spec.managedSql with SGScript.
  1422. A list of SQL scripts executed in sequence, exactly once, when the database is bootstrap and/or after restore is completed.
  1423. items:
  1424. type: object
  1425. description: |
  1426. **Deprecated** use instead .spec.managedSql with SGScript.
  1427. Scripts are executed in auto-commit mode with the user `postgres` in the specified database (or in database `postgres` if not specified).
  1428. Fields `script` and `scriptFrom` are mutually exclusive and only one of them is required.
  1429. properties:
  1430. name:
  1431. type: string
  1432. description: |
  1433. Name of the script. Must be unique across this SGCluster.
  1434. database:
  1435. type: string
  1436. description: |
  1437. Database where the script is executed. Defaults to the `postgres` database, if not specified.
  1438. script:
  1439. type: string
  1440. description: |
  1441. Raw SQL script to execute. This field is mutually exclusive with `scriptFrom` field.
  1442. scriptFrom:
  1443. type: object
  1444. description: |
  1445. Reference to either a Kubernetes [Secret](https://kubernetes.io/docs/concepts/configuration/secret/) or a [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) that contains the SQL script to execute. This field is mutually exclusive with `script` field.
  1446. Fields `secretKeyRef` and `configMapKeyRef` are mutually exclusive, and one of them is required.
  1447. properties:
  1448. secretKeyRef:
  1449. type: object
  1450. description: |
  1451. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the SQL script to execute. This field is mutually exclusive with `configMapKeyRef` field.
  1452. properties:
  1453. name:
  1454. type: string
  1455. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1456. key:
  1457. type: string
  1458. description: The key of the secret to select from. Must be a valid secret key.
  1459. configMapKeyRef:
  1460. type: object
  1461. description: |
  1462. A [ConfigMap](https://kubernetes.io/docs/concepts/configuration/configmap/) reference that contains the SQL script to execute. This field is mutually exclusive with `secretKeyRef` field.
  1463. properties:
  1464. name:
  1465. type: string
  1466. description: |
  1467. The name of the ConfigMap that contains the SQL script to execute.
  1468. key:
  1469. type: string
  1470. description: |
  1471. The key name within the ConfigMap that contains the SQL script to execute.
  1472. replicateFrom:
  1473. type: object
  1474. description: |
  1475. Make the cluster a read-only standby replica allowing to replicate from another PostgreSQL instance and acting as a rely.
  1476. Changing this section is allowed to fix issues or to change the replication source.
  1477. Removing this section convert the cluster in a normal cluster where the standby leader is converted into the a primary instance.
  1478. **Example:**
  1479. From SGCluster instance:
  1480. ```yaml
  1481. apiVersion: stackgres.io/v1
  1482. kind: SGCluster
  1483. metadata:
  1484. name: stackgres
  1485. spec:
  1486. replicateFrom:
  1487. instance:
  1488. sgCluster: my-cluster
  1489. ```
  1490. > **Note:** The above example allow to replicate from another SGCluster instance that in the same namespace and the same K8s cluster.
  1491. >
  1492. > This option cannot be combined with external instance, storage and users.
  1493. From external instance:
  1494. ```yaml
  1495. apiVersion: stackgres.io/v1
  1496. kind: SGCluster
  1497. metadata:
  1498. name: stackgres
  1499. spec:
  1500. replicateFrom:
  1501. instance:
  1502. external:
  1503. host: ${HOST_IP}
  1504. port: 5433
  1505. users:
  1506. superuser:
  1507. username:
  1508. name: pg-origin-secret
  1509. key: superuser-username
  1510. password:
  1511. name: pg-origin-secret
  1512. key: superuser-password
  1513. replication:
  1514. username:
  1515. name: pg-origin-secret
  1516. key: replication-username
  1517. password:
  1518. name: pg-origin-secret
  1519. key: replication-password
  1520. authenticator:
  1521. username:
  1522. name: pg-origin-secret
  1523. key: authenticator-username
  1524. password:
  1525. name: pg-origin-secret
  1526. key: authenticator-password
  1527. ```
  1528. > **Note:** Replace the ${HOST_IP} with the actual IP of the external instance.
  1529. From Storage:
  1530. ```yaml
  1531. apiVersion: stackgres.io/v1
  1532. kind: SGCluster
  1533. metadata:
  1534. name: stackgres
  1535. spec:
  1536. initialData:
  1537. restore:
  1538. fromBackup:
  1539. name: backup-name
  1540. replicateFrom:
  1541. storage:
  1542. path: ${PG_ORIGIN_BACKUP_PATH}
  1543. sgObjectStorage: stackgres-backups
  1544. users:
  1545. superuser:
  1546. username:
  1547. name: pg-origin-secret
  1548. key: superuser-username
  1549. password:
  1550. name: pg-origin-secret
  1551. key: superuser-password
  1552. replication:
  1553. username:
  1554. name: pg-origin-secret
  1555. key: replication-username
  1556. password:
  1557. name: pg-origin-secret
  1558. key: replication-password
  1559. authenticator:
  1560. username:
  1561. name: pg-origin-secret
  1562. key: authenticator-username
  1563. password:
  1564. name: pg-origin-secret
  1565. key: authenticator-password
  1566. ```
  1567. > **Note:** Using storage only to replicate from requires to recover from a backup in order to bootstrap the database.
  1568. >
  1569. > Replace the ${PG_ORIGIN_BACKUP_PATH} with the actual path in the object storage where the backups are stored.
  1570. From external instance and storage:
  1571. ```yaml
  1572. apiVersion: stackgres.io/v1
  1573. kind: SGCluster
  1574. metadata:
  1575. name: stackgres
  1576. spec:
  1577. replicateFrom:
  1578. instance:
  1579. external:
  1580. host: ${HOST_IP}
  1581. port: 5433
  1582. storage:
  1583. path: ${PG_ORIGIN_BACKUP_PATH}
  1584. sgObjectStorage: stackgres-backups
  1585. users:
  1586. superuser:
  1587. username:
  1588. name: pg-origin-secret
  1589. key: superuser-username
  1590. password:
  1591. name: pg-origin-secret
  1592. key: superuser-password
  1593. replication:
  1594. username:
  1595. name: pg-origin-secret
  1596. key: replication-username
  1597. password:
  1598. name: pg-origin-secret
  1599. key: replication-password
  1600. authenticator:
  1601. username:
  1602. name: pg-origin-secret
  1603. key: authenticator-username
  1604. password:
  1605. name: pg-origin-secret
  1606. key: authenticator-password
  1607. ```
  1608. > **Note**: Replace the ${HOST_IP} with the actual IP of the external instance.
  1609. >
  1610. > Replace the ${PG_ORIGIN_BACKUP_PATH} with the actual path in the object storage where the backups are stored.
  1611. properties:
  1612. instance:
  1613. type: object
  1614. description: |
  1615. Configure replication from a PostgreSQL instance.
  1616. properties:
  1617. sgCluster:
  1618. type: string
  1619. description: |
  1620. Configure replication from an SGCluster.
  1621. external:
  1622. type: object
  1623. description: |
  1624. Configure replication from an external PostgreSQL instance.
  1625. required: ["host", "port"]
  1626. properties:
  1627. host:
  1628. type: string
  1629. description: The host of the PostgreSQL to replicate from.
  1630. port:
  1631. type: integer
  1632. description: The port of the PostgreSQL to replicate from.
  1633. storage:
  1634. type: object
  1635. description: |
  1636. Configure replication from an SGObjectStorage using WAL shipping.
  1637. The file structure of the object storage must follow the
  1638. [WAL-G](https://github.com/wal-g/wal-g) file structure.
  1639. required: ["sgObjectStorage", "path"]
  1640. properties:
  1641. performance:
  1642. type: object
  1643. description: |
  1644. Configuration that affects the backup network and disk usage performance during recovery.
  1645. properties:
  1646. maxNetworkBandwidth:
  1647. type: integer
  1648. description: |
  1649. Maximum storage upload bandwidth used when storing a backup. In bytes (per second).
  1650. maxDiskBandwidth:
  1651. type: integer
  1652. description: |
  1653. Maximum disk read I/O when performing a backup. In bytes (per second).
  1654. downloadConcurrency:
  1655. type: integer
  1656. minimum: 1
  1657. description: |
  1658. Backup storage may use several concurrent streams to read the data. This parameter configures the number of parallel streams to use. By default, it's set to the minimum between the number of file to read and 10.
  1659. sgObjectStorage:
  1660. type: string
  1661. description: The SGObjectStorage name to replicate from.
  1662. path:
  1663. type: string
  1664. description: The path in the SGObjectStorage to replicate from.
  1665. users:
  1666. type: object
  1667. description: |
  1668. Kubernetes [SecretKeySelectors](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the users.
  1669. required: ["superuser", "replication", "authenticator"]
  1670. properties:
  1671. superuser:
  1672. type: object
  1673. description: |
  1674. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the superuser (usually the postgres user).
  1675. required: ["username", "password"]
  1676. properties:
  1677. username:
  1678. type: object
  1679. description: |
  1680. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
  1681. required: ["name", "key"]
  1682. properties:
  1683. name:
  1684. type: string
  1685. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1686. key:
  1687. type: string
  1688. description: The key of the secret to select from. Must be a valid secret key.
  1689. password:
  1690. type: object
  1691. description: |
  1692. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
  1693. required: ["name", "key"]
  1694. properties:
  1695. name:
  1696. type: string
  1697. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1698. key:
  1699. type: string
  1700. description: The key of the secret to select from. Must be a valid secret key.
  1701. replication:
  1702. type: object
  1703. description: |
  1704. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the replication user used to replicate from the primary cluster and from replicas of this cluster.
  1705. required: ["username", "password"]
  1706. properties:
  1707. username:
  1708. type: object
  1709. description: |
  1710. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
  1711. required: ["name", "key"]
  1712. properties:
  1713. name:
  1714. type: string
  1715. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1716. key:
  1717. type: string
  1718. description: The key of the secret to select from. Must be a valid secret key.
  1719. password:
  1720. type: object
  1721. description: |
  1722. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
  1723. required: ["name", "key"]
  1724. properties:
  1725. name:
  1726. type: string
  1727. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1728. key:
  1729. type: string
  1730. description: The key of the secret to select from. Must be a valid secret key.
  1731. authenticator:
  1732. type: object
  1733. description: |
  1734. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the authenticator user used by pgbouncer to authenticate other users.
  1735. required: ["username", "password"]
  1736. properties:
  1737. username:
  1738. type: object
  1739. description: |
  1740. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
  1741. required: ["name", "key"]
  1742. properties:
  1743. name:
  1744. type: string
  1745. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1746. key:
  1747. type: string
  1748. description: The key of the secret to select from. Must be a valid secret key.
  1749. password:
  1750. type: object
  1751. description: |
  1752. A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
  1753. required: ["name", "key"]
  1754. properties:
  1755. name:
  1756. type: string
  1757. description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
  1758. key:
  1759. type: string
  1760. description: The key of the secret to select from. Must be a valid secret key.
  1761. prometheusAutobind:
  1762. type: boolean
  1763. description: |
  1764. **Deprecated** use instead .spec.configurations.observability.prometheusAutobind.
  1765. nonProductionOptions:
  1766. type: object
  1767. properties:
  1768. disableClusterPodAntiAffinity:
  1769. type: boolean
  1770. description: |
  1771. It is a best practice, on non-containerized environments, when running production workloads, to run each database server on a different server (virtual or physical), i.e., not to co-locate more than one database server per host.
  1772. The same best practice applies to databases on containers. By default, StackGres will not allow to run more than one StackGres pod on a given Kubernetes node. Set this property to true to allow more than one StackGres pod per node.
  1773. This property default value may be changed depending on the value of field `.spec.profile`.
  1774. **Changing this field may require a restart.**
  1775. disablePatroniResourceRequirements:
  1776. type: boolean
  1777. description: |
  1778. It is a best practice, on containerized environments, when running production workloads, to enforce container's resources requirements.
  1779. The same best practice applies to databases on containers. By default, StackGres will configure resource requirements for patroni container. Set this property to true to prevent StackGres from setting patroni container's resources requirement.
  1780. This property default value may be changed depending on the value of field `.spec.profile`.
  1781. **Changing this field may require a restart.**
  1782. disableClusterResourceRequirements:
  1783. type: boolean
  1784. description: |
  1785. It is a best practice, on containerized environments, when running production workloads, to enforce container's resources requirements.
  1786. By default, StackGres will configure resource requirements for all the containers. Set this property to true to prevent StackGres from setting container's resources requirements (except for patroni container, see `disablePatroniResourceRequirements`).
  1787. This property default value may be changed depending on the value of field `.spec.profile`.
  1788. **Changing this field may require a restart.**
  1789. enableSetPatroniCpuRequests:
  1790. type: boolean
  1791. description: |
  1792. **Deprecated** this value is ignored and you can consider it as always `true`.
  1793. On containerized environments, when running production workloads, enforcing container's cpu requirements request to be equals to the limit allow to achieve the highest level of performance. Doing so, reduces the chances of leaving
  1794. the workload with less cpu than it requires. It also allow to set [static CPU management policy](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy) that allows to guarantee a pod the usage exclusive CPUs on the node.
  1795. By default, StackGres will configure cpu requirements to have the same limit and request for the patroni container. Set this property to true to prevent StackGres from setting patroni container's cpu requirements request equals to the limit
  1796. when `.spec.requests.cpu` is configured in the referenced `SGInstanceProfile`.
  1797. **Changing this field may require a restart.**
  1798. default: false
  1799. enableSetClusterCpuRequests:
  1800. type: boolean
  1801. description: |
  1802. **Deprecated** this value is ignored and you can consider it as always `true`.
  1803. On containerized environments, when running production workloads, enforcing container's cpu requirements request to be equals to the limit allow to achieve the highest level of performance. Doing so, reduces the chances of leaving
  1804. the workload with less cpu than it requires. It also allow to set [static CPU management policy](https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#static-policy) that allows to guarantee a pod the usage exclusive CPUs on the node.
  1805. By default, StackGres will configure cpu requirements to have the same limit and request for all the containers. Set this property to true to prevent StackGres from setting container's cpu requirements request equals to the limit (except for patroni container, see `enablePatroniCpuRequests`)
  1806. when `.spec.requests.containers.<container name>.cpu` `.spec.requests.initContainers.<container name>.cpu` is configured in the referenced `SGInstanceProfile`.
  1807. **Changing this field may require a restart.**
  1808. default: false
  1809. enableSetPatroniMemoryRequests:
  1810. type: boolean
  1811. description: |
  1812. **Deprecated** this value is ignored and you can consider it as always `true`.
  1813. On containerized environments, when running production workloads, enforcing container's memory requirements request to be equals to the limit allow to achieve the highest level of performance. Doing so, reduces the chances of leaving
  1814. the workload with less memory than it requires.
  1815. By default, StackGres will configure memory requirements to have the same limit and request for the patroni container. Set this property to true to prevent StackGres from setting patroni container's memory requirements request equals to the limit
  1816. when `.spec.requests.memory` is configured in the referenced `SGInstanceProfile`.
  1817. **Changing this field may require a restart.**
  1818. default: false
  1819. enableSetClusterMemoryRequests:
  1820. type: boolean
  1821. description: |
  1822. **Deprecated** this value is ignored and you can consider it as always `true`.
  1823. On containerized environments, when running production workloads, enforcing container's memory requirements request to be equals to the limit allow to achieve the highest level of performance. Doing so, reduces the chances of leaving
  1824. the workload with less memory than it requires.
  1825. By default, StackGres will configure memory requirements to have the same limit and request for all the containers. Set this property to true to prevent StackGres from setting container's memory requirements request equals to the limit (except for patroni container, see `enablePatroniCpuRequests`)
  1826. when `.spec.requests.containers.<container name>.memory` `.spec.requests.initContainers.<container name>.memory` is configured in the referenced `SGInstanceProfile`.
  1827. **Changing this field may require a restart.**
  1828. default: false
  1829. enabledFeatureGates:
  1830. type: array
  1831. description: |
  1832. A list of StackGres feature gates to enable (not suitable for a production environment).
  1833. Available feature gates are:
  1834. * `babelfish-flavor`: Allow to use `babelfish` flavor.
  1835. items:
  1836. type: string
  1837. description: The name of the fature gate to enable.
  1838. distributedLogs:
  1839. type: object
  1840. description: |
  1841. StackGres features a functionality for all pods to send Postgres, Patroni and PgBouncer logs to a central (distributed) location, which is in turn another Postgres database. Logs can then be accessed via SQL interface or from the web UI. This section controls whether to enable this feature or not. If not enabled, logs are send to the pod's standard output.
  1842. **Example:**
  1843. ```yaml
  1844. apiVersion: stackgres.io/v1
  1845. kind: SGCluster
  1846. metadata:
  1847. name: stackgres
  1848. spec:
  1849. distributedLogs:
  1850. sgDistributedLogs: distributedlogs
  1851. ```
  1852. properties:
  1853. sgDistributedLogs:
  1854. type: string
  1855. description: |
  1856. Name of the [SGDistributedLogs](https://stackgres.io/doc/latest/reference/crd/sgdistributedlogs/) to use for this cluster. It must exist.
  1857. retention:
  1858. type: string
  1859. pattern: '^[0-9]+ (minutes?|hours?|days?|months?)'
  1860. description: |
  1861. Define a retention window with the syntax `<integer> (minutes|hours|days|months)` in which log entries are kept.
  1862. Log entries will be removed when they get older more than the double of the specified retention window.
  1863. When this field is changed the retention will be applied only to log entries that are newer than the end of
  1864. the retention window previously specified. If no retention window was previously specified it is considered
  1865. to be of 7 days. This means that if previous retention window is of `7 days` new retention configuration will
  1866. apply after UTC timestamp calculated with: `SELECT date_trunc('days', now() at time zone 'UTC') - INTERVAL '7 days'`.
  1867. toInstallPostgresExtensions:
  1868. type: array
  1869. description: |
  1870. The list of Postgres extensions to install.
  1871. **This section is filled by the operator.**
  1872. items:
  1873. type: object
  1874. required: ["name", "publisher", "version", "repository", "postgresVersion"]
  1875. properties:
  1876. name:
  1877. type: string
  1878. description: The name of the extension to install.
  1879. publisher:
  1880. type: string
  1881. description: The id of the publisher of the extension to install.
  1882. version:
  1883. type: string
  1884. description: The version of the extension to install.
  1885. repository:
  1886. type: string
  1887. description: The repository base URL from where the extension will be installed from.
  1888. postgresVersion:
  1889. type: string
  1890. description: The postgres major version of the extension to install.
  1891. build:
  1892. type: string
  1893. description: The build version of the extension to install.
  1894. extraMounts:
  1895. type: array
  1896. description: The extra mounts of the extension to install.
  1897. items:
  1898. type: string
  1899. description: The extra mount of the installed extension.
  1900. status:
  1901. type: object
  1902. description: Current status of a StackGres cluster.
  1903. properties:
  1904. instances:
  1905. type: integer
  1906. description: Actual number of instances for the StackGres cluster. Each instance is a Pod containing one Postgres server.
  1907. labelSelector:
  1908. type: string
  1909. description: Actual label selector for instances for the StackGres cluster's Pods to be used by autoscaling.
  1910. replicationInitializationFailedSGBackup:
  1911. type: string
  1912. description: Indicates the latest failed backup for the replication initialization.
  1913. conditions:
  1914. type: array
  1915. items:
  1916. type: object
  1917. properties:
  1918. lastTransitionTime:
  1919. description: Last time the condition transitioned from one status to another.
  1920. type: string
  1921. message:
  1922. description: A human readable message indicating details about the transition.
  1923. type: string
  1924. reason:
  1925. description: The reason for the condition's last transition.
  1926. type: string
  1927. status:
  1928. description: Status of the condition, one of True, False, Unknown.
  1929. type: string
  1930. type:
  1931. description: Type of deployment condition.
  1932. type: string
  1933. podStatuses:
  1934. type: array
  1935. description: The list of pod statuses.
  1936. items:
  1937. type: object
  1938. required: ["name"]
  1939. properties:
  1940. name:
  1941. type: string
  1942. description: The name of the pod.
  1943. replicationGroup:
  1944. type: integer
  1945. description: Indicates the replication group this Pod belongs to.
  1946. primary:
  1947. type: boolean
  1948. description: Indicates if the pod is the elected primary
  1949. pendingRestart:
  1950. type: boolean
  1951. description: Indicates if the pod requires restart
  1952. installedPostgresExtensions:
  1953. type: array
  1954. description: The list of Postgres extensions currently installed.
  1955. items:
  1956. type: object
  1957. required: ["name", "publisher", "version", "repository", "postgresVersion"]
  1958. properties:
  1959. name:
  1960. type: string
  1961. description: The name of the installed extension.
  1962. publisher:
  1963. type: string
  1964. description: The id of the publisher of the installed extension.
  1965. version:
  1966. type: string
  1967. description: The version of the installed extension.
  1968. repository:
  1969. type: string
  1970. description: The repository base URL from where the extension was installed from.
  1971. postgresVersion:
  1972. type: string
  1973. description: The postgres major version of the installed extension.
  1974. build:
  1975. type: string
  1976. description: The build version of the installed extension.
  1977. extraMounts:
  1978. type: array
  1979. description: The extra mounts of the installed extension.
  1980. items:
  1981. type: string
  1982. description: The extra mount of the installed extension.
  1983. dbOps:
  1984. type: object
  1985. description: |
  1986. Used by some [SGDbOps](https://stackgres.io/doc/latest/reference/crd/sgdbops) to indicate the operation configuration and status to the operator.
  1987. properties:
  1988. majorVersionUpgrade:
  1989. type: object
  1990. description: |
  1991. The major version upgrade configuration and status
  1992. properties:
  1993. initialInstances:
  1994. type: array
  1995. description: |
  1996. The instances that this operation is targetting
  1997. items:
  1998. type: string
  1999. primaryInstance:
  2000. type: string
  2001. description: |
  2002. The primary instance that this operation is targetting
  2003. sourcePostgresVersion:
  2004. type: string
  2005. description: |
  2006. The source PostgreSQL version
  2007. sourcePostgresExtensions:
  2008. type: array
  2009. description: |
  2010. The source PostgreSQL extensions
  2011. items:
  2012. type: object
  2013. properties:
  2014. name:
  2015. type: string
  2016. description: The name of the extension to deploy.
  2017. publisher:
  2018. type: string
  2019. description: The id of the publisher of the extension to deploy. If not specified `com.ongres` will be used by default.
  2020. default: com.ongres
  2021. version:
  2022. type: string
  2023. description: The version of the extension to deploy. If not specified version of `stable` channel will be used by default and if only a version is available that one will be used.
  2024. repository:
  2025. type: string
  2026. description: |
  2027. The repository base URL from where to obtain the extension to deploy.
  2028. sourceSgPostgresConfig:
  2029. type: string
  2030. description: |
  2031. The source SGPostgresConfig reference
  2032. sourceBackupPath:
  2033. type: string
  2034. description: |
  2035. The source backup path
  2036. targetPostgresVersion:
  2037. type: string
  2038. description: |
  2039. The target PostgreSQL version
  2040. locale:
  2041. type: string
  2042. description: |
  2043. The PostgreSQL locale
  2044. encoding:
  2045. type: string
  2046. description: |
  2047. The PostgreSQL encoding
  2048. dataChecksum:
  2049. type: boolean
  2050. description: |
  2051. Indicates if PostgreSQL data checksum is enabled
  2052. link:
  2053. type: boolean
  2054. description: |
  2055. Use `--link` option when running `pg_upgrade`
  2056. clone:
  2057. type: boolean
  2058. description: |
  2059. Use `--clone` option when running `pg_upgrade`
  2060. check:
  2061. type: boolean
  2062. description: |
  2063. Run `pg_upgrade` with check option instead of performing the real upgrade
  2064. rollback:
  2065. type: boolean
  2066. description: |
  2067. Indicates to rollback from a previous major version upgrade
  2068. restart:
  2069. type: object
  2070. description: |
  2071. The minor version upgrade configuration and status
  2072. properties:
  2073. initialInstances:
  2074. type: array
  2075. description: |
  2076. The instances that this operation is targetting
  2077. items:
  2078. type: string
  2079. primaryInstance:
  2080. type: string
  2081. description: |
  2082. The primary instance that this operation is targetting
  2083. minorVersionUpgrade:
  2084. type: object
  2085. description: |
  2086. The minor version upgrade configuration and status
  2087. properties:
  2088. initialInstances:
  2089. type: array
  2090. description: |
  2091. The instances that this operation is targetting
  2092. items:
  2093. type: string
  2094. primaryInstance:
  2095. type: string
  2096. description: |
  2097. The primary instance that this operation is targetting
  2098. sourcePostgresVersion:
  2099. type: string
  2100. description: |
  2101. Postgres version that is currently running on the cluster
  2102. targetPostgresVersion:
  2103. type: string
  2104. description: |
  2105. The desired Postgres version for the cluster
  2106. securityUpgrade:
  2107. type: object
  2108. description: |
  2109. The minor version upgrade configuration and status
  2110. properties:
  2111. initialInstances:
  2112. type: array
  2113. description: |
  2114. The instances that this operation is targetting
  2115. items:
  2116. type: string
  2117. primaryInstance:
  2118. type: string
  2119. description: |
  2120. The primary instance that this operation is targetting
  2121. arch:
  2122. type: string
  2123. description: The architecture on which the cluster has been initialized.
  2124. os:
  2125. type: string
  2126. description: The operative system on which the cluster has been initialized.
  2127. labelPrefix:
  2128. type: string
  2129. description: The custom prefix that is prepended to all labels.
  2130. managedSql:
  2131. type: object
  2132. description: |
  2133. This section stores the state of referenced SQL scripts that are applied to the cluster live.
  2134. properties:
  2135. scripts:
  2136. type: array
  2137. description: A list of statuses for script references.
  2138. items:
  2139. type: object
  2140. description: The status of a script reference.
  2141. properties:
  2142. id:
  2143. type: integer
  2144. description: Identify the associated `SGScript` entry with the same value in the `id` field.
  2145. startedAt:
  2146. type: string
  2147. description: ISO-8601 datetime of when the script execution has been started.
  2148. updatedAt:
  2149. type: string
  2150. description: ISO-8601 datetime of when the last script execution occurred. Will be reset each time the referenced `SGScripts` entry will be applied.
  2151. failedAt:
  2152. type: string
  2153. description: ISO-8601 datetime of when the script execution had failed (mutually exclusive with `completedAt`).
  2154. completedAt:
  2155. type: string
  2156. description: ISO-8601 datetime of when the script execution had completed (mutually exclusive with `failedAt`).
  2157. scripts:
  2158. type: array
  2159. description: A list of statuses for script entries of referenced script.
  2160. items:
  2161. type: object
  2162. description: The status of a script entry of a referenced script.
  2163. properties:
  2164. id:
  2165. type: integer
  2166. description: Identify the associated script entry with the same value in the `id` field.
  2167. version:
  2168. type: integer
  2169. description: The latest version applied
  2170. intents:
  2171. type: integer
  2172. description: Indicates the number of intents or failures occurred
  2173. failureCode:
  2174. type: string
  2175. description: If failed, the error code of the failure. See also https://www.postgresql.org/docs/current/errcodes-appendix.html
  2176. failure:
  2177. type: string
  2178. description: If failed, a message of the failure
  2179. binding:
  2180. type: object
  2181. description: |
  2182. This section follow the schema specified in [Service Binding spec for provisioned service](https://servicebinding.io/spec/core/1.0.0/#provisioned-service).
  2183. For more information see https://servicebinding.io/spec/core/1.0.0/
  2184. properties:
  2185. name:
  2186. type: string
  2187. description: The name of the Secret as specified in [Service Binding spec for provisioned service](https://servicebinding.io/spec/core/1.0.0/#provisioned-service).