@@ -441,7 +441,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
441
441
}
442
442
// If the supervisor and externally-facing apiserver are not on the same port, tell the proxy where to find the apiserver.
443
443
if controlConfig .SupervisorPort != controlConfig .HTTPSPort {
444
- isIPv6 := utilsnet .IsIPv6 (net .ParseIP (util .GetFirstValidIPString (& envInfo .NodeIP )))
444
+ isIPv6 := utilsnet .IsIPv6 (net .ParseIP (util .GetFirstValidIPString (envInfo .NodeIP )))
445
445
if err := proxy .SetAPIServerPort (controlConfig .HTTPSPort , isIPv6 ); err != nil {
446
446
return nil , errors .Wrapf (err , "failed to set apiserver port to %d" , controlConfig .HTTPSPort )
447
447
}
@@ -482,7 +482,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
482
482
newNodePasswordFile := filepath .Join (nodeConfigPath , "password" )
483
483
upgradeOldNodePasswordPath (oldNodePasswordFile , newNodePasswordFile )
484
484
485
- nodeName , nodeIPs , err := util .GetHostnameAndIPs (envInfo .NodeName , & envInfo .NodeIP )
485
+ nodeName , nodeIPs , err := util .GetHostnameAndIPs (envInfo .NodeName , envInfo .NodeIP )
486
486
if err != nil {
487
487
return nil , err
488
488
}
@@ -514,10 +514,10 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
514
514
// Overwrite nodeip and flannel interface and throw a warning if user explicitly set those parameters
515
515
if len (vpnIPs ) != 0 {
516
516
logrus .Infof ("Node-ip changed to %v due to VPN" , vpnIPs )
517
- if len (envInfo .NodeIP . Value () ) != 0 {
517
+ if len (envInfo .NodeIP ) != 0 {
518
518
logrus .Warn ("VPN provider overrides configured node-ip parameter" )
519
519
}
520
- if len (envInfo .NodeExternalIP . Value () ) != 0 {
520
+ if len (envInfo .NodeExternalIP ) != 0 {
521
521
logrus .Warn ("VPN provider overrides node-external-ip parameter" )
522
522
}
523
523
nodeIPs = vpnIPs
@@ -536,7 +536,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
536
536
}
537
537
}
538
538
539
- nodeExternalIPs , err := util .ParseStringSliceToIPs (& envInfo .NodeExternalIP )
539
+ nodeExternalIPs , err := util .ParseStringSliceToIPs (envInfo .NodeExternalIP )
540
540
if err != nil {
541
541
return nil , fmt .Errorf ("invalid node-external-ip: %w" , err )
542
542
}
@@ -676,13 +676,13 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
676
676
}
677
677
678
678
var nodeExternalDNSs []string
679
- for _ , dnsString := range envInfo .NodeExternalDNS . Value () {
679
+ for _ , dnsString := range envInfo .NodeExternalDNS {
680
680
nodeExternalDNSs = append (nodeExternalDNSs , strings .Split (dnsString , "," )... )
681
681
}
682
682
nodeConfig .AgentConfig .NodeExternalDNSs = nodeExternalDNSs
683
683
684
684
var nodeInternalDNSs []string
685
- for _ , dnsString := range envInfo .NodeInternalDNS . Value () {
685
+ for _ , dnsString := range envInfo .NodeInternalDNS {
686
686
nodeInternalDNSs = append (nodeInternalDNSs , strings .Split (dnsString , "," )... )
687
687
}
688
688
nodeConfig .AgentConfig .NodeInternalDNSs = nodeInternalDNSs
@@ -761,7 +761,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
761
761
}
762
762
763
763
nodeConfig .AgentConfig .PauseImage = envInfo .PauseImage
764
- nodeConfig .AgentConfig .AirgapExtraRegistry = envInfo .AirgapExtraRegistry . Value ()
764
+ nodeConfig .AgentConfig .AirgapExtraRegistry = envInfo .AirgapExtraRegistry
765
765
nodeConfig .AgentConfig .SystemDefaultRegistry = controlConfig .SystemDefaultRegistry
766
766
767
767
// Apply SystemDefaultRegistry to PauseImage and AirgapExtraRegistry
@@ -773,11 +773,10 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
773
773
nodeConfig .AgentConfig .AirgapExtraRegistry = append (nodeConfig .AgentConfig .AirgapExtraRegistry , controlConfig .SystemDefaultRegistry )
774
774
}
775
775
}
776
-
777
- nodeConfig .AgentConfig .ExtraKubeletArgs = envInfo .ExtraKubeletArgs .Value ()
778
- nodeConfig .AgentConfig .ExtraKubeProxyArgs = envInfo .ExtraKubeProxyArgs .Value ()
779
- nodeConfig .AgentConfig .NodeTaints = envInfo .Taints .Value ()
780
- nodeConfig .AgentConfig .NodeLabels = envInfo .Labels .Value ()
776
+ nodeConfig .AgentConfig .ExtraKubeletArgs = envInfo .ExtraKubeletArgs
777
+ nodeConfig .AgentConfig .ExtraKubeProxyArgs = envInfo .ExtraKubeProxyArgs
778
+ nodeConfig .AgentConfig .NodeTaints = envInfo .Taints
779
+ nodeConfig .AgentConfig .NodeLabels = envInfo .Labels
781
780
nodeConfig .AgentConfig .ImageCredProvBinDir = envInfo .ImageCredProvBinDir
782
781
nodeConfig .AgentConfig .ImageCredProvConfig = envInfo .ImageCredProvConfig
783
782
nodeConfig .AgentConfig .DisableCCM = controlConfig .DisableCCM
@@ -788,7 +787,7 @@ func get(ctx context.Context, envInfo *cmds.Agent, proxy proxy.Proxy) (*config.N
788
787
nodeConfig .AgentConfig .PodManifests = filepath .Join (envInfo .DataDir , "agent" , DefaultPodManifestPath )
789
788
nodeConfig .AgentConfig .ProtectKernelDefaults = envInfo .ProtectKernelDefaults
790
789
nodeConfig .AgentConfig .DisableServiceLB = envInfo .DisableServiceLB
791
- nodeConfig .AgentConfig .VLevel = cmds .LogConfig .VLevel
790
+ nodeConfig .AgentConfig .VLevel = int ( cmds .LogConfig .VLevel )
792
791
nodeConfig .AgentConfig .VModule = cmds .LogConfig .VModule
793
792
nodeConfig .AgentConfig .LogFile = cmds .LogConfig .LogFile
794
793
nodeConfig .AgentConfig .AlsoLogToStderr = cmds .LogConfig .AlsoLogToStderr
0 commit comments