A small helper function provides the capability to register the CRDs supported by the operator at startup.
This takes advantage of a feature of
zio-k8s-crd that generates a
customResourceDefinition effect in the custom client module that retrieves the source YAML of the CRD that was used to generate the module.
In the following example we have a custom resouce called
AlertSet generated with
zio-k8s-crd as desribed on the CRD page, and the
registerIfMissing ZIO effect will register that CRD into the Kubernetes cluster:
The registration requires the
Logging with Blocking with CustomResourceDefinitions environment.