Azure / fleet

Multi-cluster core
MIT License
80 stars 25 forks source link

interface: add APIs for eviction/disruption budget #911

Closed michaelawyu closed 3 weeks ago

michaelawyu commented 2 months ago

Description of your changes

This PR adds the APIs for supporting eviction and disruption budget.

I have:

How has this code been tested

Applied new resources on a kind cluster,

image image

Special notes for your reviewer

N/A

michaelawyu commented 2 months ago

Internal only: please also see the mini UX doc for further details about this API (ping me if a link hasn't been sent).

Arvindthiru commented 3 weeks ago

One concern: for CRPPDB spec validation I'm planning,

On adding a validating webhook configuration if user specified both minAvailable and maxUnavailable Unexpected error in the eviction controller (just in case user deletes the validating webhook configuration)

Should we also add a condition for CRPPDB to mention whether it's valid or invalid, to surface the fact the CRPPDB is invalid in the case where validating webhook config is not present ?

Arvindthiru commented 3 weeks ago

Upgrading kindest node image to use 1.30 throws this error when I tried to apply the new CRD,

Error from server (Forbidden): error when creating "./config/crd/bases/placement.kubernetes-fleet.io_clusterresourceplacementdisruptionbudgets.yaml": admission webhook "fleet.customresourcedefinition.guardrail.validating" denied the request: user: 'kubernetes-admin' in 'groups: [kubeadm:cluster-admins system:authenticated]' is not allowed to CREATE resource apiextensions.k8s.io/v1, Kind=CustomResourceDefinition/: /clusterresourceplacementdisruptionbudgets.placement.kubernetes-fleet.io

This requires fixes across the repo and E2E tests, Will handle this update in a separate PR