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

[Feature] Validate/default fields of HVPA CRD in v2 using webhooks #84

Open
amshuman-kr opened this issue Dec 4, 2020 · 1 comment
Open
Labels
kind/enhancement Enhancement, improvement, extension lifecycle/rotten Nobody worked on this for 12 months (final aging stage)

Comments

@amshuman-kr
Copy link
Collaborator

amshuman-kr commented Dec 4, 2020

Feature (What you would like to be added):

We should validate/default fields of HVPA CRD in v2 (according to the redesign proposal) using validating/default webhooks.

Things to validate:

  • All the basic validation already done during reconciliation.
  • maintenanceTimeWindow should be configured if update mode MaintenanceWindow is used.
  • if HPA template has been configured, then the minReplicas and maxReplicas in the HPA template should match maxReplicas of the first and the last effective scaling intervals.
  • if VPA template has been configured, then the maxAllowed configuration should match the maxCPU and maxMemory of the last effective scaling intervals.
  • minChange configuration (for scaleUp and scaleDown) should keep such that the recommendations blocked due to minChange configuration should be below the limits as configured in limitsRequestsGapScaleParams (or VPA's proportional limit scaling if limitsRequestsGapScaleParams has not been configured).

Things to default:

  • updateMode Auto if none given.
  • minReplicas and maxReplicas of HPA template (if configured) to correspond to the maxReplicas of the first and the last effective scaling intervals,
  • maxCPU and maxMemory of the last effective scaling intervals to correspond to VPA templates' maxAllowed if configured.

Motivation (Why is this needed?):
To improve user experience and to reduce the chances of misconfiguration.

Approach/Hint to the implement solution (optional):

Considering that the HVPA v2 branch is yet to be merged to master, this change can be done on top of hvpa-v2 branch and later rebased on master and merged.

@amshuman-kr amshuman-kr added the kind/enhancement Enhancement, improvement, extension label Dec 4, 2020
@ashwani2k
Copy link
Collaborator

Just for completeness of the basic validation currently is missing validation for scaleIntervals. So it should be also added with this enhancement.

@gardener-robot gardener-robot added the lifecycle/stale Nobody worked on this for 6 months (will further age) label Dec 7, 2021
@gardener-robot gardener-robot added lifecycle/rotten Nobody worked on this for 12 months (final aging stage) and removed lifecycle/stale Nobody worked on this for 6 months (will further age) labels Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhancement, improvement, extension lifecycle/rotten Nobody worked on this for 12 months (final aging stage)
Projects
None yet
Development

No branches or pull requests

3 participants