azure: Remove DNS domain for generated cluster names

This commit is contained in:
Ciprian Hacman 2025-07-26 20:29:26 +03:00
parent e66fc0a494
commit 553509bd46
1 changed files with 9 additions and 1 deletions

View File

@ -319,6 +319,9 @@ func defaultClusterName(cloudProvider string) (string, error) {
switch cloudProvider {
case "aws":
suffix = dnsDomain
case "azure":
// Azure uses --dns=none and the domain is not needed
suffix = ""
default:
suffix = "k8s.local"
}
@ -337,7 +340,12 @@ func defaultClusterName(cloudProvider string) (string, error) {
if len(jobName) > gcpLimit && cloudProvider == "gce" {
jobName = jobName[:gcpLimit]
}
return fmt.Sprintf("%v.%v", jobName, suffix), nil
if suffix != "" {
jobName = jobType + "." + suffix
}
return jobName, nil
}
// stateStore returns the kops state store to use