mirror of https://github.com/kubernetes/kops.git
Remove references to Gossip-specific ClusterSpec fields from nodeup
This commit is contained in:
parent
7e7a36f1d7
commit
683761a816
|
|
@ -184,7 +184,7 @@ func (t *ProtokubeBuilder) ProtokubeFlags() (*ProtokubeFlags, error) {
|
|||
|
||||
f.ClusterID = fi.PtrTo(t.NodeupConfig.ClusterName)
|
||||
|
||||
zone := t.Cluster.Spec.DNSZone
|
||||
zone := t.NodeupConfig.DNSZone
|
||||
if zone != "" {
|
||||
if strings.Contains(zone, ".") {
|
||||
// match by name
|
||||
|
|
@ -202,15 +202,15 @@ func (t *ProtokubeBuilder) ProtokubeFlags() (*ProtokubeFlags, error) {
|
|||
if t.UsesLegacyGossip() {
|
||||
klog.Warningf("using (legacy) gossip DNS", t.NodeupConfig.ClusterName)
|
||||
f.Gossip = fi.PtrTo(true)
|
||||
if t.Cluster.Spec.GossipConfig != nil {
|
||||
f.GossipProtocol = t.Cluster.Spec.GossipConfig.Protocol
|
||||
f.GossipListen = t.Cluster.Spec.GossipConfig.Listen
|
||||
f.GossipSecret = t.Cluster.Spec.GossipConfig.Secret
|
||||
if t.NodeupConfig.GossipConfig != nil {
|
||||
f.GossipProtocol = t.NodeupConfig.GossipConfig.Protocol
|
||||
f.GossipListen = t.NodeupConfig.GossipConfig.Listen
|
||||
f.GossipSecret = t.NodeupConfig.GossipConfig.Secret
|
||||
|
||||
if t.Cluster.Spec.GossipConfig.Secondary != nil {
|
||||
f.GossipProtocolSecondary = t.Cluster.Spec.GossipConfig.Secondary.Protocol
|
||||
f.GossipListenSecondary = t.Cluster.Spec.GossipConfig.Secondary.Listen
|
||||
f.GossipSecretSecondary = t.Cluster.Spec.GossipConfig.Secondary.Secret
|
||||
if t.NodeupConfig.GossipConfig.Secondary != nil {
|
||||
f.GossipProtocolSecondary = t.NodeupConfig.GossipConfig.Secondary.Protocol
|
||||
f.GossipListenSecondary = t.NodeupConfig.GossipConfig.Secondary.Listen
|
||||
f.GossipSecretSecondary = t.NodeupConfig.GossipConfig.Secondary.Secret
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,6 +94,10 @@ type Config struct {
|
|||
|
||||
// APIServerConfig is additional configuration for nodes running an APIServer.
|
||||
APIServerConfig *APIServerConfig `json:",omitempty"`
|
||||
// GossipConfig is configuration for gossip DNS.
|
||||
GossipConfig *kops.GossipConfig `json:",omitempty"`
|
||||
// DNSZone is the DNS zone we should use when configuring DNS.
|
||||
DNSZone string `json:",omitempty"`
|
||||
// NvidiaGPU contains the configuration for nvidia
|
||||
NvidiaGPU *kops.NvidiaGPUConfig `json:",omitempty"`
|
||||
|
||||
|
|
@ -329,6 +333,14 @@ func NewConfig(cluster *kops.Cluster, instanceGroup *kops.InstanceGroup) (*Confi
|
|||
config.Networking.EgressProxy = cluster.Spec.Networking.EgressProxy
|
||||
}
|
||||
|
||||
if instanceGroup.IsControlPlane() || cluster.UsesLegacyGossip() {
|
||||
config.DNSZone = cluster.Spec.DNSZone
|
||||
}
|
||||
|
||||
if cluster.UsesLegacyGossip() {
|
||||
config.GossipConfig = cluster.Spec.GossipConfig
|
||||
}
|
||||
|
||||
if len(instanceGroup.Spec.SysctlParameters) > 0 {
|
||||
config.SysctlParameters = append(config.SysctlParameters,
|
||||
"# Custom sysctl parameters from instance group spec",
|
||||
|
|
|
|||
Loading…
Reference in New Issue