adopt cluster name

This commit is contained in:
dwertent
2021-10-26 20:27:33 +03:00
parent b4198fde8c
commit 8a7cda5dd1

View File

@@ -243,7 +243,7 @@ func (c *ClusterConfig) setCustomerGUID(customerGUID string) {
}
func (c *ClusterConfig) setClusterName(clusterName string) {
c.configObj.ClusterName = clusterName
c.configObj.ClusterName = adoptClusterName(clusterName)
}
func (c *ClusterConfig) GetClusterName() string {
return c.configObj.ClusterName
@@ -472,3 +472,7 @@ func DeleteConfigMap(k8s *k8sinterface.KubernetesApi) error {
func DeleteConfigFile() error {
return os.Remove(ConfigFileFullPath())
}
func adoptClusterName(clusterName string) string {
return strings.ReplaceAll(clusterName, "/", "-")
}