Hardcoded limits (openshift-acme-exposer)
rbo opened this issue · 2 comments
rbo commented
What would you like to be added:
Please make ResourceRequirements for exposer configurable: https://github.com/tnozicka/openshift-acme/blob/master/pkg/controller/route/route.go#L868
via --exposer-resource-cpu...
or via Env variable.
Why is this needed:
On OpenShift Online if have a limit of 80Mi :
oc describe limits/resource-limits
Name: resource-limits
Namespace: sandbox
Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio
---- -------- --- --- --------------- ------------- -----------------------
Pod cpu 5m 6 - - -
Pod memory 80Mi 3Gi - - -
Container cpu 5m 6 30m 1 -
Container memory 80Mi 3Gi 409Mi 512Mi -
PersistentVolumeClaim storage 1Gi - - - -
And I can not change the limit because it is a shared cluster.
That means the pods from the e openshift-acme-exposer will never start because if:
invalid: spec.containers[0].resources.requests: Invalid value: "80Mi": must be less than or equal to memory limit
Warning FailedCreate 2m54s (x9 over 9m2s) replicaset-controller (combined from similar events): Error creating: Pod "exposer-hmohfkv2ungr7g46qfchpr2e1if
n9fk1jttt846sqdd0prl65f4pk4h" is invalid: spec.containers[0].resources.requests: Invalid value: "80Mi": must be less than or equal to memory limit
tnozicka commented
I suppose we could possibly list the limits and adjust the min value automatically without exposing a flag.
rbo commented
If this is easier, up to you...