Closed feiyuyitiao closed 2 years ago
I found the 'https://github.com/apache/rocketmq-operator/pull/116' fixed yesterday. so I add change " crd:generateEmbeddedObjectMeta=true " in manifests: controller-gen, fix currentissue. thanks!
sorry, I dont' familar with operatorframework.
Solved by #116
after deploy, view k8s sts broker-0-master or broker-0-replica-1, it miss " volumeClaimTemplates (name: namesrv-storage" or "storageClassName: rocketmq-storage") which defined in template file rocketmq_v1alpha1_rocketmq_cluster.yaml. from bellow snapshot, operator generator a new name. this issue cause recreate pvc when redeploy.
temp fix by: pkg/controller/nameservice/nameservice_controller.go:257 , method: getVolumeClaimTemplates() ...... templates := nameService.Spec.VolumeClaimTemplates templates[0].ObjectMeta.Name = "namesrv-storage" return templates ....... pkg/controller/broker/broker_controller.go:507 , method: getVolumeClaimTemplates() ..... templates := broker.Spec.VolumeClaimTemplates templates[0].ObjectMeta.Name = "broker-storage" return templates .....