diff --git a/internal/core/kuberes/application.go b/internal/core/kuberes/application.go index 79b119ec744d98f584a2507730ca47fd8ec54cad..f731a9106a80d3663f72f5027e5a71f7718efb9c 100644 --- a/internal/core/kuberes/application.go +++ b/internal/core/kuberes/application.go @@ -523,7 +523,6 @@ func CreateRegistrySecret(cluster, namespace string, envID int64) error { } var registryAddr, registryUser, registryPassword, registryAuth string - registryName := strings.ToLower(integrateSettingRegistry.Name) if registryConf, ok := integrateSettingRegistry.Config.(*settings.RegistryConfig); ok { registryAddr = registryConf.URL registryPassword = registryConf.Password @@ -534,7 +533,7 @@ func CreateRegistrySecret(cluster, namespace string, envID int64) error { return fmt.Errorf("parse integrate setting registry config error") } - registrySecretName := fmt.Sprintf("registry-%v", registryName) + registrySecretName := fmt.Sprintf("registry-%x", integrateSettingRegistry.ID) registryInfo := make(map[string]interface{}) registryInfo[registryAddr] = map[string]string{ "username": registryUser, diff --git a/internal/core/kuberes/deployworker.go b/internal/core/kuberes/deployworker.go index aaaadcd7e22e7694c867369db2c529b1afee4e3e..2c568d1b826bd0fcc4d158866532d1f907300ca2 100644 --- a/internal/core/kuberes/deployworker.go +++ b/internal/core/kuberes/deployworker.go @@ -18,7 +18,6 @@ package kuberes import ( "fmt" - "strings" "github.com/go-atomci/atomci/internal/core/settings" "github.com/go-atomci/atomci/internal/dao" @@ -159,5 +158,5 @@ func getDefaultPullSecretAndRegistryAddr(envID int64) (string, string, error) { url = registryConf.URL } - return "registry-" + strings.ToLower(integrateSettingRegistry.Name), url, nil + return fmt.Sprintf("registry-%x", integrateSettingRegistry.ID), url, nil }