123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370 |
- apiVersion: apiextensions.k8s.io/v1
- kind: CustomResourceDefinition
- metadata:
- name: sgclusters.stackgres.io
- spec:
- group: stackgres.io
- scope: Namespaced
- names:
- kind: SGCluster
- listKind: SGClusterList
- plural: sgclusters
- singular: sgcluster
- shortNames:
- - sgclu
- versions:
- - name: v1
- served: true
- storage: true
- additionalPrinterColumns:
- - name: version
- type: string
- jsonPath: .spec.postgres.version
- - name: instances
- type: integer
- jsonPath: .spec.instances
- - name: Profile
- type: string
- jsonPath: .spec.sgInstanceProfile
- - name: Disk
- type: string
- jsonPath: .spec.pods.persistentVolume.size
- - name: prometheus-autobind
- type: string
- jsonPath: .spec.configurations.observability.prometheusAutobind
- priority: 1
- - name: pool-config
- type: string
- jsonPath: .spec.configurations.sgPoolingConfig
- priority: 1
- - name: postgres-config
- type: string
- jsonPath: .spec.configurations.sgPostgresConfig
- priority: 1
- subresources:
- # scale enables the scale subresource.
- scale:
- specReplicasPath: .spec.instances
- statusReplicasPath: .status.instances
- labelSelectorPath: .status.labelSelector
- schema:
- openAPIV3Schema:
- type: object
- required: ["metadata", "spec"]
- properties:
- metadata:
- type: object
- properties:
- name:
- type: string
- maxLength: 44
- pattern: "^[a-z]([-a-z0-9]*[a-z0-9])?$"
- description: |
- 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.
- The name must be unique across all SGCluster, SGShardedCluster and SGDistributedLogs in the same namespace.
- spec:
- type: object
- description: |
- Specification of the desired behavior of a StackGres cluster.
- required: ["instances", "postgres", "pods"]
- properties:
- profile:
- type: string
- description: |
- The profile allow to change in a convenient place a set of configuration defaults that affect how the cluster is generated.
-
- All those defaults can be overwritten by setting the correspoinding fields.
-
- Available profiles are:
-
- * `production`:
-
- Prevents two Pods from running in the same Node (set `.spec.nonProductionOptions.disableClusterPodAntiAffinity` to `false` by default).
- Sets both limits and requests using `SGInstanceProfile` for `patroni` container that runs both Patroni and Postgres (set `.spec.nonProductionOptions.disablePatroniResourceRequirements` to `false` by default).
- Sets requests using the referenced `SGInstanceProfile` for sidecar containers other than `patroni` (set `.spec.nonProductionOptions.disableClusterResourceRequirements` to `false` by default).
-
- * `testing`:
-
- Allows two Pods to running in the same Node (set `.spec.nonProductionOptions.disableClusterPodAntiAffinity` to `true` by default).
- Sets both limits and requests using `SGInstanceProfile` for `patroni` container that runs both Patroni and Postgres (set `.spec.nonProductionOptions.disablePatroniResourceRequirements` to `false` by default).
- Sets requests using the referenced `SGInstanceProfile` for sidecar containers other than `patroni` (set `.spec.nonProductionOptions.disableClusterResourceRequirements` to `false` by default).
-
- * `development`:
-
- Allows two Pods from running in the same Node (set `.spec.nonProductionOptions.disableClusterPodAntiAffinity` to `true` by default).
- Unset both limits and requests for `patroni` container that runs both Patroni and Postgres (set `.spec.nonProductionOptions.disablePatroniResourceRequirements` to `true` by default).
- Unsets requests for sidecar containers other than `patroni` (set `.spec.nonProductionOptions.disableClusterResourceRequirements` to `true` by default).
- **Changing this field may require a restart.**
- default: production
- postgres:
- type: object
- description: |
- This section allows to configure Postgres features
- required: [ "version" ]
- properties:
- version:
- type: string
- description: |
- Postgres version used on the cluster. It is either of:
- * The string 'latest', which automatically sets the latest major.minor Postgres version.
- * A major version, like '14' or '13', which sets that major version and the latest minor version.
- * A specific major.minor version, like '14.4'.
- flavor:
- type: string
- description: |
- Postgres flavor used on the cluster. It is either of:
- * `vanilla` will use the [Official Postgres](https://www.postgresql.org/)
- * `babelfish` will use the [Babelfish for Postgres](https://babelfish-for-postgresql.github.io/babelfish-for-postgresql/).
-
- If not specified then the vanilla Postgres will be used for the cluster.
- **This field can only be set on creation.**
- default: vanilla
- extensions:
- type: array
- description: |
- StackGres support deploy of extensions at runtime by simply adding an entry to this array. A deployed extension still
- requires the creation in a database using the [`CREATE EXTENSION`](https://www.postgresql.org/docs/current/sql-createextension.html)
- statement. After an extension is deployed correctly it will be present until removed and the cluster restarted.
-
- A cluster restart is required for:
- * Extensions that requires to add an entry to [`shared_preload_libraries`](https://postgresqlco.nf/en/doc/param/shared_preload_libraries/) configuration parameter.
- * Upgrading extensions that overwrite any file that is not the extension''s control file or extension''s script file.
- * Removing extensions. Until the cluster is not restarted a removed extension will still be available.
- * Install of extensions that require extra mount. After installed the cluster will require to be restarted.
- **Example:**
- ``` yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- postgres:
- extensions:
- - {name: 'timescaledb', version: '2.3.1'}
- ```
- items:
- type: object
- required: ["name"]
- properties:
- name:
- type: string
- description: The name of the extension to deploy.
- publisher:
- type: string
- description: The id of the publisher of the extension to deploy. If not specified `com.ongres` will be used by default.
- default: com.ongres
- version:
- type: string
- 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.
- repository:
- type: string
- description: |
- The repository base URL from where to obtain the extension to deploy.
- **This section is filled by the operator.**
- ssl:
- type: object
- description: |
- This section allows to use SSL when connecting to Postgres
- **Example:**
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- postgres:
- ssl:
- enabled: true
- certificateSecretKeySelector:
- name: stackgres-secrets
- key: cert
- privateKeySecretKeySelector:
- name: stackgres-secrets
- key: key
- ```
- properties:
- enabled:
- type: boolean
- description: |
- Allow to enable SSL for connections to Postgres. By default is `false`.
-
- If `true` certificate and private key will be auto-generated unless fields `certificateSecretKeySelector` and `privateKeySecretKeySelector` are specified.
- certificateSecretKeySelector:
- type: object
- description: |
- Secret key selector for the certificate or certificate chain used for SSL connections.
- required: [ "name", "key" ]
- properties:
- name:
- type: string
- description: |
- The name of Secret that contains the certificate or certificate chain for SSL connections
- key:
- type: string
- description: |
- The key of Secret that contains the certificate or certificate chain for SSL connections
- privateKeySecretKeySelector:
- type: object
- description: |
- Secret key selector for the private key used for SSL connections.
- required: [ "name", "key" ]
- properties:
- name:
- type: string
- description: |
- The name of Secret that contains the private key for SSL connections
- key:
- type: string
- description: |
- The key of Secret that contains the private key for SSL connections
- instances:
- type: integer
- minimum: 0
- description: |
- Number of instances for the StackGres cluster. Each instance is a Pod containing one Postgres server.
- Out of all of the Postgres servers, one is elected as the primary, the rest remain as read-only replicas.
- autoscaling:
- type: object
- description: |
- This section allows to configure horizontal and vertical Pod autoscaling for the SGCluster's Pods.
-
- Horizontal Pod Autoscaling will use replicas connections usage (active connections / max connections) as the metric to control the upscale or downscale of the replicas.
- Horizontal Pod Autoscaling require the [KEDA operator](https://github.com/kedacore/keda) to be installed in the Kuberentes cluster.
-
- 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.
- 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.
- properties:
- mode:
- type: string
- description: |
- Allow to enable or disable any of horizontal and vertical Pod autoscaling.
-
- Possible values are:
- * `all`: both horizontal and vertical Pod autoscaling will be enabled (default)
- * `horizontal`: only horizontal Pod autoscaling will be enabled
- * `vertical`: only vertical Pod autoscaling will be enabled
- * `none`: all autoscaling will be disabled
- default: all
- minInstances:
- type: integer
- description: |
- The total minimum number of instances that the SGCluster will have (including the primary instance).
-
- This field is ignored when horizontal Pod autoscaling is disabled.
- minimum: 2
- maxInstances:
- type: integer
- description: |
- The total maximum number of instances that the SGCluster will have (including the primary instance).
-
- This field is ignored when horizontal Pod autoscaling is disabled.
- minimum: 2
- minAllowed:
- type: object
- description: |
- Allow to define the lower bound for Pod resources of patroni, pgbouncer and envoy containers
- properties:
- patroni:
- type: object
- description: |
- Allow to define the lower bound for Pod resources of patroni container
- properties:
- cpu:
- type: string
- description: The minimum allowed CPU for the patroni container
- memory:
- type: string
- description: The minimum allowed memory for the patroni container
- pgbouncer:
- type: object
- description: |
- Allow to define the lower bound for Pod resources of pgbouncer container
- properties:
- cpu:
- type: string
- description: The minimum allowed CPU for the pgbouncer container
- memory:
- type: string
- description: The minimum allowed memory for the pgbouncer container
- envoy:
- type: object
- description: |
- Allow to define the lower bound for Pod resources of envoy container
- properties:
- cpu:
- type: string
- description: The minimum allowed CPU for the envoy container
- memory:
- type: string
- description: The minimum allowed memory for the envoy container
- maxAllowed:
- type: object
- description: |
- Allow to define the higher bound for Pod resources of patroni, pgbouncer and envoy containers
- properties:
- patroni:
- type: object
- description: |
- Allow to define the higher bound for Pod resources of patroni container
- properties:
- cpu:
- type: string
- description: The maximum allowed CPU for the patroni container
- memory:
- type: string
- description: The maximum allowed memory for the patroni container
- pgbouncer:
- type: object
- description: |
- Allow to define the higher bound for Pod resources of pgbouncer container
- properties:
- cpu:
- type: string
- description: The maximum allowed CPU for the pgbouncer container
- memory:
- type: string
- description: The maximum allowed memory for the pgbouncer container
- envoy:
- type: object
- description: |
- Allow to define the higher bound for Pod resources of envoy container
- properties:
- cpu:
- type: string
- description: The maximum allowed CPU for the envoy container
- memory:
- type: string
- description: The maximum allowed memory for the envoy container
- horizontal:
- type: object
- description: |
- Section to configure horizontal Pod autoscaling aspects.
- properties:
- replicasConnectionsUsageTarget:
- type: string
- description: |
- The target value for replicas connections used in order to trigger the upscale of replica instances.
- default: "0.8"
- replicasConnectionsUsageMetricType:
- type: string
- description: |
- The metric type for connections used metric. See https://keda.sh/docs/latest/concepts/scaling-deployments/#triggers
- default: AverageValue
- cooldownPeriod:
- type: integer
- description: |
- The period in seconds before the downscale of replica instances can be triggered.
- default: 300
- pollingInterval:
- type: integer
- description: |
- The interval in seconds to check if the scaleup or scaledown have to be triggered.
- default: 30
- vertical:
- type: object
- description: |
- Section to configure vertical Pod autoscaling aspects.
- properties:
- recommender:
- type: string
- description: |
- Recommender responsible for generating recommendation for vertical Pod autoscaling. If not specified the default one will be used.
- replication:
- type: object
- description: |
- This section allows to configure Postgres replication mode and HA roles groups.
- The main replication group is implicit and contains the total number of instances less the sum of all
- instances in other replication groups.
- The total number of instances is always specified by `.spec.instances`.
- properties:
- mode:
- type: string
- description: |
- The replication mode applied to the whole cluster.
- Possible values are:
- * `async` (default)
- * `sync`
- * `strict-sync`
- * `sync-all`
- * `strict-sync-all`
-
- **async**
-
- When in asynchronous mode the cluster is allowed to lose some committed transactions.
- When the primary server fails or becomes unavailable for any other reason a sufficiently healthy standby
- will automatically be promoted to primary. Any transactions that have not been replicated to that standby
- remain in a "forked timeline" on the primary, and are effectively unrecoverable (the data is still there,
- but recovering it requires a manual recovery effort by data recovery specialists).
-
- **sync**
-
- When in synchronous mode a standby will not be promoted unless it is certain that the standby contains all
- transactions that may have returned a successful commit status to client (clients can change the behavior
- per transaction using PostgreSQL’s `synchronous_commit` setting. Transactions with `synchronous_commit`
- values of `off` and `local` may be lost on fail over, but will not be blocked by replication delays). This
- means that the system may be unavailable for writes even though some servers are available. System
- administrators can still use manual failover commands to promote a standby even if it results in transaction
- loss.
-
- Synchronous mode does not guarantee multi node durability of commits under all circumstances. When no suitable
- standby is available, primary server will still accept writes, but does not guarantee their replication. When
- the primary fails in this mode no standby will be promoted. When the host that used to be the primary comes
- back it will get promoted automatically, unless system administrator performed a manual failover. This behavior
- makes synchronous mode usable with 2 node clusters.
-
- When synchronous mode is used and a standby crashes, commits will block until the primary is switched to standalone
- mode. Manually shutting down or restarting a standby will not cause a commit service interruption. Standby will
- signal the primary to release itself from synchronous standby duties before PostgreSQL shutdown is initiated.
-
- **strict-sync**
-
- When it is absolutely necessary to guarantee that each write is stored durably on at least two nodes, use the strict
- synchronous mode. This mode prevents synchronous replication to be switched off on the primary when no synchronous
- standby candidates are available. As a downside, the primary will not be available for writes (unless the Postgres
- transaction explicitly turns off `synchronous_mode` parameter), blocking all client write requests until at least one
- synchronous replica comes up.
- **Note**: Because of the way synchronous replication is implemented in PostgreSQL it is still possible to lose
- transactions even when using strict synchronous mode. If the PostgreSQL backend is cancelled while waiting to acknowledge
- replication (as a result of packet cancellation due to client timeout or backend failure) transaction changes become
- visible for other backends. Such changes are not yet replicated and may be lost in case of standby promotion.
-
- **sync-all**
-
- The same as `sync` but `syncInstances` is ignored and the number of synchronous instances is equals to the total number
- of instances less one.
-
- **strict-sync-all**
-
- The same as `strict-sync` but `syncInstances` is ignored and the number of synchronous instances is equals to the total number
- of instances less one.
- default: async
- role:
- type: string
- description: |
- This role is applied to the instances of the implicit replication group that is composed by `.spec.instances` number of instances.
- Possible values are:
- * `ha-read` (default)
- * `ha`
- The primary instance will be elected among all the replication groups that are either `ha` or `ha-read`.
- Only if the role is set to `ha-read` instances of main replication group will be exposed via the replicas service.
- default: ha-read
- syncInstances:
- type: integer
- minimum: 1
- description: |
- Number of synchronous standby instances. Must be less than the total number of instances. It is set to 1 by default.
- Only setteable if mode is `sync` or `strict-sync`.
- groups:
- type: array
- description: |
- StackGres support replication groups where a replication group of a specified number of instances could have different
- replication role. The main replication group is implicit and contains the total number of instances less the sum of all
- instances in other replication groups.
- items:
- type: object
- required: ["role", "instances"]
- properties:
- name:
- type: string
- description: The name of the replication group. If not set will default to the `group-<index>`.
- role:
- type: string
- description: |
- This role is applied to the instances of this replication group.
- Possible values are:
- * `ha-read`
- * `ha`
- * `readonly`
- * `none`
- The primary instance will be elected among all the replication groups that are either `ha` or `ha-read`.
- Only if the role is set to `readonly` or `ha-read` instances of such replication group will be exposed via the replicas service.
- instances:
- type: integer
- minimum: 1
- description: |
- Number of StackGres instances for this replication group.
-
- The total number of instance of a cluster is always `.spec.instances`. The sum of the instances in all the replication groups must be
- less than the total number of instances.
- minInstances:
- type: integer
- minimum: 1
- description: |
- Minimum number of StackGres instances for this replication group. It is ignored when horizontal Pod autoscaling is disabled (see `.spec.autoscaling`)
-
- 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
- less than the total minimum number of instances.
-
- When this field is set the instances value that is provided by the user it is overwritten using the following formula to calculate it:
-
- ```
- <instances> = max(<minInstances>, <minInstances> * <cluster instances> / <cluster autoscaling minInstances>)
- ```
- initialization:
- type: object
- description: |
- Allow to specify how the replicas are initialized.
- properties:
- mode:
- type: string
- description: |
- Allow to specify how the replicas are initialized.
-
- Possible values are:
-
- * `FromPrimary`: When this mode is used replicas will be always created from the primary using `pg_basebackup`.
- * `FromReplica`: When this mode is used replicas will be created from another existing replica using
- `pg_basebackup`. Fallsback to `FromPrimary` if there's no replica or it fails.
- * `FromExistingBackup`: When this mode is used replicas will be created from an existing SGBackup. If `backupNewerThan` is set
- 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).
- Fallsback to `FromReplica` if there's no backup left or it fails.
- * `FromNewlyCreatedBackup`: When this mode is used replicas will be created from a newly created SGBackup.
- Fallsback to `FromExistingBackup` if `backupNewerThan` is set and exists a recent backup newer than its value or it fails.
- default: FromExistingBackup
- backupNewerThan:
- type: string
- description: |
- An ISO 8601 duration in the format `PnDTnHnMn.nS`, that specifies how old an SGBackup have to be in order to be seleceted
- to initialize a replica.
-
- When `FromExistingBackup` mode is set this field restrict the selection of SGBackup to be used for recovery newer than the
- specified value.
-
- When `FromNewlyCreatedBackup` mode is set this field skip the creation SGBackup to be used for recovery if one newer than
- the specified value exists.
- backupRestorePerformance:
- type: object
- description: |
- Configuration that affects the backup network and disk usage performance during recovery.
- properties:
- maxNetworkBandwidth:
- type: integer
- description: |
- Maximum storage upload bandwidth used when storing a backup. In bytes (per second).
- maxDiskBandwidth:
- type: integer
- description: |
- Maximum disk read I/O when performing a backup. In bytes (per second).
- downloadConcurrency:
- type: integer
- minimum: 1
- description: |
- 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.
- sgInstanceProfile:
- type: string
- description: |
- Name of the [SGInstanceProfile](https://stackgres.io/doc/latest/reference/crd/sginstanceprofile/).
- A SGInstanceProfile defines CPU and memory limits. Must exist before creating a cluster.
- When no profile is set, a default (1 core, 2 GiB RAM) one is used.
- **Changing this field may require a restart.**
- metadata:
- type: object
- description: Metadata information from cluster created resources.
- properties:
- annotations:
- type: object
- description: |
- Custom Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) to be passed to resources created and managed by StackGres.
- **Example:**
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- metadata:
- annotations:
- clusterPods:
- customAnnotations: customAnnotationValue
- primaryService:
- customAnnotations: customAnnotationValue
- replicasService:
- customAnnotations: customAnnotationValue
- ```
- properties:
- allResources:
- type: object
- description: Annotations to attach to any resource created or managed by StackGres.
- additionalProperties:
- type: string
- clusterPods:
- type: object
- description: Annotations to attach to pods created or managed by StackGres.
- additionalProperties:
- type: string
- services:
- type: object
- description: Annotations to attach to all services created or managed by StackGres.
- additionalProperties:
- type: string
- primaryService:
- type: object
- description: Custom Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) passed to the `-primary` service.
- additionalProperties:
- type: string
- replicasService:
- type: object
- description: Custom Kubernetes [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) passed to the `-replicas` service.
- additionalProperties:
- type: string
- labels:
- type: object
- description: |
- Custom Kubernetes [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to be passed to resources created and managed by StackGres.
- **Example:**
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- metadata:
- labels:
- clusterPods:
- customLabel: customLabelValue
- services:
- customLabel: customLabelValue
- ```
- properties:
- clusterPods:
- type: object
- description: Labels to attach to Pods created or managed by StackGres.
- additionalProperties:
- type: string
- services:
- type: object
- description: Labels to attach to Services and Endpoints created or managed by StackGres.
- additionalProperties:
- type: string
- postgresServices:
- type: object
- description: Kubernetes [services](https://kubernetes.io/docs/concepts/services-networking/service/) created or managed by StackGres.
- properties:
- primary:
- type: object
- description: |
- Configure the service to the primary with the same name as the SGCluster. A legacy service
-
- Provides a stable connection (regardless of primary failures or switchovers) to the read-write Postgres server of the cluster.
- See also https://kubernetes.io/docs/concepts/services-networking/service/
- properties: &service-properties
- enabled:
- type: boolean
- description: Specify if the service should be created or not.
- default: true
- type:
- type: string
- enum: ["ClusterIP", "LoadBalancer", "NodePort"]
- description: |
- type determines how the Service is exposed. Defaults to ClusterIP. Valid
- options are ClusterIP, NodePort, and LoadBalancer. "ClusterIP" allocates
- a cluster-internal IP address for load-balancing to endpoints.
- "NodePort" builds on ClusterIP and allocates a port on every node.
- "LoadBalancer" builds on NodePort and creates
- an external load-balancer (if supported in the current cloud).
- More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
- default: ClusterIP
- customPorts:
- type: array
- description: |
- The list of custom ports that will be exposed by the service.
-
- The names of custom ports will be prefixed with the string `custom-` so they do not
- conflict with ports defined for the service.
-
- The names of target ports will be prefixed with the string `custom-` so that the ports
- that can be referenced in this section will be only those defined under
- .spec.pods.customContainers[].ports sections were names are also prepended with the same
- prefix.
- **Changing this field may require a restart.**
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#serviceport-v1-core
- items:
- description: |
- A custom port that will be exposed by the service.
-
- The name of the custom port will be prefixed with the string `custom-` so it does not
- conflict with ports defined for the service.
-
- The name of target port will be prefixed with the string `custom-` so that the port
- that can be referenced in this section will be only those defined under
- .spec.pods.customContainers[].ports sections were names are also prepended with the same
- prefix.
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#serviceport-v1-core
- properties: &ports-items-properties #!jq_placeholder .definitions["io.k8s.api.core.v1.ServicePort"].properties
- {"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"}}
- required:
- - port
- type: object
- allocateLoadBalancerNodePorts: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.allocateLoadBalancerNodePorts
- {"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"}
- externalIPs: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.externalIPs #allocateloadbalancernodeports-v1-core
- {"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"}
- externalTrafficPolicy: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.externalTrafficPolicy
- {"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"}
- healthCheckNodePort: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.healthCheckNodePort
- {"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"}
- internalTrafficPolicy: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.internalTrafficPolicy
- {"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"}
- ipFamilies: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.ipFamilies
- {"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"}
- ipFamilyPolicy: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.ipFamilyPolicy
- {"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"}
- loadBalancerClass: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.loadBalancerClass
- {"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"}
- loadBalancerIP: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.loadBalancerIP
- {"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"}
- loadBalancerSourceRanges: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.loadBalancerSourceRanges
- {"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"}
- publishNotReadyAddresses: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.publishNotReadyAddresses
- {"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"}
- sessionAffinity: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.sessionAffinity
- {"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"}
- sessionAffinityConfig: #!jq_placeholder .definitions["io.k8s.api.core.v1.ServiceSpec"].properties.sessionAffinityConfig #sessionaffinityconfig-v1-core
- {"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"}
- nodePorts:
- type: object
- description: nodePorts is a list of ports for exposing a cluster services to the outside
- world
- properties:
- pgport:
- type: integer
- description: the node port that will be exposed to connect to Postgres instance
- replicationport:
- type: integer
- description: the node port that will be exposed to connect to Postgres instance
- for replication purpose
- babelfish:
- type: integer
- description: the node port that will be exposed to connect to Babelfish instance
- using SQL Server wire-protocol and T-SQL
- replicas:
- type: object
- description: |
- Configure the service to any replica with the name as the SGCluster plus the `-replicas` suffix.
-
- 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.
- See also https://kubernetes.io/docs/concepts/services-networking/service/
- properties: *service-properties
- pods:
- type: object
- description: Cluster pod's configuration.
- required: ["persistentVolume"]
- properties:
- persistentVolume:
- type: object
- description: |
- Pod's persistent volume configuration.
- **Example:**
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- pods:
- persistentVolume:
- size: '5Gi'
- storageClass: default
- ```
- required: ["size"]
- properties:
- size:
- type: string
- pattern: '^[0-9]+(\.[0-9]+)?(Mi|Gi|Ti)$'
- description: |
- 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).
- storageClass:
- type: string
- description: |
- Name of an existing StorageClass in the Kubernetes cluster, used to create the PersistentVolumes for the instances of the cluster.
- disableConnectionPooling:
- type: boolean
- description: |
- If set to `true`, avoids creating a connection pooling (using [PgBouncer](https://www.pgbouncer.org/)) sidecar.
- **Changing this field may require a restart.**
- default: false
- disableMetricsExporter:
- type: boolean
- description: |
- **Deprecated** use instead .spec.configurations.observability.disableMetrics.
- disablePostgresUtil:
- type: boolean
- description: |
- 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.
- **Changing this field may require a restart.**
- default: false
- resources:
- type: object
- description: Pod custom resources configuration.
- properties:
- enableClusterLimitsRequirements:
- type: boolean
- description: |
- When enabled resource limits for containers other than the patroni container wil be set just like for patroni contianer as specified in the SGInstanceProfile.
- **Changing this field may require a restart.**
- default: false
- disableResourcesRequestsSplitFromTotal:
- type: boolean
- description: |
- When set to `true` the resources requests values in fields `SGInstanceProfile.spec.requests.cpu` and `SGInstanceProfile.spec.requests.memory` will represent the resources
- requests of the patroni container and the total resources requests calculated by adding the resources requests of all the containers (including the patroni container).
-
- **Changing this field may require a restart.**
- failWhenTotalIsHigher:
- type: boolean
- description: |
- 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
- of all the containers except patroni is equals or higher than the total specified in `SGInstanceProfile.spec.requests.cpu` or `SGInstanceProfile.spec.requests.memory`.
-
- When `false` (the default) and `disableResourcesRequestsSplitFromTotal` is not set or set to `false` and the sum of the CPU or memory
- of all the containers except patroni is equals or higher than the total specified in `SGInstanceProfile.spec.requests.cpu` or `SGInstanceProfile.spec.requests.memory`
- then the patroni container resources will be set to 0.
- scheduling:
- type: object
- description: |
- Pod custom scheduling, affinity and topology spread constratins configuration.
- **Changing this field may require a restart.**
- properties:
- nodeSelector: &node-selector
- type: object
- additionalProperties:
- type: string
- description: |
- 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/
- tolerations: &tolerations #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.tolerations #toleration-v1-core
- {"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"}
- nodeAffinity: &node-affinity #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.affinity.properties.nodeAffinity #nodeaffinity-v1-core
- {"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"}
- priorityClassName: &priority-class-name #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.priorityClassName
- {"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"}
- podAffinity: &pod-affinity #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.affinity.properties.podAffinity #podaffinity-v1-core
- {"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"}
- podAntiAffinity: &pod-anti-affinity #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.affinity.properties.podAntiAffinity #podantiaffinity-v1-core
- {"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"}
- topologySpreadConstraints: #!jq_placeholder .definitions["io.k8s.api.core.v1.PodSpec"].properties.topologySpreadConstraints #topologyspreadconstraint-v1-core
- {"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"}
- backup:
- type: object
- description: Backup Pod custom scheduling and affinity configuration.
- properties:
- nodeSelector: *node-selector
- tolerations: *tolerations
- nodeAffinity: *node-affinity
- priorityClassName: *priority-class-name
- podAffinity: *pod-affinity
- podAntiAffinity: *pod-anti-affinity
- managementPolicy:
- type: string
- description: |
- managementPolicy controls how pods are created during initial scale up, when replacing pods
- on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created
- in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is
- ready before continuing. When scaling down, the pods are removed in the opposite order.
- The alternative policy is `Parallel` which will create pods in parallel to match the desired
- scale without waiting, and on scale down will delete all pods at once.
- default: OrderedReady
- customVolumes:
- type: array
- description: |
- A list of custom volumes that may be used along with any container defined in
- customInitContainers or customContainers sections.
-
- The name used in this section will be prefixed with the string `custom-` so that when
- referencing them in the customInitContainers or customContainers sections the name used
- have to be prepended with the same prefix.
-
- Only the following volume types are allowed: configMap, downwardAPI, emptyDir,
- gitRepo, glusterfs, hostPath, nfs, projected and secret
- **Changing this field may require a restart.**
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#volume-v1-core
- items:
- type: object
- description: |
- A custom volume that may be used along with any container defined in
- customInitContainers or customContainers sections.
-
- The name used in this section will be prefixed with the string `custom-` so that when
- referencing them in the customInitContainers or customContainers sections the name used
- have to be prepended with the same prefix.
-
- Only the following volume types are allowed: configMap, downwardAPI, emptyDir,
- gitRepo, glusterfs, hostPath, nfs, projected and secret
- **Changing this field may require a restart.**
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#volume-v1-core
- required: ["name"]
- properties:
- name:
- description: |
- 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
- type: string
- configMap: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.configMap #configmapvolumesource-v1-core
- {"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"}
- downwardAPI: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.downwardAPI #downwardapivolumesource-v1-core
- {"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"}
- emptyDir: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.emptyDir #emptydirvolumesource-v1-core
- {"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"}
- gitRepo: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.gitRepo #gitrepovolumesource-v1-core
- {"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"}
- glusterfs: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.glusterfs #glusterfsvolumesource-v1-core
- {"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"}
- hostPath: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.hostPath #hostpathvolumesource-v1-core
- {"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"}
- nfs: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.nfs #nfsvolumesource-v1-core
- {"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"}
- projected: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.projected #projectedvolumesource-v1-core
- {"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"}
- secret: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.secret #secretvolumesource-v1-core
- {"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"}
- persistentVolumeClaim: #!jq_placeholder .definitions["io.k8s.api.core.v1.Volume"].properties.persistentVolumeClaim #persistentvolumeclaimvolumesource-v1-core
- {"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"}
- customInitContainers:
- type: array
- description: |
- A list of custom application init containers that run within the cluster's Pods. The
- custom init containers will run following the defined sequence as the end of
- cluster's Pods init containers.
-
- The name used in this section will be prefixed with the string `custom-` so that when
- referencing them in the .spec.containers section of SGInstanceProfile the name used
- have to be prepended with the same prefix.
- **Changing this field may require a restart.**
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core
- items:
- type: object
- description: |
- A custom application init container that run within the cluster's Pods. The custom init
- containers will run following the defined sequence as the end of cluster's Pods init
- containers.
-
- The name used in this section will be prefixed with the string `custom-` so that when
- referencing them in the .spec.containers section of SGInstanceProfile the name used
- have to be prepended with the same prefix.
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core\n
- **Changing this field may require a restart.**
- required: ["name"]
- properties: &containers-items-properties #!jq_placeholder .definitions["io.k8s.api.core.v1.Container"].properties
- {"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"}}
- customContainers:
- type: array
- description: |
- A list of custom application containers that run within the cluster's Pods.
-
- The name used in this section will be prefixed with the string `custom-` so that when
- referencing them in the .spec.containers section of SGInstanceProfile the name used
- have to be prepended with the same prefix.
- **Changing this field may require a restart.**
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core
- items:
- type: object
- description: |
- A custom application container that run within the cluster's Pods. The custom
- containers will run following the defined sequence as the end of cluster's Pods
- containers.
-
- The name used in this section will be prefixed with the string `custom-` so that when
- referencing them in the .spec.containers section of SGInstanceProfile the name used
- have to be prepended with the same prefix.
-
- See: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#container-v1-core\n
- **Changing this field may require a restart.**
- required: ["name"]
- properties: *containers-items-properties
- customVolumeMounts:
- type: object
- description: Custom Pod volumes to mount into the specified container's filesystem.
- additionalProperties:
- type: array
- description: Custom Pod volumes to mount into the specified container's filesystem.
- items: &volume-mounts-items #!jq_placeholder .definitions["io.k8s.api.core.v1.VolumeMount"] #volumemount-v1-core
- {"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"}
- customInitVolumeMounts:
- type: object
- description: Custom Pod volumes to mount into the specified init container's filesystem.
- additionalProperties:
- type: array
- description: Custom Pod volumes to mount into the specified init container's filesystem.
- items: *volume-mounts-items
- configurations:
- type: object
- description: |
- Cluster custom configurations.
- **Example:**
- ``` yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- configurations:
- sgPostgresConfig: 'postgresconf'
- sgPoolingConfig: 'pgbouncerconf'
- backups:
- - sgObjectStorage: 'backupconf'
- ```
- properties:
- sgPostgresConfig:
- type: string
- description: |
- Name of the [SGPostgresConfig](https://stackgres.io/doc/latest/reference/crd/sgpgconfig) used for the cluster.
- It must exist. When not set, a default Postgres config, for the major version selected, is used.
- **Changing this field may require a restart.**
- sgPoolingConfig:
- type: string
- description: |
- Name of the [SGPoolingConfig](https://stackgres.io/doc/latest/reference/crd/sgpoolconfig) used for this cluster.
- Each pod contains a sidecar with a connection pooler (currently: [PgBouncer](https://www.pgbouncer.org/)). The connection pooler is implemented as a sidecar.
- 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.
- **Changing this field may require a restart.**
- observability:
- type: object
- description: Allow to specify Observability configuration (related to logs, metrics and traces)
- properties:
- disableMetrics:
- type: boolean
- description: |
- If set to `true`, avoids creating the Prometheus exporter sidecar. Recommended when there's no intention to use internal monitoring.
- **Changing this field may require a restart.**
- default: false
- receiver:
- type: string
- 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).
- prometheusAutobind:
- type: boolean
- description: If set to `true`, a PodMonitor is created for each Prometheus instance as specified in the SGConfig.spec.collector.prometheusOperator.monitors section.
- default: false
- backups:
- type: array
- description: |
- List of backups configurations for this SGCluster
- items:
- type: object
- description: |
- Backup configuration for this SGCluster
- required: ["sgObjectStorage"]
- properties:
- compression:
- type: string
- description: |
- 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.
- enum: [ "lz4", "lzma", "brotli" ]
- cronSchedule:
- type: string
- description: |
- 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.
-
- Use cron syntax (`m h dom mon dow`) for this parameter, i.e., 5 values separated by spaces:
- * `m`: minute, 0 to 59.
- * `h`: hour, 0 to 23.
- * `dom`: day of month, 1 to 31 (recommended not to set it higher than 28).
- * `mon`: month, 1 to 12.
- * `dow`: day of week, 0 to 7 (0 and 7 both represent Sunday).
-
- 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.
-
- If not set, full backups are never performed automatically.
- performance:
- type: object
- description: |
- Configuration that affects the backup network and disk usage performance.
- properties:
- maxNetworkBandwidth:
- type: integer
- description: |
- Maximum storage upload bandwidth used when storing a backup. In bytes (per second).
- maxDiskBandwidth:
- type: integer
- description: |
- Maximum disk read I/O when performing a backup. In bytes (per second).
- uploadDiskConcurrency:
- type: integer
- minimum: 1
- description: |
- 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.
- uploadConcurrency:
- type: integer
- minimum: 1
- description: |
- 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.
- downloadConcurrency:
- type: integer
- minimum: 1
- description: |
- 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.
- retention:
- type: integer
- minimum: 1
- description: |
- 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.
-
- Consequently, the time range covered by backups is `periodicity*retention`, where `periodicity` is the separation between backups as specified by the `cronSchedule` property.
-
- Default is 5.
- default: 5
- sgObjectStorage:
- type: string
- description: |
- Name of the [SGObjectStorage](https://stackgres.io/doc/latest/reference/crd/sgobjectstorage) to use for the cluster.
- It defines the location in which the the backups will be stored.
- path:
- type: string
- description: |
- The path were the backup is stored. If not set this field is filled up by the operator.
- When provided will indicate were the backups and WAL files will be stored.
-
- > **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
- re-using the same value in another SGCluster and you may get a mixed WAL history with unrecoverable backups.
- useVolumeSnapshot:
- type: boolean
- description: |
- If specified SGBackup will use VolumeSnapshot to create backups.
-
- This functionality still require to store WAL files in an SGObjectStorage but could result in much faster backups and restore of those backups.
-
- See also https://kubernetes.io/docs/concepts/storage/volume-snapshots/
- volumeSnapshotClass:
- type: string
- description: |
- The name of the VolumeSnaphostClass to use to create the VolumeSnapshot for backups.
-
- See also https://kubernetes.io/docs/concepts/storage/volume-snapshots/
- fastVolumeSnapshot:
- type: boolean
- description: |
- 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.
-
- See also https://www.postgresql.org/docs/current/continuous-archiving.html#BACKUP-LOWLEVEL-BASE-BACKUP
- timeout:
- type: integer
- description: |
- Allow to set a timeout for the backup creation.
-
- 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.
-
- 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).
- reconciliationTimeout:
- type: integer
- default: 300
- description: |
- Allow to set a timeout for the reconciliation process that take place after the backup.
-
- If not set defaults to 300 (5 minutes). If set to 0 it will disable timeout.
-
- Failure of reconciliation will not make the backup fail and will be re-tried the next time a SGBackup
- or shecduled backup Job take place.
- maxRetries:
- type: integer
- description: |
- The maximum number of retries the backup operation is allowed to do after a failure.
-
- A value of `0` (zero) means no retries are made. Defaults to: `3`.
- retainWalsForUnmanagedLifecycle:
- type: boolean
- description: |
- If specified, WAL created after any unmanaged lifecycle backups will be retained.
- patroni:
- type: object
- description: Allow to specify Patroni configuration that will extend the generated one
- properties:
- dynamicConfig:
- type: object
- description: |
- Allow to specify Patroni dynamic configuration that will overwrite the generated one. See https://patroni.readthedocs.io/en/latest/dynamic_configuration.html
-
- The following configuration fields will be ignored:
-
- * synchronous_mode
- * synchronous_mode_strict
- * failsafe_mode
- * postgresql
- * standby_cluster
- "x-kubernetes-preserve-unknown-fields": true
- initialConfig:
- type: object
- description: |
- Allow to specify Patroni configuration that will overwrite the generated one. See https://patroni.readthedocs.io/en/latest/yaml_configuration.html
-
- The following configuration fields will be ignored:
-
- * name
- * namespace
- * log
- * bootstrap
- * citus
- * postgresql # with the exception of postgresql.callbacks, postgresql.pre_promote, postgresql.before_stop and postgresql.pg_ctl_timeout
- * restapi
- * ctl
- * watchdog
- * tags
- **This field can only be set on creation.**
- "x-kubernetes-preserve-unknown-fields": true
- credentials:
- type: object
- description: |
- Allow to specify custom credentials for Postgres users and Patroni REST API
- properties:
- patroni:
- type: object
- description: |
- Kubernetes [SecretKeySelectors](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials for patroni REST API.
- **Changing this field may require a restart.**
- properties:
- restApiPassword:
- type: object
- description: |
- 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.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- users:
- type: object
- description: |
- Kubernetes [SecretKeySelectors](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the users.
- **Changing this field may require a manual modification of the database users to reflect the new values specified.**
- 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
- default usernames with the new ones and `***` with their respective passwords):
- * Superuser username changed:
- ```
- CREATE ROLE postgres;
- ```
- * Superuser password changed:
- ```
- ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD '***';
- ```
- * Replication username changed:
- ```
- CREATE ROLE replicator;
- ```
- * Replication password changed:
- ```
- ALTER ROLE replicator WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN REPLICATION NOBYPASSRLS PASSWORD '***';
- ```
- * Authenticator username changed:
- ```
- CREATE ROLE authenticator;
- ```
- * Authenticator password changed:
- ```
- ALTER ROLE authenticator WITH SUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD '***';
- ```
- **Changing this field may require a restart.**
- properties:
- superuser:
- type: object
- description: |
- 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).
- properties:
- username:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- password:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- replication:
- type: object
- description: |
- 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.
- properties:
- username:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- password:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- authenticator:
- type: object
- description: |
- 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.
- properties:
- username:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- password:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- binding:
- type: object
- description: |
- This section allows to specify the properties of [Service Binding spec for provisioned service](https://servicebinding.io/spec/core/1.0.0/#provisioned-service).
- If not specified, then some default will be used.
-
- For more information see https://servicebinding.io/spec/core/1.0.0/
- properties:
- provider:
- type: string
- description: It's the reference of custom provider name. If not specified, then the default value will be `stackgres`
- database:
- type: string
- description: Allow to specify the database name. If not specified, then the default value is `postgres`
- username:
- type: string
- description: Allow to specify the username. If not specified, then the superuser username will be used.
- password:
- type: object
- description: Allow to reference Secret that contains the user's password. If not specified, then the superuser password will be used.
- properties:
- name:
- type: string
- description: The name of the Secret
- key:
- type: string
- description: The key of the Secret
- managedSql:
- type: object
- description: |
- This section allows to reference SQL scripts that will be applied to the cluster live.
- properties:
- continueOnSGScriptError:
- type: boolean
- description: If true, when any entry of any `SGScript` fail will not prevent subsequent `SGScript` from being executed. By default is `false`.
- default: false
- scripts:
- type: array
- description: |
- A list of script references that will be executed in sequence.
- items:
- type: object
- description: |
- A script reference. Each version of each entry of the script referenced will be executed exactly once following the sequence defined
- in the referenced script and skipping any script entry that have already been executed.
- properties:
- id:
- type: integer
- description: |
- 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.
- sgScript:
- type: string
- description: A reference to an `SGScript`
- initialData:
- type: object
- description: |
- Cluster initialization data options. Cluster may be initialized empty, or from a backup restoration.
- **This field can only be set on creation.**
- properties:
- restore:
- type: object
- description: |
- This section allows to restore a cluster from an existing copy of the metadata and data.
- properties:
- fromBackup:
- type: object
- description: |
- From which backup to restore and how the process is configured
- **Example:**
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- initialData:
- restore:
- fromBackup:
- name: stackgres-backup
- downloadDiskConcurrency: 1
- ```
- properties:
- uid:
- type: string
- description: |
- When set to the UID of an existing [SGBackup](https://stackgres.io/doc/latest/reference/crd/sgbackup), the cluster is initialized by restoring the
- backup data to it. If not set, the cluster is initialized empty. This field is deprecated.
- name:
- type: string
- description: |
- When set to the name of an existing [SGBackup](https://stackgres.io/doc/latest/reference/crd/sgbackup), the cluster is initialized by restoring the
- backup data to it. If not set, the cluster is initialized empty. The selected backup must be in the same namespace.
- target:
- type: string
- description: |
- Specify the [recovery_target](https://postgresqlco.nf/doc/en/param/recovery_target/) that specifies that recovery should end as soon as a consistent
- state is reached, i.e., as early as possible. When restoring from an online backup, this means the point where taking the backup ended.
- Technically, this is a string parameter, but 'immediate' is currently the only allowed value.
- targetTimeline:
- type: string
- description: |
- Specify the [recovery_target_timeline](https://postgresqlco.nf/doc/en/param/recovery_target_timeline/) to recover into a particular timeline.
- 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
- 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
- situations, where you need to return to a state that itself was reached after a point-in-time recovery.
- targetInclusive:
- type: boolean
- description: |
- Specify the [recovery_target_inclusive](https://postgresqlco.nf/doc/en/param/recovery_target_timeline/) to stop recovery just after the specified
- recovery target (true), or just before the recovery target (false). Applies when targetLsn, pointInTimeRecovery, or targetXid is specified. This
- setting controls whether transactions having exactly the target WAL location (LSN), commit time, or transaction ID, respectively, will be included
- in the recovery. Default is true.
- targetName:
- type: string
- description: |
- [recovery_target_name](https://postgresqlco.nf/doc/en/param/recovery_target_name/) specifies the named restore point
- (created with pg_create_restore_point()) to which recovery will proceed.
- targetXid:
- type: string
- description: |
- [recovery_target_xid](https://postgresqlco.nf/doc/en/param/recovery_target_xid/) specifies the transaction ID up to which recovery will proceed.
- Keep in mind that while transaction IDs are assigned sequentially at transaction start, transactions can complete in a different numeric order.
- The transactions that will be recovered are those that committed before (and optionally including) the specified one. The precise stopping point
- is also influenced by targetInclusive.
- targetLsn:
- type: string
- description: |
- [recovery_target_lsn](https://postgresqlco.nf/doc/en/param/recovery_target_lsn/) specifies the LSN of the write-ahead log location up to which
- recovery will proceed. The precise stopping point is also influenced by targetInclusive. This parameter is parsed using the system data type
- pg_lsn.
- pointInTimeRecovery:
- type: object
- description: |
- 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`
- 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
- `restoreToTimestamp` value can be between the timestamps at which that last SGBackup was taken and the current one.
- See also: https://www.postgresql.org/docs/current/continuous-archiving.html
- properties:
- restoreToTimestamp:
- type: string
- description: |
- An ISO 8601 date, that holds UTC date indicating at which point-in-time the database have to be restored.
- downloadDiskConcurrency:
- type: integer
- minimum: 1
- description: |
- The backup fetch process may fetch several streams in parallel. Parallel fetching is enabled when set to a value larger than one.
- If not specified it will be interpreted as latest.
- scripts:
- type: array
- description: |
- **Deprecated** use instead .spec.managedSql with SGScript.
- A list of SQL scripts executed in sequence, exactly once, when the database is bootstrap and/or after restore is completed.
- items:
- type: object
- description: |
- **Deprecated** use instead .spec.managedSql with SGScript.
- Scripts are executed in auto-commit mode with the user `postgres` in the specified database (or in database `postgres` if not specified).
- Fields `script` and `scriptFrom` are mutually exclusive and only one of them is required.
- properties:
- name:
- type: string
- description: |
- Name of the script. Must be unique across this SGCluster.
- database:
- type: string
- description: |
- Database where the script is executed. Defaults to the `postgres` database, if not specified.
- script:
- type: string
- description: |
- Raw SQL script to execute. This field is mutually exclusive with `scriptFrom` field.
- scriptFrom:
- type: object
- description: |
- 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.
- Fields `secretKeyRef` and `configMapKeyRef` are mutually exclusive, and one of them is required.
- properties:
- secretKeyRef:
- type: object
- description: |
- 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.
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- configMapKeyRef:
- type: object
- description: |
- 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.
- properties:
- name:
- type: string
- description: |
- The name of the ConfigMap that contains the SQL script to execute.
- key:
- type: string
- description: |
- The key name within the ConfigMap that contains the SQL script to execute.
- replicateFrom:
- type: object
- description: |
- Make the cluster a read-only standby replica allowing to replicate from another PostgreSQL instance and acting as a rely.
-
- Changing this section is allowed to fix issues or to change the replication source.
-
- Removing this section convert the cluster in a normal cluster where the standby leader is converted into the a primary instance.
- **Example:**
- From SGCluster instance:
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- replicateFrom:
- instance:
- sgCluster: my-cluster
- ```
- > **Note:** The above example allow to replicate from another SGCluster instance that in the same namespace and the same K8s cluster.
- >
- > This option cannot be combined with external instance, storage and users.
- From external instance:
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- replicateFrom:
- instance:
- external:
- host: ${HOST_IP}
- port: 5433
- users:
- superuser:
- username:
- name: pg-origin-secret
- key: superuser-username
- password:
- name: pg-origin-secret
- key: superuser-password
- replication:
- username:
- name: pg-origin-secret
- key: replication-username
- password:
- name: pg-origin-secret
- key: replication-password
- authenticator:
- username:
- name: pg-origin-secret
- key: authenticator-username
- password:
- name: pg-origin-secret
- key: authenticator-password
- ```
- > **Note:** Replace the ${HOST_IP} with the actual IP of the external instance.
- From Storage:
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- initialData:
- restore:
- fromBackup:
- name: backup-name
- replicateFrom:
- storage:
- path: ${PG_ORIGIN_BACKUP_PATH}
- sgObjectStorage: stackgres-backups
- users:
- superuser:
- username:
- name: pg-origin-secret
- key: superuser-username
- password:
- name: pg-origin-secret
- key: superuser-password
- replication:
- username:
- name: pg-origin-secret
- key: replication-username
- password:
- name: pg-origin-secret
- key: replication-password
- authenticator:
- username:
- name: pg-origin-secret
- key: authenticator-username
- password:
- name: pg-origin-secret
- key: authenticator-password
- ```
- > **Note:** Using storage only to replicate from requires to recover from a backup in order to bootstrap the database.
- >
- > Replace the ${PG_ORIGIN_BACKUP_PATH} with the actual path in the object storage where the backups are stored.
- From external instance and storage:
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- replicateFrom:
- instance:
- external:
- host: ${HOST_IP}
- port: 5433
- storage:
- path: ${PG_ORIGIN_BACKUP_PATH}
- sgObjectStorage: stackgres-backups
- users:
- superuser:
- username:
- name: pg-origin-secret
- key: superuser-username
- password:
- name: pg-origin-secret
- key: superuser-password
- replication:
- username:
- name: pg-origin-secret
- key: replication-username
- password:
- name: pg-origin-secret
- key: replication-password
- authenticator:
- username:
- name: pg-origin-secret
- key: authenticator-username
- password:
- name: pg-origin-secret
- key: authenticator-password
- ```
- > **Note**: Replace the ${HOST_IP} with the actual IP of the external instance.
- >
- > Replace the ${PG_ORIGIN_BACKUP_PATH} with the actual path in the object storage where the backups are stored.
- properties:
- instance:
- type: object
- description: |
- Configure replication from a PostgreSQL instance.
- properties:
- sgCluster:
- type: string
- description: |
- Configure replication from an SGCluster.
- external:
- type: object
- description: |
- Configure replication from an external PostgreSQL instance.
- required: ["host", "port"]
- properties:
- host:
- type: string
- description: The host of the PostgreSQL to replicate from.
- port:
- type: integer
- description: The port of the PostgreSQL to replicate from.
- storage:
- type: object
- description: |
- Configure replication from an SGObjectStorage using WAL shipping.
- The file structure of the object storage must follow the
- [WAL-G](https://github.com/wal-g/wal-g) file structure.
- required: ["sgObjectStorage", "path"]
- properties:
- performance:
- type: object
- description: |
- Configuration that affects the backup network and disk usage performance during recovery.
- properties:
- maxNetworkBandwidth:
- type: integer
- description: |
- Maximum storage upload bandwidth used when storing a backup. In bytes (per second).
- maxDiskBandwidth:
- type: integer
- description: |
- Maximum disk read I/O when performing a backup. In bytes (per second).
- downloadConcurrency:
- type: integer
- minimum: 1
- description: |
- 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.
- sgObjectStorage:
- type: string
- description: The SGObjectStorage name to replicate from.
- path:
- type: string
- description: The path in the SGObjectStorage to replicate from.
- users:
- type: object
- description: |
- Kubernetes [SecretKeySelectors](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the credentials of the users.
- required: ["superuser", "replication", "authenticator"]
- properties:
- superuser:
- type: object
- description: |
- 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).
- required: ["username", "password"]
- properties:
- username:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- password:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- replication:
- type: object
- description: |
- 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.
- required: ["username", "password"]
- properties:
- username:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- password:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- authenticator:
- type: object
- description: |
- 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.
- required: ["username", "password"]
- properties:
- username:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the username of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- password:
- type: object
- description: |
- A Kubernetes [SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.29/#secretkeyselector-v1-core) that contains the password of the user.
- required: ["name", "key"]
- properties:
- name:
- type: string
- description: Name of the referent. [More information](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- key:
- type: string
- description: The key of the secret to select from. Must be a valid secret key.
- prometheusAutobind:
- type: boolean
- description: |
- **Deprecated** use instead .spec.configurations.observability.prometheusAutobind.
- nonProductionOptions:
- type: object
- properties:
- disableClusterPodAntiAffinity:
- type: boolean
- description: |
- 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.
- 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.
-
- This property default value may be changed depending on the value of field `.spec.profile`.
- **Changing this field may require a restart.**
- disablePatroniResourceRequirements:
- type: boolean
- description: |
- It is a best practice, on containerized environments, when running production workloads, to enforce container's resources requirements.
- 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.
-
- This property default value may be changed depending on the value of field `.spec.profile`.
- **Changing this field may require a restart.**
- disableClusterResourceRequirements:
- type: boolean
- description: |
- It is a best practice, on containerized environments, when running production workloads, to enforce container's resources requirements.
- 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`).
-
- This property default value may be changed depending on the value of field `.spec.profile`.
- **Changing this field may require a restart.**
- enableSetPatroniCpuRequests:
- type: boolean
- description: |
- **Deprecated** this value is ignored and you can consider it as always `true`.
- 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
- 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.
- 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
- when `.spec.requests.cpu` is configured in the referenced `SGInstanceProfile`.
- **Changing this field may require a restart.**
- default: false
- enableSetClusterCpuRequests:
- type: boolean
- description: |
- **Deprecated** this value is ignored and you can consider it as always `true`.
- 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
- 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.
- 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`)
- when `.spec.requests.containers.<container name>.cpu` `.spec.requests.initContainers.<container name>.cpu` is configured in the referenced `SGInstanceProfile`.
- **Changing this field may require a restart.**
- default: false
- enableSetPatroniMemoryRequests:
- type: boolean
- description: |
- **Deprecated** this value is ignored and you can consider it as always `true`.
- 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
- the workload with less memory than it requires.
- 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
- when `.spec.requests.memory` is configured in the referenced `SGInstanceProfile`.
- **Changing this field may require a restart.**
- default: false
- enableSetClusterMemoryRequests:
- type: boolean
- description: |
- **Deprecated** this value is ignored and you can consider it as always `true`.
- 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
- the workload with less memory than it requires.
- 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`)
- when `.spec.requests.containers.<container name>.memory` `.spec.requests.initContainers.<container name>.memory` is configured in the referenced `SGInstanceProfile`.
- **Changing this field may require a restart.**
- default: false
- enabledFeatureGates:
- type: array
- description: |
- A list of StackGres feature gates to enable (not suitable for a production environment).
-
- Available feature gates are:
- * `babelfish-flavor`: Allow to use `babelfish` flavor.
- items:
- type: string
- description: The name of the fature gate to enable.
- distributedLogs:
- type: object
- description: |
- 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.
- **Example:**
- ```yaml
- apiVersion: stackgres.io/v1
- kind: SGCluster
- metadata:
- name: stackgres
- spec:
- distributedLogs:
- sgDistributedLogs: distributedlogs
- ```
- properties:
- sgDistributedLogs:
- type: string
- description: |
- Name of the [SGDistributedLogs](https://stackgres.io/doc/latest/reference/crd/sgdistributedlogs/) to use for this cluster. It must exist.
- retention:
- type: string
- pattern: '^[0-9]+ (minutes?|hours?|days?|months?)'
- description: |
- Define a retention window with the syntax `<integer> (minutes|hours|days|months)` in which log entries are kept.
- Log entries will be removed when they get older more than the double of the specified retention window.
- When this field is changed the retention will be applied only to log entries that are newer than the end of
- the retention window previously specified. If no retention window was previously specified it is considered
- to be of 7 days. This means that if previous retention window is of `7 days` new retention configuration will
- apply after UTC timestamp calculated with: `SELECT date_trunc('days', now() at time zone 'UTC') - INTERVAL '7 days'`.
- toInstallPostgresExtensions:
- type: array
- description: |
- The list of Postgres extensions to install.
-
- **This section is filled by the operator.**
- items:
- type: object
- required: ["name", "publisher", "version", "repository", "postgresVersion"]
- properties:
- name:
- type: string
- description: The name of the extension to install.
- publisher:
- type: string
- description: The id of the publisher of the extension to install.
- version:
- type: string
- description: The version of the extension to install.
- repository:
- type: string
- description: The repository base URL from where the extension will be installed from.
- postgresVersion:
- type: string
- description: The postgres major version of the extension to install.
- build:
- type: string
- description: The build version of the extension to install.
- extraMounts:
- type: array
- description: The extra mounts of the extension to install.
- items:
- type: string
- description: The extra mount of the installed extension.
- status:
- type: object
- description: Current status of a StackGres cluster.
- properties:
- instances:
- type: integer
- description: Actual number of instances for the StackGres cluster. Each instance is a Pod containing one Postgres server.
- labelSelector:
- type: string
- description: Actual label selector for instances for the StackGres cluster's Pods to be used by autoscaling.
- replicationInitializationFailedSGBackup:
- type: string
- description: Indicates the latest failed backup for the replication initialization.
- conditions:
- type: array
- items:
- type: object
- properties:
- lastTransitionTime:
- description: Last time the condition transitioned from one status to another.
- type: string
- message:
- description: A human readable message indicating details about the transition.
- type: string
- reason:
- description: The reason for the condition's last transition.
- type: string
- status:
- description: Status of the condition, one of True, False, Unknown.
- type: string
- type:
- description: Type of deployment condition.
- type: string
- podStatuses:
- type: array
- description: The list of pod statuses.
- items:
- type: object
- required: ["name"]
- properties:
- name:
- type: string
- description: The name of the pod.
- replicationGroup:
- type: integer
- description: Indicates the replication group this Pod belongs to.
- primary:
- type: boolean
- description: Indicates if the pod is the elected primary
- pendingRestart:
- type: boolean
- description: Indicates if the pod requires restart
- installedPostgresExtensions:
- type: array
- description: The list of Postgres extensions currently installed.
- items:
- type: object
- required: ["name", "publisher", "version", "repository", "postgresVersion"]
- properties:
- name:
- type: string
- description: The name of the installed extension.
- publisher:
- type: string
- description: The id of the publisher of the installed extension.
- version:
- type: string
- description: The version of the installed extension.
- repository:
- type: string
- description: The repository base URL from where the extension was installed from.
- postgresVersion:
- type: string
- description: The postgres major version of the installed extension.
- build:
- type: string
- description: The build version of the installed extension.
- extraMounts:
- type: array
- description: The extra mounts of the installed extension.
- items:
- type: string
- description: The extra mount of the installed extension.
- dbOps:
- type: object
- description: |
- Used by some [SGDbOps](https://stackgres.io/doc/latest/reference/crd/sgdbops) to indicate the operation configuration and status to the operator.
- properties:
- majorVersionUpgrade:
- type: object
- description: |
- The major version upgrade configuration and status
- properties:
- initialInstances:
- type: array
- description: |
- The instances that this operation is targetting
- items:
- type: string
- primaryInstance:
- type: string
- description: |
- The primary instance that this operation is targetting
- sourcePostgresVersion:
- type: string
- description: |
- The source PostgreSQL version
- sourcePostgresExtensions:
- type: array
- description: |
- The source PostgreSQL extensions
- items:
- type: object
- properties:
- name:
- type: string
- description: The name of the extension to deploy.
- publisher:
- type: string
- description: The id of the publisher of the extension to deploy. If not specified `com.ongres` will be used by default.
- default: com.ongres
- version:
- type: string
- 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.
- repository:
- type: string
- description: |
- The repository base URL from where to obtain the extension to deploy.
- sourceSgPostgresConfig:
- type: string
- description: |
- The source SGPostgresConfig reference
- sourceBackupPath:
- type: string
- description: |
- The source backup path
- targetPostgresVersion:
- type: string
- description: |
- The target PostgreSQL version
- locale:
- type: string
- description: |
- The PostgreSQL locale
- encoding:
- type: string
- description: |
- The PostgreSQL encoding
- dataChecksum:
- type: boolean
- description: |
- Indicates if PostgreSQL data checksum is enabled
- link:
- type: boolean
- description: |
- Use `--link` option when running `pg_upgrade`
- clone:
- type: boolean
- description: |
- Use `--clone` option when running `pg_upgrade`
- check:
- type: boolean
- description: |
- Run `pg_upgrade` with check option instead of performing the real upgrade
- rollback:
- type: boolean
- description: |
- Indicates to rollback from a previous major version upgrade
- restart:
- type: object
- description: |
- The minor version upgrade configuration and status
- properties:
- initialInstances:
- type: array
- description: |
- The instances that this operation is targetting
- items:
- type: string
- primaryInstance:
- type: string
- description: |
- The primary instance that this operation is targetting
- minorVersionUpgrade:
- type: object
- description: |
- The minor version upgrade configuration and status
- properties:
- initialInstances:
- type: array
- description: |
- The instances that this operation is targetting
- items:
- type: string
- primaryInstance:
- type: string
- description: |
- The primary instance that this operation is targetting
- sourcePostgresVersion:
- type: string
- description: |
- Postgres version that is currently running on the cluster
- targetPostgresVersion:
- type: string
- description: |
- The desired Postgres version for the cluster
- securityUpgrade:
- type: object
- description: |
- The minor version upgrade configuration and status
- properties:
- initialInstances:
- type: array
- description: |
- The instances that this operation is targetting
- items:
- type: string
- primaryInstance:
- type: string
- description: |
- The primary instance that this operation is targetting
- arch:
- type: string
- description: The architecture on which the cluster has been initialized.
- os:
- type: string
- description: The operative system on which the cluster has been initialized.
- labelPrefix:
- type: string
- description: The custom prefix that is prepended to all labels.
- managedSql:
- type: object
- description: |
- This section stores the state of referenced SQL scripts that are applied to the cluster live.
- properties:
- scripts:
- type: array
- description: A list of statuses for script references.
- items:
- type: object
- description: The status of a script reference.
- properties:
- id:
- type: integer
- description: Identify the associated `SGScript` entry with the same value in the `id` field.
- startedAt:
- type: string
- description: ISO-8601 datetime of when the script execution has been started.
- updatedAt:
- type: string
- description: ISO-8601 datetime of when the last script execution occurred. Will be reset each time the referenced `SGScripts` entry will be applied.
- failedAt:
- type: string
- description: ISO-8601 datetime of when the script execution had failed (mutually exclusive with `completedAt`).
- completedAt:
- type: string
- description: ISO-8601 datetime of when the script execution had completed (mutually exclusive with `failedAt`).
- scripts:
- type: array
- description: A list of statuses for script entries of referenced script.
- items:
- type: object
- description: The status of a script entry of a referenced script.
- properties:
- id:
- type: integer
- description: Identify the associated script entry with the same value in the `id` field.
- version:
- type: integer
- description: The latest version applied
- intents:
- type: integer
- description: Indicates the number of intents or failures occurred
- failureCode:
- type: string
- description: If failed, the error code of the failure. See also https://www.postgresql.org/docs/current/errcodes-appendix.html
- failure:
- type: string
- description: If failed, a message of the failure
- binding:
- type: object
- description: |
- This section follow the schema specified in [Service Binding spec for provisioned service](https://servicebinding.io/spec/core/1.0.0/#provisioned-service).
-
- For more information see https://servicebinding.io/spec/core/1.0.0/
- properties:
- name:
- type: string
- 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).
|