File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
cmd/tke-installer/app/installer Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1128,14 +1128,18 @@ func (t *TKE) runAfterClusterReady() bool {
11281128
11291129func (t * TKE ) generateCertificates (ctx context.Context ) error {
11301130 var dnsNames []string
1131+ ips := []net.IP {net .ParseIP ("127.0.0.1" )}
11311132 if t .Para .Config .Gateway != nil && t .Para .Config .Gateway .Domain != "" {
1132- dnsNames = append (dnsNames , t .Para .Config .Gateway .Domain )
1133+ if ip := net .ParseIP (t .Para .Config .Gateway .Domain ); ip != nil {
1134+ ips = append (ips , ip )
1135+ } else {
1136+ dnsNames = append (dnsNames , t .Para .Config .Gateway .Domain )
1137+ }
11331138 }
11341139 if t .Para .Config .Registry .TKERegistry != nil {
11351140 dnsNames = append (dnsNames , t .Para .Config .Registry .TKERegistry .Domain , "*." + t .Para .Config .Registry .TKERegistry .Domain )
11361141 }
11371142
1138- ips := []net.IP {net .ParseIP ("127.0.0.1" )}
11391143 for _ , one := range t .Cluster .Spec .Machines {
11401144 ips = append (ips , net .ParseIP (one .IP ))
11411145 }
You can’t perform that action at this time.
0 commit comments