Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default resource requests for postgres containers #876

Closed

Conversation

rooftopcellist
Copy link
Member

@rooftopcellist rooftopcellist commented Apr 15, 2022

Background

When deploying the awx-operator on some cloud providers, we noticed that sometimes the UI doesn't load properly, evidenced by 404's for assets and a blank page in the UI. What was happening is that the web container came up before the postgresql container was completely set up. This was partially resolved by adding a more specific check for the ready status of the postgresql container in another PR. But this problem was also seen as a result of the resource requests not being set for the postgresql containers.

On resource constrained clusters, k8s will give priority to containers that have explicitly requested resources. Containers that don't get squeezed, which means the container may not have enough resources to process requests, or may be terminated.

Solution

This PR also lowers the default requests for the other awx containers. This is because if the cluster does not have enough resources to satisfy the requests of all of the containers in a deployment, not all of the pods will be scheduled. Prior to this PR, our requests were unnecessarily high.

Additional Info

These changes were based on these k8s docs: https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-resource-requests-and-limits

@rooftopcellist
Copy link
Member Author

Closing this in favor of #862 which contains this commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants