Open nttvgonzafe opened 1 year ago
A possible workaround is to add a LimitRange
with the default resources.
Anyway, this initContainerResources can be a good thing to have.
Hey @nttvgonzafe, thanks for opening this issue! Ideally, how would you envision this working? Would it be exposing a top-level field on the cluster CRD for example?
Hey! I think so, exposing a initResources
at the same level as resources
in the CRD with the same schema should be intuitive.
Edit: initResources
or initContainerResources
whichever seems more idiomatic.
Currently the spec doesn't allow setting the
resources
field on initContainers. On clusters that enforce setting resources for all containers, this blocks databases created by the operator from starting.Related code is at https://github.com/cockroachdb/cockroach-operator/blob/c7ea8c17f2cce43506d50108449b9169323b44fe/pkg/resource/statefulset.go#L253