I have a Kubernetes CRD Type definition with a struct RateLimitDescriptor having a self referencing []RateLimitDescriptor
This is my currect CRD definition structure,
How to access K8S Client in a Validating admission webhook (myCRD_Webhook.go) or within the api package of an operator-sdk based golang operator
I want to validate all the resources of a particular crd called MyCRD before it reaches to the etcd. The answer is a validating webhook. But as you can see my requirement is specific, I just don’t want to validate the incoming CRD Resource, but I actually want to validate all the CRD Resources together everytime a new resources is added, updated or deleted.
To do this I need to list all the resources of myCRD and then apply the validation logic within the ValidateCreate or ValidateUpdate function.