1
0
mirror of https://github.com/rancher/types.git synced 2025-06-27 05:56:50 +00:00

go generate

This commit is contained in:
galal-hussein 2018-01-31 19:14:27 +02:00
parent d6b26cedb9
commit 2ae886fa71
4 changed files with 69 additions and 9 deletions

View File

@ -219,6 +219,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*ImportedConfig).DeepCopyInto(out.(*ImportedConfig))
return nil
}, InType: reflect.TypeOf(&ImportedConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*IngressConfig).DeepCopyInto(out.(*IngressConfig))
return nil
}, InType: reflect.TypeOf(&IngressConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*K8sServerConfig).DeepCopyInto(out.(*K8sServerConfig))
return nil
@ -1893,6 +1897,36 @@ func (in *ImportedConfig) DeepCopy() *ImportedConfig {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IngressConfig) DeepCopyInto(out *IngressConfig) {
*out = *in
if in.Options != nil {
in, out := &in.Options, &out.Options
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressConfig.
func (in *IngressConfig) DeepCopy() *IngressConfig {
if in == nil {
return nil
}
out := new(IngressConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *K8sServerConfig) DeepCopyInto(out *K8sServerConfig) {
*out = *in
@ -3267,6 +3301,13 @@ func (in *RKEConfigNode) DeepCopyInto(out *RKEConfigNode) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
@ -3338,6 +3379,7 @@ func (in *RancherKubernetesEngineConfig) DeepCopyInto(out *RancherKubernetesEngi
*out = make([]PrivateRegistry, len(*in))
copy(*out, *in)
}
in.Ingress.DeepCopyInto(&out.Ingress)
return
}

View File

@ -0,0 +1,14 @@
package client
const (
IngressConfigType = "ingressConfig"
IngressConfigFieldNodeSelector = "nodeSelector"
IngressConfigFieldOptions = "options"
IngressConfigFieldType = "type"
)
type IngressConfig struct {
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Options map[string]string `json:"options,omitempty"`
Type string `json:"type,omitempty"`
}

View File

@ -6,6 +6,7 @@ const (
RancherKubernetesEngineConfigFieldAuthentication = "authentication"
RancherKubernetesEngineConfigFieldAuthorization = "authorization"
RancherKubernetesEngineConfigFieldIgnoreDockerVersion = "ignoreDockerVersion"
RancherKubernetesEngineConfigFieldIngress = "ingress"
RancherKubernetesEngineConfigFieldNetwork = "network"
RancherKubernetesEngineConfigFieldNodes = "nodes"
RancherKubernetesEngineConfigFieldPrivateRegistries = "privateRegistries"
@ -20,6 +21,7 @@ type RancherKubernetesEngineConfig struct {
Authentication *AuthnConfig `json:"authentication,omitempty"`
Authorization *AuthzConfig `json:"authorization,omitempty"`
IgnoreDockerVersion *bool `json:"ignoreDockerVersion,omitempty"`
Ingress *IngressConfig `json:"ingress,omitempty"`
Network *NetworkConfig `json:"network,omitempty"`
Nodes []RKEConfigNode `json:"nodes,omitempty"`
PrivateRegistries []PrivateRegistry `json:"privateRegistries,omitempty"`

View File

@ -6,6 +6,7 @@ const (
RKEConfigNodeFieldDockerSocket = "dockerSocket"
RKEConfigNodeFieldHostnameOverride = "hostnameOverride"
RKEConfigNodeFieldInternalAddress = "internalAddress"
RKEConfigNodeFieldLabels = "labels"
RKEConfigNodeFieldMachineId = "machineId"
RKEConfigNodeFieldRole = "role"
RKEConfigNodeFieldSSHKey = "sshKey"
@ -14,13 +15,14 @@ const (
)
type RKEConfigNode struct {
Address string `json:"address,omitempty"`
DockerSocket string `json:"dockerSocket,omitempty"`
HostnameOverride string `json:"hostnameOverride,omitempty"`
InternalAddress string `json:"internalAddress,omitempty"`
MachineId string `json:"machineId,omitempty"`
Role []string `json:"role,omitempty"`
SSHKey string `json:"sshKey,omitempty"`
SSHKeyPath string `json:"sshKeyPath,omitempty"`
User string `json:"user,omitempty"`
Address string `json:"address,omitempty"`
DockerSocket string `json:"dockerSocket,omitempty"`
HostnameOverride string `json:"hostnameOverride,omitempty"`
InternalAddress string `json:"internalAddress,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
MachineId string `json:"machineId,omitempty"`
Role []string `json:"role,omitempty"`
SSHKey string `json:"sshKey,omitempty"`
SSHKeyPath string `json:"sshKeyPath,omitempty"`
User string `json:"user,omitempty"`
}