Экспериментальная версия. Функциональность может сильно измениться. Совместимость с будущими версиями не гарантируется.
Postgres
Scope: Namespaced
Version: v1alpha1
-
apiVersionAPIVersion 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
-
kindKind 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
-
specPostgresSpec defines the desired state of Postgres
-
spec.configurationПараметры конфигурации кластера PostgreSQL
-
spec.instanceКонфигурация каждого экземпляра кластера PostgreSQL.
-
spec.instance.cpu
-
spec.instance.cpu.coreFractionCoreFraction это множитель для вычисления
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, которые пользователь может задавать при создании кластера;
Этот ресурс не может быть удалён, пока он используется хотя бы на одной ВМ.
-
apiVersionAPIVersion 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
-
kindKind 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
-
specPostgresClassSpec defines the desired state of PostgresClass
-
spec.configurationЕще не реализовано
-
spec.sizingPoliciesРесурсные политики кластеров
-
spec.sizingPolicies.coreFractionCoreFraction это множитель для вычисления
requests.cpu
каждого pod-а.Допустимые значения:
1 <= X <= 100
-
spec.sizingPolicies.coresCores structure
-
spec.sizingPolicies.cores.maxВерхняя граница количества ядер CPU
Пример:
max: 6
-
spec.sizingPolicies.cores.minНижняя граница количества ядер CPU
Пример:
min: 1
-
-
spec.sizingPolicies.memoryMemory 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
-
apiVersionAPIVersion 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
-
kindKind 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
-
specPostgresDatabaseSpec defines the desired state of PostgresDatabase
-
spec.clusterThe 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.nameThe name of the database to create inside PostgreSQL. This setting cannot be changed.
Пример:
name: foo
-
spec.ownerMaps to the
OWNER
parameter ofCREATE DATABASE
. The role name of the user who owns the database inside PostgreSQL.Пример:
owner: foo
-
PostgresUser
Scope: Namespaced
Version: v1alpha1
-
apiVersionAPIVersion 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
-
kindKind 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
-
specPostgresUserSpec defines the desired state of PostgresUser
-
spec.clusterThe 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.commentComment string that will be provided into database as a description
Пример:
comment: user of the application
-
spec.groupsList 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.loginEnable or disable login option for the user
По умолчанию:
true
Пример:
login: true
-
spec.nameName of the postgresql role Secret will be created in namespace with password and connection string
Пример:
name: myuser
-