1
0
mirror of https://github.com/rancher/types.git synced 2025-07-02 00:11:48 +00:00

Merge pull request #25 from galal-hussein/config_changes

Config changes for RKE
This commit is contained in:
Alena Prokharchyk 2017-11-28 09:23:50 -08:00 committed by GitHub
commit 0a0a5647cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 39 deletions

View File

@ -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"`
}

View File

@ -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])
}

View File

@ -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"`
}

View File

@ -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"`
}

View File

@ -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"`
}