StarRocks / starrocks-kubernetes-operator

Kubernetes Operator for StarRocks
Apache License 2.0
134 stars 67 forks source link

[enhancement] CRD support in sr-operator Helm chart #448

Open mingmxu opened 6 months ago

mingmxu commented 6 months ago

Describe the current behavior

StarRocksCluster CRD is saved in a separated folder as shown in here.
In this structure, there's no upgrade support on CRD, since Helm by default ignore the CRD folder simply when the CRD is there already. As a result it can be handled in a delete-recreate pattern only. Implicitly there's always downtime of SR clusters since they are deleted when the old CRD is deleted, plus manually re-deploy the SR clusters after the new CRD is created.

Describe the enhancement

Moving CRD into the regular templates folder, or moving it to another sub-chard as dependency, CRD upgrade is treated as other resources.

Additional context

SR operator/CRD is the mainstream pattern which has a global CRD and a single global controller for the CRD. It's the perfectly legitimate way of packaging as described here.

Ps, CRD versioning is another topic in https://github.com/StarRocks/starrocks-kubernetes-operator/issues/445.

cc @dengliu @yandongxiao @kevincai

yandongxiao commented 6 months ago

I think you are right. we can move the CRD yaml to templates directory.