Kaushik_R
(Kaushik R)
1
Hi,
My postgres init container is crashing as there’s no resources defined under https://github.com/ansible/awx-operator/blob/0.30.0/roles/installer/templates/deployments/deployment.yaml.j2
Can we please have resources(requests/limits) defined for the init container?
What logs/errors are you experiencing that you suspect is related to pod resources / limits? feel free to post those in a reply and we’ll take a look!
AWX Team
Kaushik_R
(Kaushik R)
3
Below is the error and I’m anticipating it’s because of the postgres init container missing requests/limits -
Error creating: pods “awx-67cb856d46-lftfx” is forbidden: failed quota: ansible-awx-quota: must specify limits.cpu,limits.memory,requests.cpu,requests.memory
I have requests/limits assigned to all other containers within the AWX pod (awx-67cb856d46-lftfx").
Hi!
you can set postgres_init_container_resource_requirements for the initContainers, see https://github.com/ansible/awx-operator#managed-postgresql-service
However, you may still run into the same error for the task container init containers
see this PR which makes the task initContainers inherit the resource limits for task_resource_requirements https://github.com/ansible/awx-operator/pull/1084
For now you should be able to configure LimitRanges in k8s, which will give the initContainers resource limits https://kubernetes.io/docs/concepts/policy/limit-range/
let us know if this helps!
AWX Team
Kaushik_R
(Kaushik R)
6
Thanks - will these PR changes be updated in the upcoming awx-operator version?
Yes should be in the next operator release!