This PR enables qingstor-csi to retrieve the IP of the leader center instance using K8s API rather than ZK, which is used in NeonIO.
When the config toml file contains a namespace key under the k8s table, with a non-empty value, the CSI driver uses client-go to retrieve the leader IP by getting the leases.coordination.k8s.io resource which the center instances use for leader election. Otherwise, it fallbacks to the ZK approach.
This PR enables qingstor-csi to retrieve the IP of the leader center instance using K8s API rather than ZK, which is used in NeonIO.
When the config toml file contains a
namespace
key under thek8s
table, with a non-empty value, the CSI driver uses client-go to retrieve the leader IP by getting theleases.coordination.k8s.io
resource which the center instances use for leader election. Otherwise, it fallbacks to the ZK approach.