Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

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

@amshuman-kr

Description

@amshuman-kr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementEnhancement, improvement, extensionlifecycle/rottenNobody worked on this for 12 months (final aging stage)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions