1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 12:48:45 +00:00

Merge pull request #154 from moelsayed/images_type

Add SystemImages type
This commit is contained in:
Alena Prokharchyk
2018-01-29 15:18:07 -08:00
committed by GitHub
4 changed files with 78 additions and 13 deletions

View File

@@ -12,15 +12,15 @@ type RancherKubernetesEngineConfig struct {
// YAML manifest for user provided addons to be deployed on the cluster
Addons string `yaml:"addons" json:"addons,omitempty"`
// List of images used internally for proxy, cert downlaod and kubedns
SystemImages map[string]string `yaml:"system_images" json:"systemImages,omitempty"`
SystemImages RKESystemImages `yaml:"system_images" json:"systemImages,omitempty"`
// SSH Private Key Path
SSHKeyPath string `yaml:"ssh_key_path" json:"sshKeyPath,omitempty"`
// Authorization mode configuration used in the cluster
Authorization AuthzConfig `yaml:"authorization" json:"authorization,omitempty"`
// Enable/disable strict docker version checking
IgnoreDockerVersion bool `yaml:"ignore_docker_version" json:"ignoreDockerVersion"`
// Kubernetes version to use (overrides individual Images)
Version string `yaml:"kubernetesVersion"`
// Kubernetes version to use (if kubernetes image is specifed, image version takes precedence)
Version string `yaml:"kubernetes_version" json:"kubernetesVersion,omitempty"`
// List of private registries and their credentials
PrivateRegistries []PrivateRegistry `yaml:"private_registries" json:"privateRegistries,omitempty"`
}
@@ -34,6 +34,29 @@ type PrivateRegistry struct {
Password string `yaml:"password" json:"password,omitempty"`
}
type RKESystemImages struct {
// etcd image
Etcd string `yaml:"etcd" json:"etcd,omitempty" norman:"default=quay.io/coreos/etcd:latest"`
// Alpine image
Alpine string `yaml:"alpine" json:"alpine,omitempty" norman:"default=alpine"`
// rke-nginx-proxy image
NginxProxy string `yaml:"nginx_proxy" json:"nginxProxy,omitempty" norman:"default=rancher/rke-nginx-proxy"`
// rke-cert-deployer image
CertDownloader string `yaml:"cert_downloader" json:"certDownloader,omitempty" norman:"default=rancher/rke-cert-deployer"`
// rke-service-sidekick image
KubernetesServicesSidecar string `yaml:"kubernetes_services_sidecar" json:"kubernetesServicesSidecar,omitempty" norman:"default=rancher/rke-kube-services-sidecar"`
// KubeDNS image
KubeDNS string `yaml:"kubedns" json:"kubedns,omitempty" norman:"default=gcr.io/google_containers/k8s-dns-kube-dns-amd64"`
// DNSMasq image
DNSmasq string `yaml:"dnsmasq" json:"dnsmasq,omitempty" norman:"default=gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64"`
// KubeDNS side car image
KubeDNSSidecar string `yaml:"kubedns_sidecar" json:"kubednsSidecar,omitempty" norman:"default=gcr.io/google_containers/k8s-dns-sidecar-amd64"`
// KubeDNS autoscaler image
KubeDNSAutoscaler string `yaml:"kubedns_autoscaler" json:"kubednsAutoscaler,omitempty" norman:"default=gcr.io/google_containers/cluster-proportional-autoscaler-amd64"`
// Kubernetes image
Kubernetes string `yaml:"kubernetes" json:"kubernetes,omitempty" norman:"default=rancher/k8s"`
}
type RKEConfigNode struct {
// Name of the host provisioned via docker machine
MachineName string `yaml:"machine_name,omitempty" json:"machineName,omitempty" norman:"type=reference[machine]"`

View File

@@ -427,6 +427,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*RKEConfigServices).DeepCopyInto(out.(*RKEConfigServices))
return nil
}, InType: reflect.TypeOf(&RKEConfigServices{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKESystemImages).DeepCopyInto(out.(*RKESystemImages))
return nil
}, InType: reflect.TypeOf(&RKESystemImages{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RancherKubernetesEngineConfig).DeepCopyInto(out.(*RancherKubernetesEngineConfig))
return nil
@@ -3298,6 +3302,22 @@ func (in *RKEConfigServices) DeepCopy() *RKEConfigServices {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKESystemImages) DeepCopyInto(out *RKESystemImages) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKESystemImages.
func (in *RKESystemImages) DeepCopy() *RKESystemImages {
if in == nil {
return nil
}
out := new(RKESystemImages)
in.DeepCopyInto(out)
return out
}
// 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
@@ -3311,13 +3331,7 @@ func (in *RancherKubernetesEngineConfig) DeepCopyInto(out *RancherKubernetesEngi
in.Services.DeepCopyInto(&out.Services)
in.Network.DeepCopyInto(&out.Network)
in.Authentication.DeepCopyInto(&out.Authentication)
if in.SystemImages != nil {
in, out := &in.SystemImages, &out.SystemImages
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
out.SystemImages = in.SystemImages
in.Authorization.DeepCopyInto(&out.Authorization)
if in.PrivateRegistries != nil {
in, out := &in.PrivateRegistries, &out.PrivateRegistries