sustainable-computing-io / kepler-operator

Kepler Operator
Apache License 2.0
24 stars 26 forks source link

feat(webhook): add webhook to validate kepler resource #362

Closed sthaha closed 4 months ago

sthaha commented 4 months ago

Previously, when user created kepler with name other kepler, k8s API server would accept the resource and create it. The operator then updates the status of the resource to be invalid. This is now changed by adding Validating webhook that rejects the resource if the name does not match kepler.

sthaha commented 4 months ago

https://github.com/sustainable-computing-io/kepler-operator/actions/runs/7998493408/job/21844787506?pr=362#step:8:780 Nice!

vprashar2929 commented 4 months ago

Getting error while creating Kepler on OpenShift Screenshot 2024-02-27 at 4 52 38 PM

vprashar2929 commented 4 months ago

Tested again on fresh OpenShift cluster and validating webhooks are working as expected.