apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: postgresqls.acid.zalan.do spec: group: acid.zalan.do names: categories: - all kind: postgresql listKind: postgresqlList plural: postgresqls shortNames: - pg singular: postgresql scope: Namespaced versions: - additionalPrinterColumns: - description: Team responsible for Postgres cluster jsonPath: .spec.teamId name: Team type: string - description: PostgreSQL version jsonPath: .spec.postgresql.version name: Version type: string - description: Number of Pods per Postgres cluster jsonPath: .spec.numberOfInstances name: Pods type: integer - description: Size of the bound volume jsonPath: .spec.volume.size name: Volume type: string - description: Requested CPU for Postgres containers jsonPath: .spec.resources.requests.cpu name: CPU-Request type: string - description: Requested memory for Postgres containers jsonPath: .spec.resources.requests.memory name: Memory-Request type: string - jsonPath: .metadata.creationTimestamp name: Age type: date - description: Current sync status of postgresql resource jsonPath: .status.PostgresClusterStatus name: Status type: string name: v1 schema: openAPIV3Schema: properties: apiVersion: enum: - acid.zalan.do/v1 type: string kind: enum: - postgresql type: string spec: properties: additionalVolumes: items: properties: isSubPathExpr: type: boolean mountPath: type: string name: type: string subPath: type: string targetContainers: items: type: string nullable: true type: array volumeSource: type: object x-kubernetes-preserve-unknown-fields: true required: - mountPath - name - volumeSource type: object type: array allowedSourceRanges: items: pattern: ^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\/(\d|[1-2]\d|3[0-2])$ type: string nullable: true type: array clone: properties: cluster: type: string s3_access_key_id: type: string s3_endpoint: type: string s3_force_path_style: type: boolean s3_secret_access_key: type: string s3_wal_path: type: string timestamp: pattern: '^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([+-]([01][0-9]|2[0-3]):[0-5][0-9]))$' # The regexp matches the date-time format (RFC 3339 Section 5.6) that specifies a timezone as an offset relative to UTC # Example: 1996-12-19T16:39:57-08:00 # Note: this field requires a timezone type: string uid: format: uuid type: string required: - cluster type: object connectionPooler: properties: dockerImage: type: string maxDBConnections: type: integer mode: enum: - "session" - "transaction" type: string numberOfInstances: minimum: 1 type: integer resources: properties: limits: properties: cpu: pattern: '^(\d+m|\d+(\.\d{1,3})?)$' type: string memory: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string type: object requests: properties: cpu: pattern: '^(\d+m|\d+(\.\d{1,3})?)$' type: string memory: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string type: object type: object schema: type: string user: type: string type: object databases: additionalProperties: type: string # Note: usernames specified here as database owners must be declared in the users key of the spec key. type: object dockerImage: type: string enableConnectionPooler: type: boolean enableLogicalBackup: type: boolean enableMasterLoadBalancer: type: boolean enableMasterPoolerLoadBalancer: type: boolean enableReplicaConnectionPooler: type: boolean enableReplicaLoadBalancer: type: boolean enableReplicaPoolerLoadBalancer: type: boolean enableShmVolume: type: boolean env: items: type: object x-kubernetes-preserve-unknown-fields: true nullable: true type: array initContainers: items: type: object x-kubernetes-preserve-unknown-fields: true nullable: true type: array init_containers: description: deprecated items: type: object x-kubernetes-preserve-unknown-fields: true nullable: true type: array logicalBackupRetention: type: string logicalBackupSchedule: pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$' type: string maintenanceWindows: items: pattern: '^\ *((Mon|Tue|Wed|Thu|Fri|Sat|Sun):(2[0-3]|[01]?\d):([0-5]?\d)|(2[0-3]|[01]?\d):([0-5]?\d))-((2[0-3]|[01]?\d):([0-5]?\d)|(2[0-3]|[01]?\d):([0-5]?\d))\ *$' type: string type: array masterServiceAnnotations: additionalProperties: type: string type: object nodeAffinity: properties: preferredDuringSchedulingIgnoredDuringExecution: items: properties: preference: properties: matchExpressions: items: properties: key: type: string operator: type: string values: items: type: string type: array required: - key - operator type: object type: array matchFields: items: properties: key: type: string operator: type: string values: items: type: string type: array required: - key - operator type: object type: array type: object weight: type: integer required: - preference - weight type: object type: array requiredDuringSchedulingIgnoredDuringExecution: properties: nodeSelectorTerms: items: properties: matchExpressions: items: properties: key: type: string operator: type: string values: items: type: string type: array required: - key - operator type: object type: array matchFields: items: properties: key: type: string operator: type: string values: items: type: string type: array required: - key - operator type: object type: array type: object type: array required: - nodeSelectorTerms type: object type: object numberOfInstances: minimum: 0 type: integer patroni: properties: failsafe_mode: type: boolean initdb: additionalProperties: type: string type: object loop_wait: type: integer maximum_lag_on_failover: type: integer pg_hba: items: type: string type: array retry_timeout: type: integer slots: additionalProperties: additionalProperties: type: string type: object type: object synchronous_mode: type: boolean synchronous_mode_strict: type: boolean synchronous_node_count: type: integer ttl: type: integer type: object podAnnotations: additionalProperties: type: string type: object podPriorityClassName: type: string pod_priority_class_name: description: deprecated type: string postgresql: properties: parameters: additionalProperties: type: string type: object version: enum: - "13" - "14" - "15" - "16" - "17" type: string required: - version type: object preparedDatabases: additionalProperties: properties: defaultUsers: type: boolean extensions: additionalProperties: type: string type: object schemas: additionalProperties: properties: defaultRoles: type: boolean defaultUsers: type: boolean type: object type: object secretNamespace: type: string type: object type: object replicaLoadBalancer: description: deprecated type: boolean replicaServiceAnnotations: additionalProperties: type: string type: object resources: properties: limits: properties: cpu: # Decimal natural followed by m, or decimal natural followed by # dot followed by up to three decimal digits. # # This is because the Kubernetes CPU resource has millis as the # maximum precision. The actual values are checked in code # because the regular expression would be huge and horrible and # not very helpful in validation error messages; this one checks # only the format of the given number. # # https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu pattern: '^(\d+m|\d+(\.\d{1,3})?)$' # Note: the value specified here must not be zero or be lower # than the corresponding request. type: string hugepages-1Gi: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string hugepages-2Mi: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string memory: # You can express memory as a plain integer or as a fixed-point # integer using one of these suffixes: E, P, T, G, M, k. You can # also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki # # https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-memory pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' # Note: the value specified here must not be zero or be higher # than the corresponding limit. type: string type: object requests: properties: cpu: pattern: '^(\d+m|\d+(\.\d{1,3})?)$' type: string hugepages-1Gi: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string hugepages-2Mi: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string memory: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string type: object type: object schedulerName: type: string serviceAnnotations: additionalProperties: type: string type: object sidecars: items: type: object x-kubernetes-preserve-unknown-fields: true nullable: true type: array spiloFSGroup: type: integer spiloRunAsGroup: type: integer spiloRunAsUser: type: integer standby: oneOf: - required: - s3_wal_path - required: - gs_wal_path - required: - standby_host properties: gs_wal_path: type: string s3_wal_path: type: string standby_host: type: string standby_port: type: string type: object streams: items: properties: applicationId: type: string batchSize: type: integer cpu: pattern: '^(\d+m|\d+(\.\d{1,3})?)$' type: string database: type: string enableRecovery: type: boolean filter: additionalProperties: type: string type: object memory: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' type: string tables: additionalProperties: properties: eventType: type: string idColumn: type: string ignoreRecovery: type: boolean payloadColumn: type: string recoveryEventType: type: string required: - eventType type: object type: object required: - applicationId - database - tables type: object type: array teamId: type: string tls: properties: caFile: type: string caSecretName: type: string certificateFile: type: string privateKeyFile: type: string secretName: type: string required: - secretName type: object tolerations: items: properties: effect: enum: - NoExecute - NoSchedule - PreferNoSchedule type: string key: type: string operator: enum: - Equal - Exists type: string tolerationSeconds: type: integer value: type: string type: object type: array useLoadBalancer: description: deprecated type: boolean users: additionalProperties: items: enum: - bypassrls - BYPASSRLS - nobypassrls - NOBYPASSRLS - createdb - CREATEDB - nocreatedb - NOCREATEDB - createrole - CREATEROLE - nocreaterole - NOCREATEROLE - inherit - INHERIT - noinherit - NOINHERIT - login - LOGIN - nologin - NOLOGIN - replication - REPLICATION - noreplication - NOREPLICATION - superuser - SUPERUSER - nosuperuser - NOSUPERUSER type: string nullable: true type: array type: object usersIgnoringSecretRotation: items: type: string nullable: true type: array usersWithInPlaceSecretRotation: items: type: string nullable: true type: array usersWithSecretRotation: items: type: string nullable: true type: array volume: properties: iops: type: integer isSubPathExpr: type: boolean selector: properties: matchExpressions: items: properties: key: type: string operator: enum: - DoesNotExist - Exists - In - NotIn type: string values: items: type: string type: array required: - key - operator type: object type: array matchLabels: type: object x-kubernetes-preserve-unknown-fields: true type: object size: pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$' # Note: the value specified here must not be zero. type: string storageClass: type: string subPath: type: string throughput: type: integer required: - size type: object required: - numberOfInstances - teamId - postgresql - volume type: object status: additionalProperties: type: string type: object required: - kind - apiVersion - spec type: object served: true storage: true subresources: status: {}