Define resources for Operator install?

I am aware of documentation regarding defining resources for web, task and ee.

How do you define the resources of the Operator itself?

I’m trying to follow the install guide here: https://github.com/ansible/awx-operator#basic-install

Our Kubernetes cluster requires we define resources. Otherwise it complains of the following when installing the operator:

“Pods “awx-operator-controller-manager-59878d899d-xhzgm” is forbidden: failed quota: default-465f7: must specify limits.cpu,limits.memory,requests.cpu,requests.memory; Deployment does not have minimum availability.”

I’m wondering if I just set the default limits when creating the namespace and then the Operator would inherit that if not specified?

In which case, what limits should the Operator be configured with if you have to hard code the resources?

Defining the limits within the namespace creation doesn’t help. Seems the Operator is trying to set itself up with unlimited resources and that goes against the limits defined in the default.

Pods “awx-operator-controller-manager-59878d899d-kdjqg” is forbidden: exceeded quota: default-f5vnz, requested: limits.cpu=2,limits.memory=8000Mi,requests.cpu=500m,requests.memory=4000Mi, used: limits.cpu=0,limits.memory=0,requests.cpu=0,requests.memory=0, limited: limits.cpu=0,limits.memory=0,requests.cpu=0,requests.memory=0; Deployment does not have minimum availability.

So I do need to adjust the limits it would seem for the Operator itself.

Haven’t tested this, but seems you could try the following.

if you look at the makefile you will see that make deploy does

@$(KUSTOMIZE) build config/default | kubectl apply -f -

you can instead change it to

@$(KUSTOMIZE) build config/default > deploy.yml

then modify that deploy.yml by adding your resource limits (under the containers: section, look for image: quay.io/ansible/awx-operator:devel

finally, do kubectl apply -f deploy.yml

Seth