cloudstate
cloudstate copied to clipboard
Cloudstate CRDs should probably use a sub-domain for API group
The current CRD is defined like this:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: statefulstores.cloudstate.io
spec:
group: cloudstate.io
This seems to break convention of defining a CRD group as a sub-domain of the owned domain. Examples are Istio which uses config.istio.io, Prometheus which uses monitoring.coreos.com.
I ran into this because kubebuilder expects the API group to be a sub-domain of the CRD's domain. So it thinks this CRD's domain is io. One common sub-domain used for group is crd, so we could consider changing it to crd.cloudstate.io.
I think technically this is allowed, but as convention seems to indicate using a sub-domain, we should consider changing it to prevent future incompatibilities with tools and changes to k8s itself.
The Kubernetes API conventions also recommends this:
When choosing a group name, we recommend selecting a subdomain your group or organization owns, such as "widget.mycompany.com".
I agree