Экспериментальная версия. Функциональность может сильно измениться. Совместимость с будущими версиями не гарантируется.

Postgres

Scope: Namespaced
Version: v1alpha1

Ресурс, описывающий конфигурацию кластера PostgreSQL.
  • apiVersion
    строка
    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  • kind
    строка
    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  • metadata
    объект
  • spec
    объект
    PostgresSpec defines the desired state of Postgres
    • spec.configuration
      объект
      Параметры конфигурации кластера PostgreSQL
    • spec.instance
      объект
      Конфигурация каждого экземпляра кластера PostgreSQL.
      • spec.instance.cpu
        объект
        • spec.instance.cpu.coreFraction
          целочисленный
          CoreFraction это множитель для вычисления requests.cpu каждого pod-а

          По умолчанию: 10

          Пример:

          coreFraction: 50
          
        • spec.instance.cpu.cores
          целочисленный
          Количество ядер, которые будут выделены под каждый экземпляр. Это значение используется в limits.cpu.

          По умолчанию: 1

      • spec.instance.memory
        объект
        • spec.instance.memory.size
          строка
          Количество памяти, которое будет выделено под каждый экземпляр. Это значение используется в limits.memory.

          По умолчанию: 256Mi

          Пример:

          size: 1Gi
          
      • spec.instance.persistentVolumeClaim
        объект
        • spec.instance.persistentVolumeClaim.size
          строка
          Количество дискового пространства, которое будет выделено под каждый экземпляр.

          По умолчанию: 1Gi

          Пример:

          size: 1Gi
          
        • spec.instance.persistentVolumeClaim.storageClassName
          строка
          Имя StorageClass, которое будет использоваться для создания PersistentVolume.

          Пример:

          storageClassName: local-path
          
    • spec.instances
      целочисленный
      Количество экземпляров для работы кластера PostgreSQL

      По умолчанию: 1

    • spec.postgresClassName
      строка
      Имя PostgresClass объекта, который используется для валидации параметров кластера PostgreSQL.

      По умолчанию: default

      Пример:

      postgresClassName: minimal
      
    • spec.postgresVersion
      объект
      Описание требуемой версии PostgreSQL
      • spec.postgresVersion.imageOSCodename
        строка

        Кодовое название операционной системы, на базе которой был создан Docker-образ PostgreSQL. Возможные значения:

        • bookworm: Образ создан на базе Debian 12 (bookworm).

        По умолчанию: bookworm

        Пример:

        imageOSCodename: bookworm
        
      • spec.postgresVersion.imageType
        строка

        Тип Docker-образа PostgreSQL. Возможные значения:

        • minimal: Самый легкий образ, без дополнительных расширений PostgreSQL.
        • standard: Образ с дополнительными расширениями PostgreSQL: pgaudit, pgvector, pg-failover-slots.

        По умолчанию: standard

        Пример:

        imageType: standard
        
      • spec.postgresVersion.version
        строка

        Указывает версию PostgreSQL, которая будет использоваться в кластере. В данный момент доступны версии:

        • 16.7, 16.8
        • 17.3, 17.4

        Пример:

        version: "17.3"
        

PostgresClass

Scope: Cluster
Version: v1alpha1

Данный ресурс описывает:

  • требования к ресурсам (диапазоны CPU и памяти, которые пользователь может выбрать при создании кластера);
  • параметры PostgreSQL, которые пользователь может задавать при создании кластера;

Этот ресурс не может быть удалён, пока он используется хотя бы на одной ВМ.

  • apiVersion
    строка
    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  • kind
    строка
    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  • metadata
    объект
  • spec
    объект
    PostgresClassSpec defines the desired state of PostgresClass
    • spec.configuration
      объект
      Еще не реализовано
    • spec.sizingPolicies
      объект
      Ресурсные политики кластеров
      • spec.sizingPolicies.coreFraction
        целочисленный
        CoreFraction это множитель для вычисления requests.cpu каждого pod-а.

        Допустимые значения: 1 <= X <= 100

      • spec.sizingPolicies.cores
        объект
        Cores structure
        • spec.sizingPolicies.cores.max
          целочисленный
          Верхняя граница количества ядер CPU

          Пример:

          max: 6
          
        • spec.sizingPolicies.cores.min
          целочисленный
          Нижняя граница количества ядер CPU

          Пример:

          min: 1
          
      • spec.sizingPolicies.memory
        объект
        Memory structure
        • spec.sizingPolicies.memory.max
          строка
          Верхняя граница количества памяти

          Пример:

          max: 5Gi
          
        • spec.sizingPolicies.memory.min
          строка
          Нижняя граница количества памяти

          Пример:

          min: 128Mi
          
        • spec.sizingPolicies.memory.step
          строка
          Шаг, который используется при задании количества памяти кластера. Т.е., например, если установить 100Mi, то при создании ресурса Postgres пользователь сможет задать, например, 300Mi, 1Gi, но не 256Mi, 512Mi и т.п.

          Пример:

          step: 100Mi
          
    • spec.unsafeConfiguration
      объект
      Еще не реализовано.
    • spec.userAllowedConfiguration
      массив строк
      Еще не реализовано.

PostgresDatabase

Scope: Namespaced
Version: v1alpha1

PostgresDatabase is the Schema for the postgresdatabases API

PostgresUser

Scope: Namespaced
Version: v1alpha1

PostgresUser is the Schema for the postgresusers API
  • apiVersion
    строка
    APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  • kind
    строка
    Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  • metadata
    объект
  • spec
    объект
    PostgresUserSpec defines the desired state of PostgresUser
    • spec.cluster
      объект
      The name of the PostgreSQL cluster hosting the user. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

      Пример:

      name: small
      
      • spec.cluster.name
        строка
    • spec.comment
      строка
      Comment string that will be provided into database as a description

      Пример:

      comment: user of the application
      
    • spec.groups
      массив строк
      List of one or more existing roles to which this role will be immediately added as a new member.

      Пример:

      groups:
      - pg_monitor
      - pg_signal_backend
      
    • spec.login
      булевый
      Enable or disable login option for the user

      По умолчанию: true

      Пример:

      login: true
      
    • spec.name
      строка
      Name of the postgresql role Secret will be created in namespace with password and connection string

      Пример:

      name: myuser