Kind: SGInstanceProfile
listKind: SGInstanceProfileList
plural: sginstanceprofiles
singular: sginstanceprofile
shortNames sginp
The SGInstanceProfile custom resource represents the CPU and memory resources assigned to each pod of the Postgres cluster.
Example:
apiVersion: stackgres.io/v1
kind: SGInstanceProfile
metadata:
name: size-l
spec:
cpu: "4"
memory: 8Gi
See also Instance Configuration section.
Property |
Description |
|---|---|
| apiVersion string |
stackgres.io/v1 Constraints: required, immutable |
| kind string |
SGInstanceProfile Constraints: required, immutable |
| metadata object |
Refer to the Kubernetes API documentation for the fields of the metadata field.Constraints: required, updatable |
| spec object |
Constraints: required, updatable |
Property |
Description |
|---|---|
| containers map[string]object |
The CPU(s) (cores) and RAM limits assigned to containers other than patroni container.
Constraints: optional, updatable |
| cpu string |
CPU(s) (cores) limits for every resource’s Pod that reference this SGInstanceProfile. The suffix
m
specifies millicpus (where 1000m is equal to 1).
The number of cpu limits is assigned to the patroni container (that runs both Patroni and PostgreSQL). A minimum of 2 CPUs is recommended.
Constraints: optional, updatable |
| hugePages object |
RAM limits allocated for huge pages of the patroni container (that runs both Patroni and PostgreSQL).
Constraints: optional, updatable |
| initContainers map[string]object |
The CPU(s) (cores) and RAM limits assigned to the init containers.
Constraints: optional, updatable |
| memory string |
RAM limits for every resource’s Pod that reference this SGInstanceProfile. The suffix
Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
The amount of RAM limits is assigned to the patroni container (that runs both Patroni and PostgreSQL). A minimum of 2Gi is recommended.
Constraints: optional, updatable |
| requests object |
This section allows you to configure the resources requests for each container and, if not specified, it is filled with some defaults based on the fields
.spec.cpu and .spec.memory.
On containerized environments, when running production workloads, enforcing container resource requirement requests to be equal to the limits in order to achieve the highest level of performance. Doing so, reduces the chances of leaving the workload with less resources than it requires. It also allows you to set static CPU management policy that allows to guarantee a pod the exclusive usage of CPUs on the node. There are cases where you may need to set cpu requests to the same value as cpu limits in order to achieve static CPU management policy. By default the resources requests values in fields
Constraints: optional, updatable |
The CPU(s) (cores) and RAM limits assigned to a container.
This section, if left empty, will be filled automatically by the operator with some defaults that can be proportional to the resources limits assigned to patroni container (except for the huge pages that are always left untouched).
Property |
Description |
|---|---|
| cpu string |
CPU(s) (cores) limits for the specified container. The suffix
m
specifies millicpus (where 1000m is equal to 1).
Constraints: optional, updatable |
| hugePages object |
RAM limits for huge pages for the specified container.
Constraints: optional, updatable |
| memory string |
RAM limits for the specified container. The suffix
Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
RAM limits for huge pages for the specified container.
Property |
Description |
|---|---|
| hugepages-1Gi string |
RAM limits for huge pages of the specified container with a size of 1Gi. The suffix
Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
| hugepages-2Mi string |
RAM limits for huge pages of the specified container with a size of 2Mi. The suffix
Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
RAM limits allocated for huge pages of the patroni container (that runs both Patroni and PostgreSQL).
Property |
Description |
|---|---|
| hugepages-1Gi string |
RAM limits allocated for huge pages of the patroni container (that runs both Patroni and PostgreSQL) with a size of 1Gi. The suffix
Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
| hugepages-2Mi string |
RAM limits allocated for huge pages of the patroni container (that runs both Patroni and PostgreSQL) with a size of 2Mi. The suffix
Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
The CPU(s) (cores) and RAM limits assigned to an init container.
This section will be filled automatically by the operator with the same values of the resources limits assigned to patroni container (except for the huge pages that are always left untouched).
Property |
Description |
|---|---|
| cpu string |
CPU(s) (cores) limits for the specified init container. The suffix
m specifies millicpus (where 1000m is equal to 1).
Constraints: optional, updatable |
| hugePages object |
RAM limits for huge pages of the specified init container
Constraints: optional, updatable |
| memory string |
RAM limits for the specified init container. The suffix
Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
RAM limits for huge pages of the specified init container
Property |
Description |
|---|---|
| hugepages-1Gi string |
RAM limits for huge pages of the specified init container with a size of 1Gi. The suffix
Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
| hugepages-2Mi string |
RAM limits for huge pages of the specified init container with a size of 2Mi. The suffix
Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
This section allows you to configure the resources requests for each container and, if not specified, it is filled with some defaults based on the fields .spec.cpu and .spec.memory.
On containerized environments, when running production workloads, enforcing container resource requirement requests to be equal to the limits in order to achieve the highest level of performance. Doing so, reduces the chances of leaving the workload with less resources than it requires. It also allows you to set static CPU management policy that allows to guarantee a pod the exclusive usage of CPUs on the node. There are cases where you may need to set cpu requests to the same value as cpu limits in order to achieve static CPU management policy.
By default the resources requests values in fields .spec.requests.cpu and .spec.requests.memory represent the total resources requests assigned to each resource’s Pod that reference this SGInstanceProfile.
The resources requests of the patroni container (that runs both Patroni and PostgreSQL) is calculated by subtracting from the total resources requests the resources requests of other containers that are present in the Pod.
To change this behavior and have the resources requests values in fields .spec.requests.cpu and .spec.requests.memory 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) you may set one or more of the following fields to true
(depending on the resource’s Pods you need this behaviour to be changed):
SGCluster.spec.pods.resources.disableResourcesRequestsSplitFromTotalSGShardedCluster.spec.coordinator.pods.resources.disableResourcesRequestsSplitFromTotalSGShardedCluster.spec.shards.pods.resources.disableResourcesRequestsSplitFromTotalSGShardedCluster.spec.shards.overwrites.pods.resources.disableResourcesRequestsSplitFromTotalSGDistributedLogs.spec.resources.disableResourcesRequestsSplitFromTotalProperty |
Description |
|---|---|
| containers map[string]object |
The CPU(s) (cores) and RAM requests assigned to containers other than patroni container.
Constraints: optional, updatable |
| cpu string |
CPU(s) (cores) requests for every resource’s Pod that reference this SGInstanceProfile. The suffix
m
specifies millicpus (where 1000m is equal to 1).
By default the cpu requests values in field
Constraints: optional, updatable |
| initContainers map[string]object |
The CPU(s) (cores) and RAM requests assigned to init containers.
Constraints: optional, updatable |
| memory string |
RAM requests for every resource’s Pod that reference this SGInstanceProfile. The suffix
Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
By default the memory requests values in field
Constraints: optional, updatable |
The CPU(s) (cores) and RAM requests assigned to a container.
This section, if left empty, will be filled automatically by the operator with some defaults that can be proportional to the resources assigned to patroni container (except for the huge pages that are always left untouched).
Property |
Description |
|---|---|
| cpu string |
CPU(s) (cores) requests for the specified container. The suffix
m
specifies millicpus (where 1000m is equal to 1).
Constraints: optional, updatable |
| memory string |
RAM requests for the specified container. The suffix
Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |
The CPU(s) (cores) and RAM requests assigned to an init container.
This section will be filled automatically by the operator with the same values of the resources requests assigned to patroni container (except for the huge pages that are always left untouched).
Property |
Description |
|---|---|
| cpu string |
CPU(s) (cores) requests for the specified init container. The suffix
m specifies millicpus (where 1000m is equal to 1).
Constraints: optional, updatable |
| memory string |
RAM requests for the specified init container. The suffix
Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
Constraints: optional, updatable |