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 |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
apiVersion | ✓ | string | stackgres.io/v1 | ||
kind | ✓ | string | SGInstanceProfile | ||
metadata | ✓ | ✓ | object | Refer to the Kubernetes API documentation for the fields of the metadata field. |
|
spec | ✓ | ✓ | object |
|
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
cpu | ✓ | ✓ | string |
CPU(s) (cores) used for every instance of a SGCluster. The suffix m
specifies millicpus (where 1000m is equals to 1).
The number of cores set is assigned to the patroni container (that runs both Patroni and PostgreSQL). A minimum of 2 cores is recommended.
|
|
memory | ✓ | ✓ | string |
RAM allocated to every instance of a SGCluster. The suffix Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
The amount of RAM set is assigned to the patroni container (that runs both Patroni and PostgreSQL). A minimum of 2-4Gi is recommended.
|
|
containers | ✓ | map[string]object |
The CPU(s) (cores) and RAM assigned to containers other than patroni 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 empty).
|
||
hugePages | ✓ | object |
RAM allocated for huge pages
|
||
initContainers | ✓ | map[string]object |
The CPU(s) (cores) and RAM assigned to init containers. |
||
requests | ✓ | object |
On containerized environments, when running production workloads, enforcing container’s resources requirements request to be equals to the limits allow to achieve the highest level of performance. Doing so, reduces the chances of leaving
the workload with less resources than it requires. It also allow to set static CPU management policy that allows to guarantee a pod the usage exclusive CPUs on the node.
There are cases where you may need to set resource requirement request to a different value than limit. This section allow to do so but requires to enable such feature in the |
SGInstanceProfile.spec.containers[key] ↩ Parent
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
cpu | ✓ | ✓ | string |
CPU(s) (cores) used for the specified Pod container. The suffix m
specifies millicpus (where 1000m is equals to 1).
|
|
memory | ✓ | ✓ | string |
RAM allocated to the specified Pod container. The suffix Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
|
|
hugePages | ✓ | object |
RAM allocated for huge pages
|
RAM allocated for huge pages
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
hugepages-1Gi | ✓ | string |
RAM allocated for huge pages with a size of 1Gi. The suffix Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
The amount of RAM is assigned to the specified container.
|
||
hugepages-2Mi | ✓ | string |
RAM allocated for huge pages with a size of 2Mi. The suffix Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
The amount of RAM is assigned to the specified container.
|
RAM allocated for huge pages
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
hugepages-1Gi | ✓ | string |
RAM allocated for huge pages with a size of 1Gi. The suffix Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
By default the amount of RAM set is assigned to patroni container
(that runs both Patroni and PostgreSQL).
|
||
hugepages-2Mi | ✓ | string |
RAM allocated for huge pages with a size of 2Mi. The suffix Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
By default the amount of RAM set is assigned to patroni container
(that runs both Patroni and PostgreSQL).
|
SGInstanceProfile.spec.initContainers[key] ↩ Parent
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
cpu | ✓ | ✓ | string |
CPU(s) (cores) used for the specified Pod init container. The suffix
m specifies millicpus (where 1000m is equals to 1).
|
|
memory | ✓ | ✓ | string |
RAM allocated to the specified Pod init container. The suffix Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
|
|
hugePages | ✓ | object |
RAM allocated for huge pages
|
RAM allocated for huge pages
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
hugepages-1Gi | ✓ | string |
RAM allocated for huge pages with a size of 1Gi. The suffix Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
The amount of RAM is assigned to the specified init container.
|
||
hugepages-2Mi | ✓ | string |
RAM allocated for huge pages with a size of 2Mi. The suffix Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
The amount of RAM is assigned to the specified init container.
|
On containerized environments, when running production workloads, enforcing container’s resources requirements request to be equals to the limits allow to achieve the highest level of performance. Doing so, reduces the chances of leaving the workload with less resources than it requires. It also allow to set static CPU management policy that allows to guarantee a pod the usage exclusive CPUs on the node.
There are cases where you may need to set resource requirement request to a different value than limit. This section allow to do so but requires to enable such feature in the SGCluster
and SGDistributedLogs
(see .spec.nonProductionOptions
section for each of those custom resources).
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
containers | ✓ | map[string]object |
The CPU(s) (cores) and RAM assigned to containers other than patroni container.
|
||
cpu | ✓ | string |
CPU(s) (cores) used for every instance of a SGCluster. The suffix m
specifies millicpus (where 1000m is equals to 1).
The number of cores set is assigned to the patroni container (that runs both Patroni and PostgreSQL).
|
||
initContainers | ✓ | map[string]object |
The CPU(s) (cores) and RAM assigned to init containers. |
||
memory | ✓ | string |
RAM allocated to every instance of a SGCluster. The suffix Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
The amount of RAM set is assigned to the patroni container (that runs both Patroni and PostgreSQL).
|
SGInstanceProfile.spec.requests.containers[key] ↩ Parent
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
cpu | ✓ | string |
CPU(s) (cores) used for the specified Pod container. The suffix m
specifies millicpus (where 1000m is equals to 1).
|
||
memory | ✓ | string |
RAM allocated to the specified Pod container. The suffix Mi or Gi
specifies Mebibytes or Gibibytes, respectively.
|
SGInstanceProfile.spec.requests.initContainers[key] ↩ Parent
Property |
Required |
Updatable |
May Require Restart |
Type |
Description |
---|---|---|---|---|---|
cpu | ✓ | string |
CPU(s) (cores) used for the specified Pod init container. The suffix
m specifies millicpus (where 1000m is equals to 1).
|
||
memory | ✓ | string |
RAM allocated to the specified Pod init container. The suffix Mi
or Gi specifies Mebibytes or Gibibytes, respectively.
|