Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Tell us about the feature
Sidecar containers of the database pods are created without assigning any resources. It is not possible to define the resources for the below mentioned side car containers
However , it is good to provide options for the end-users where the users might not have the privilege to create LimitRanges. One of the easier option is also to assign a fixed resource for those side car containers , but it’s not the most flexible option.
Community Note
Tell us about the feature
Sidecar containers of the database pods are created without assigning any resources. It is not possible to define the resources for the below mentioned side car containers
{noformat}pgbackrest pgbackrest-config replication-cert-copy{noformat}
This becomes a problem when customer environment enforces resource specification.
Steps to reproduce
Create ResourceQuota using below snippet
{noformat}apiVersion: v1 kind: ResourceQuota metadata: name: high-qos-limit-requests spec: hard: limits.cpu: "10" limits.memory: 20Gi pods: "16" requests.cpu: "10" requests.memory: 20Gi scopes:
Apply the cr.yaml
DB instance pods are not created with the following error
{noformat}6m7s Warning FailedCreate statefulset/cluster1-instance1-57ps create Pod cluster1-instance1-57ps-0 in StatefulSet cluster1-instance1-57ps failed error: pods "cluster1-instance1-57ps-0" is forbidden: failed quota: high-qos-limit-requests: must specify limits.cpu for: database,nss-wrapper-init,pgbackrest,pgbackrest-config,postgres-startup,replication-cert-copy; limits.memory for: database,nss-wrapper-init,pgbackrest,pgbackrest-config,postgres-startup,replication-cert-copy; requests.cpu for: pgbackrest,pgbackrest-config,replication-cert-copy; requests.memory for: pgbackrest,pgbackrest-config,replication-cert-copy 6m7s Warning FailedCreate statefulset/cluster1-instance1-lh6j create Pod cluster1-instance1-lh6j-0 in StatefulSet cluster1-instance1-lh6j failed error: pods "cluster1-instance1-lh6j-0" is forbidden: failed quota: high-qos-limit-requests: must specify limits.cpu for: database,nss-wrapper-init,pgbackrest,pgbackrest-config,postgres-startup,replication-cert-copy; limits.memory for: database,nss-wrapper-init,pgbackrest,pgbackrest-config,postgres-startup,replication-cert-copy; requests.cpu for: pgbackrest,pgbackrest-config,replication-cert-copy; requests.memory for: pgbackrest,pgbackrest-config,replication-cert-copy 6m7s Warning FailedCreate statefulset/cluster1-instance1-xvdn create Pod cluster1-instance1-xvdn-0 in StatefulSet cluster1-instance1-xvdn failed error: pods "cluster1-instance1-xvdn-0" is forbidden: failed quota: high-qos-limit-requests: must specify limits.cpu for: database,nss-wrapper-init,pgbackrest,pgbackrest-config,postgres-startup,replication-cert-copy; limits.memory for: database,nss-wrapper-init,pgbackrest,pgbackrest-config,postgres-startup,replication-cert-copy; requests.cpu for: pgbackrest,pgbackrest-config,replication-cert-copy; requests.memory for: pgbackrest,pgbackrest-config,replication-cert-copy {noformat}
Workaround for this is to create a LimitRange which can assign default values for requests and limits , for example
{noformat}apiVersion: "v1" kind: "LimitRange" metadata: name: "limits" spec: limits:
However , it is good to provide options for the end-users where the users might not have the privilege to create LimitRanges. One of the easier option is also to assign a fixed resource for those side car containers , but it’s not the most flexible option.
Link to JIRA