diff --git a/apis/cluster.cattle.io/v1/types.go b/apis/cluster.cattle.io/v1/types.go index 6eb37c5c..2fceff2d 100644 --- a/apis/cluster.cattle.io/v1/types.go +++ b/apis/cluster.cattle.io/v1/types.go @@ -107,7 +107,7 @@ type AzureKubernetesServiceConfig struct { type RancherKubernetesEngineConfig struct { // Kubernetes nodes - Hosts []RKEConfigHost `yaml:"hosts" json:"hosts,omitempty"` + Nodes []RKEConfigNode `yaml:"nodes" json:"nodes,omitempty"` // Kubernetes components Services RKEConfigServices `yaml:"services" json:"services,omitempty"` // Network configuration used in the kubernetes cluster (flannel, calico) @@ -120,18 +120,18 @@ type RancherKubernetesEngineConfig struct { SSHKeyPath string `yaml:"ssh_key_path" json:"sshKeyPath,omitempty"` } -type RKEConfigHost struct { - // SSH IP address of the host - IP string `yaml:"ip" json:"ip,omitempty"` - // Advertised address that will be used for components communication - AdvertiseAddress string `yaml:"advertise_address" json:"advertiseAddress,omitempty"` - // Host role in kubernetes cluster (controlplane, worker, or etcd) +type RKEConfigNode struct { + // IP or FQDN that is fully resolvable and used for SSH communication + Address string `yaml:"address" json:"address,omitempty"` + // Optional - Internal address that will be used for components communication + InternalAddress string `yaml:"internal_address" json:"internalAddress,omitempty"` + // Node role in kubernetes cluster (controlplane, worker, or etcd) Role []string `yaml:"role" json:"role,omitempty"` - // Hostname of the host - AdvertisedHostname string `yaml:"advertised_hostname" json:"advertisedHostname,omitempty"` + // Optional - Hostname of the node + HostnameOverride string `yaml:"hostname_override" json:"hostnameOverride,omitempty"` // SSH usesr that will be used by RKE User string `yaml:"user" json:"user,omitempty"` - // Docker socket on the host that will be used in tunneling + // Optional - Docker socket on the node that will be used in tunneling DockerSocket string `yaml:"docker_socket" json:"dockerSocket,omitempty"` } diff --git a/apis/cluster.cattle.io/v1/zz_generated_deepcopy.go b/apis/cluster.cattle.io/v1/zz_generated_deepcopy.go index 78419ae5..e7dc29ef 100644 --- a/apis/cluster.cattle.io/v1/zz_generated_deepcopy.go +++ b/apis/cluster.cattle.io/v1/zz_generated_deepcopy.go @@ -445,7 +445,7 @@ func (in *NetworkConfig) DeepCopy() *NetworkConfig { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEConfigHost) DeepCopyInto(out *RKEConfigHost) { +func (in *RKEConfigNode) DeepCopyInto(out *RKEConfigNode) { *out = *in if in.Role != nil { in, out := &in.Role, &out.Role @@ -455,12 +455,12 @@ func (in *RKEConfigHost) DeepCopyInto(out *RKEConfigHost) { return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEConfigHost. -func (in *RKEConfigHost) DeepCopy() *RKEConfigHost { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEConfigNode. +func (in *RKEConfigNode) DeepCopy() *RKEConfigNode { if in == nil { return nil } - out := new(RKEConfigHost) + out := new(RKEConfigNode) in.DeepCopyInto(out) return out } @@ -490,9 +490,9 @@ func (in *RKEConfigServices) DeepCopy() *RKEConfigServices { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RancherKubernetesEngineConfig) DeepCopyInto(out *RancherKubernetesEngineConfig) { *out = *in - if in.Hosts != nil { - in, out := &in.Hosts, &out.Hosts - *out = make([]RKEConfigHost, len(*in)) + if in.Nodes != nil { + in, out := &in.Nodes, &out.Nodes + *out = make([]RKEConfigNode, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/client/cluster/v1/zz_generated_rancher_kubernetes_engine_config.go b/client/cluster/v1/zz_generated_rancher_kubernetes_engine_config.go index ca8d22ad..d129be86 100644 --- a/client/cluster/v1/zz_generated_rancher_kubernetes_engine_config.go +++ b/client/cluster/v1/zz_generated_rancher_kubernetes_engine_config.go @@ -4,8 +4,8 @@ const ( RancherKubernetesEngineConfigType = "rancherKubernetesEngineConfig" RancherKubernetesEngineConfigFieldAddons = "addons" RancherKubernetesEngineConfigFieldAuthentication = "auth" - RancherKubernetesEngineConfigFieldHosts = "hosts" RancherKubernetesEngineConfigFieldNetwork = "network" + RancherKubernetesEngineConfigFieldNodes = "nodes" RancherKubernetesEngineConfigFieldSSHKeyPath = "sshKeyPath" RancherKubernetesEngineConfigFieldServices = "services" ) @@ -13,8 +13,8 @@ const ( type RancherKubernetesEngineConfig struct { Addons string `json:"addons,omitempty"` Authentication *AuthConfig `json:"auth,omitempty"` - Hosts []RKEConfigHost `json:"hosts,omitempty"` Network *NetworkConfig `json:"network,omitempty"` + Nodes []RKEConfigNode `json:"nodes,omitempty"` SSHKeyPath string `json:"sshKeyPath,omitempty"` Services *RKEConfigServices `json:"services,omitempty"` } diff --git a/client/cluster/v1/zz_generated_rke_config_host.go b/client/cluster/v1/zz_generated_rke_config_host.go deleted file mode 100644 index 149c4e27..00000000 --- a/client/cluster/v1/zz_generated_rke_config_host.go +++ /dev/null @@ -1,20 +0,0 @@ -package client - -const ( - RKEConfigHostType = "rkeConfigHost" - RKEConfigHostFieldAdvertiseAddress = "advertiseAddress" - RKEConfigHostFieldAdvertisedHostname = "advertisedHostname" - RKEConfigHostFieldDockerSocket = "dockerSocket" - RKEConfigHostFieldIP = "ip" - RKEConfigHostFieldRole = "role" - RKEConfigHostFieldUser = "user" -) - -type RKEConfigHost struct { - AdvertiseAddress string `json:"advertiseAddress,omitempty"` - AdvertisedHostname string `json:"advertisedHostname,omitempty"` - DockerSocket string `json:"dockerSocket,omitempty"` - IP string `json:"ip,omitempty"` - Role []string `json:"role,omitempty"` - User string `json:"user,omitempty"` -} diff --git a/client/cluster/v1/zz_generated_rke_config_node.go b/client/cluster/v1/zz_generated_rke_config_node.go new file mode 100644 index 00000000..74e92619 --- /dev/null +++ b/client/cluster/v1/zz_generated_rke_config_node.go @@ -0,0 +1,20 @@ +package client + +const ( + RKEConfigNodeType = "rkeConfigNode" + RKEConfigNodeFieldAddress = "address" + RKEConfigNodeFieldDockerSocket = "dockerSocket" + RKEConfigNodeFieldHostnameOverride = "hostnameOverride" + RKEConfigNodeFieldInternalAddress = "internalAddress" + RKEConfigNodeFieldRole = "role" + RKEConfigNodeFieldUser = "user" +) + +type RKEConfigNode struct { + Address string `json:"address,omitempty"` + DockerSocket string `json:"dockerSocket,omitempty"` + HostnameOverride string `json:"hostnameOverride,omitempty"` + InternalAddress string `json:"internalAddress,omitempty"` + Role []string `json:"role,omitempty"` + User string `json:"user,omitempty"` +}