-
Notifications
You must be signed in to change notification settings - Fork 200
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
refact(cspc): add schema for auxResource in poolConfig #1567
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Signed-off-by: shubham <[email protected]>
8be5315
to
5713d6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -395,8 +395,15 @@ func getResourceRequirementForCStorPool(cspi *apis.CStorPoolInstance) *corev1.Re | |||
return resourceRequirements | |||
} | |||
|
|||
func getAuxResourceRequirement(cspi *apis.CStorPoolInstance) corev1.ResourceRequirements { | |||
return cspi.Spec.AuxResources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we trying NOT to use AuxResources of cspi.Spec? If so, better to remove from the struct itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAuxResourceRequirement
is used to populate the resourceRequirements
for sidecar containers. The cspi is populated using either using the CSPC PoolConfig
AuxResources
or the DefaultAuxResources
. If both of them are nil then an empty resourceRequirements
needs to be set on the sidecar containers.
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham <[email protected]>
Signed-off-by: shubham [email protected]
What this PR does / why we need it:
This PR will add schema to pass auxResource limit to cStor pool pod side car containers via poolConfig.
The DefaultAuxResource is set if auxResource is not present in the poolConfig for the particular pool.
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Checklist:
documentation
tagbreaking-changes
tagrequires-upgrade
tag