RocksLabs / kvrocks-operator

Apache License 2.0
36 stars 15 forks source link

The request and limit parameters in Sentinel Instance cannot be modified in the configuration. #38

Closed ColinChamber closed 1 year ago

ColinChamber commented 1 year ago

Avoid making key configurations hardcoded. Here.

tianshimoyi commented 1 year ago

The operator does not want you to create a sentinel cluster yourself, it will automatically identify the sentinel cluster you need and create it. If you need customized processing, CRD supports sentinel type CR identification

截屏2023-06-19 下午5 42 19

jiayouxujin commented 1 year ago

Hi, @tianshimoyi @ColinChamber Under the condition of not wanting users to create their own sentinel clusters, do you think we need to provide a field for users to specify the replicas and resource requirements of sentinel? For instance, changing EnableSentinel to SentinelConfig.

type SentinelConfig struct{
   EnableSentinel bool
   Replicas int32
   Resources *corev1.ResourceRequirements
}

I have based the current default resource settings on the redis-operator. https://github.com/RocksLabs/kvrocks-operator/pull/36/files#diff-a8a584490794acc39bdbcd0073aabf63d756cf54f53900751cecaf596af1a070R90

https://github.com/spotahome/redis-operator/blob/master/operator/redisfailover/service/generator.go#L505

tianshimoyi commented 1 year ago

@jiayouxujin You can create a sentinel cluster first, and specify information such as resources, so that you can customize sentinel

jiayouxujin commented 1 year ago

@tianshimoyi OK, I get it. If there is no sentinel in the current k8s cluster and enableSentinel is true, operator will automatically create a default sentinel.