From 3a3fe7bd4d87ce5b49687b2f56093ffc12f6e20e Mon Sep 17 00:00:00 2001 From: jianghang8421 Date: Mon, 18 Feb 2019 14:36:04 +0800 Subject: [PATCH] Update vendor --- vendor.conf | 2 +- .../management.cattle.io/v3/cluster_types.go | 1 + .../v3/k8s_arm64_defaults.go | 133 ++++++++++++++++++ .../management.cattle.io/v3/k8s_defaults.go | 1 + .../apis/management.cattle.io/v3/rke_types.go | 2 + .../management/v3/zz_generated_cluster.go | 2 + .../v3/zz_generated_cluster_spec.go | 2 + ...erated_rancher_kubernetes_engine_config.go | 2 + 8 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_arm64_defaults.go diff --git a/vendor.conf b/vendor.conf index 27a81ecc5b8..84fb45c7a53 100644 --- a/vendor.conf +++ b/vendor.conf @@ -42,7 +42,7 @@ github.com/rancher/rdns-server bf662911db6acce4d6a85d2878653f6841 github.com/rancher/norman 362802224f64fd09a56be0d275f6ec1d7ecf2164 github.com/rancher/kontainer-engine e4935301f7229ea869ca00aed54d67a20cc0ca17 github.com/rancher/rke f8b6131dd2b30f06b55a3a0888dbadb16ce27101 -github.com/rancher/types dc275ce6bede7bd83f4085cb4706d283b8f07be6 +github.com/rancher/types rancher-multiarch-support https://github.com/jianghang8421/types.git gopkg.in/ldap.v2 v2.5.0 gopkg.in/asn1-ber.v1 v1.1 diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go index 9998b489d93..231cd61ae29 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/cluster_types.go @@ -92,6 +92,7 @@ type ClusterSpec struct { EnableClusterAlerting bool `json:"enableClusterAlerting" norman:"default=false"` EnableClusterMonitoring bool `json:"enableClusterMonitoring" norman:"default=false"` LocalClusterAuthEndpoint LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint,omitempty"` + Arch string `json:"arch" norman:"default=amd64,type=enum,options=amd64|arm64"` } type ImportedConfig struct { diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_arm64_defaults.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_arm64_defaults.go new file mode 100644 index 00000000000..126b340414f --- /dev/null +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_arm64_defaults.go @@ -0,0 +1,133 @@ +package v3 + +import ( + "fmt" + "strings" +) + +const ( + DefaultArm64K8s = "v1.11.6-rancher1-1" +) + +var ( + Arm64K8sVersionsCurrent = []string{ + "v1.11.6-rancher1-1", + "v1.12.5-rancher1-1", + "v1.13.1-rancher1-1", + } + + // Arm64K8sVersionToRKESystemImages is dynamically populated on init() with the latest versions + Arm64K8sVersionToRKESystemImages map[string]RKESystemImages + + AllArm64K8sVersions = map[string]RKESystemImages{ + "v1.11.6-rancher1-1": { + Etcd: m("jianghang8421/coreos-etcd-arm64:v3.2.18"), + Kubernetes: m("jianghang8421/hyperkube:v1.11.6-rancher1"), + Alpine: m("jianghang8421/rke-tools:v0.1.18"), + NginxProxy: m("jianghang8421/rke-tools:v0.1.18"), + CertDownloader: m("jianghang8421/rke-tools:v0.1.18"), + KubernetesServicesSidecar: m("jianghang8421/rke-tools:v0.1.18"), + KubeDNS: m("jianghang8421/k8s-dns-kube-dns-arm64:1.14.10"), + DNSmasq: m("jianghang8421/k8s-dns-dnsmasq-nanny-arm64:1.14.10"), + KubeDNSSidecar: m("jianghang8421/k8s-dns-sidecar-arm64:1.14.10"), + KubeDNSAutoscaler: m("jianghang8421/cluster-proportional-autoscaler-arm64:1.0.0"), + Flannel: m("jianghang8421/coreos-flannel-arm64:v0.10.0"), + FlannelCNI: m("jianghang8421/coreos-flannel-cni-arm64:v0.3.0"), + CalicoNode: m("quay.io/calico/node:v3.1.3"), + CalicoCNI: m("quay.io/calico/cni:v3.1.3"), + CalicoCtl: m("quay.io/calico/ctl:v2.0.0"), + CanalNode: m("quay.io/calico/node:v3.1.3"), + CanalCNI: m("quay.io/calico/cni:v3.1.3"), + CanalFlannel: m("quay.io/coreos/flannel:v0.10.0"), + WeaveNode: m("weaveworks/weave-kube:2.1.2"), + WeaveCNI: m("weaveworks/weave-npc:2.1.2"), + PodInfraContainer: m("jianghang8421/pause-arm64:3.1"), + Ingress: m("jianghang8421/nginx-ingress-controller:0.21.0-rancher1"), + IngressBackend: m("jianghang8421/nginx-ingress-controller-defaultbackend-arm64:1.4"), + MetricsServer: m("jianghang8421/metrics-server-arm64:v0.2.1"), + }, + "v1.12.5-rancher1-1": { + Etcd: m("jianghang8421/coreos-etcd-arm64:v3.2.24"), + Kubernetes: m("jianghang8421/hyperkube:v1.12.5-rancher1"), + Alpine: m("jianghang8421/rke-tools:v0.1.23"), + NginxProxy: m("jianghang8421/rke-tools:v0.1.23"), + CertDownloader: m("jianghang8421/rke-tools:v0.1.23"), + KubernetesServicesSidecar: m("jianghang8421/rke-tools:v0.1.23"), + KubeDNS: m("jianghang8421/k8s-dns-kube-dns-arm64:1.14.13"), + DNSmasq: m("jianghang8421/k8s-dns-dnsmasq-nanny-arm64:1.14.13"), + KubeDNSSidecar: m("jianghang8421/k8s-dns-sidecar-arm64:1.14.13"), + KubeDNSAutoscaler: m("jianghang8421/cluster-proportional-autoscaler-arm64:1.0.0"), + Flannel: m("jianghang8421/coreos-flannel-arm64:v0.10.0"), + FlannelCNI: m("jianghang8421/coreos-flannel-cni-arm64:v0.3.0"), + CalicoNode: m("quay.io/calico/node:v3.1.3"), + CalicoCNI: m("quay.io/calico/cni:v3.1.3"), + CalicoCtl: m("quay.io/calico/ctl:v2.0.0"), + CanalNode: m("quay.io/calico/node:v3.1.3"), + CanalCNI: m("quay.io/calico/cni:v3.1.3"), + CanalFlannel: m("quay.io/coreos/flannel:v0.10.0"), + WeaveNode: m("weaveworks/weave-kube:2.5.0"), + WeaveCNI: m("weaveworks/weave-npc:2.5.0"), + PodInfraContainer: m("jianghang8421/pause-arm64:3.1"), + Ingress: m("jianghang8421/nginx-ingress-controller:0.21.0-rancher1"), + IngressBackend: m("jianghang8421/nginx-ingress-controller-defaultbackend-arm64:1.4"), + MetricsServer: m("jianghang8421/metrics-server-arm64:v0.3.1"), + CoreDNS: m("coredns/coredns:1.2.2"), + CoreDNSAutoscaler: m("jianghang8421/cluster-proportional-autoscaler-arm64:1.0.0"), + }, + "v1.13.1-rancher1-1": { + Etcd: m("jianghang8421/coreos-etcd-arm64:v3.2.24"), + Kubernetes: m("jianghang8421/hyperkube:v1.13.1-rancher1"), + Alpine: m("jianghang8421/rke-tools:v0.1.23"), + NginxProxy: m("jianghang8421/rke-tools:v0.1.23"), + CertDownloader: m("jianghang8421/rke-tools:v0.1.23"), + KubernetesServicesSidecar: m("jianghang8421/rke-tools:v0.1.23"), + KubeDNS: m("jianghang8421/k8s-dns-kube-dns-arm64:1.15.0"), + DNSmasq: m("jianghang8421/k8s-dns-dnsmasq-nanny-arm64:1.15.0"), + KubeDNSSidecar: m("jianghang8421/k8s-dns-sidecar-arm64:1.15.0"), + KubeDNSAutoscaler: m("jianghang8421/cluster-proportional-autoscaler-arm64:1.0.0"), + Flannel: m("jianghang8421/coreos-flannel-arm64:v0.10.0"), + FlannelCNI: m("jianghang8421/coreos-flannel-cni-arm64:v0.3.0"), + CalicoNode: m("quay.io/calico/node:v3.4.0"), + CalicoCNI: m("quay.io/calico/cni:v3.4.0"), + CalicoCtl: m("quay.io/calico/ctl:v2.0.0"), + CanalNode: m("quay.io/calico/node:v3.4.0"), + CanalCNI: m("quay.io/calico/cni:v3.4.0"), + CanalFlannel: m("quay.io/coreos/flannel:v0.10.0"), + WeaveNode: m("weaveworks/weave-kube:2.5.0"), + WeaveCNI: m("weaveworks/weave-npc:2.5.0"), + PodInfraContainer: m("jianghang8421/pause-arm64:3.1"), + Ingress: m("jianghang8421/nginx-ingress-controller:0.21.0-rancher1"), + IngressBackend: m("jianghang8421/nginx-ingress-controller-defaultbackend-arm64:1.4"), + MetricsServer: m("jianghang8421/metrics-server-arm64:v0.3.1"), + CoreDNS: m("coredns/coredns:1.2.6"), + CoreDNSAutoscaler: m("jianghang8421/cluster-proportional-autoscaler-arm64:1.0.0"), + }, + } +) + +func initArm64() { + if Arm64K8sVersionToRKESystemImages != nil { + panic("Do not initialize or add values to Arm64K8sVersionToRKESystemImages") + } + + Arm64K8sVersionToRKESystemImages = map[string]RKESystemImages{} + + for version, images := range AllArm64K8sVersions { + longName := "jianghang8421/hyperkube:" + version + if !strings.HasPrefix(longName, images.Kubernetes) { + panic(fmt.Sprintf("For K8s version %s, the Kubernetes image tag should be a substring of %s, currently it is %s", version, version, images.Kubernetes)) + } + } + + for _, latest := range Arm64K8sVersionsCurrent { + images, ok := AllArm64K8sVersions[latest] + if !ok { + panic("K8s version " + " is not found in AllArm64K8sVersions map") + } + Arm64K8sVersionToRKESystemImages[latest] = images + } + + if _, ok := Arm64K8sVersionToRKESystemImages[DefaultArm64K8s]; !ok { + panic("Default K8s version " + DefaultArm64K8s + " is not found in k8sVersionsCurrent list") + } +} diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go index ea8f2a7f9b6..3444f1cbbb8 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/k8s_defaults.go @@ -854,4 +854,5 @@ func init() { // init Windows versions initWindows() + initArm64() } diff --git a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go index 37fb32c6d48..bc8993fb1b2 100644 --- a/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go +++ b/vendor/github.com/rancher/types/apis/management.cattle.io/v3/rke_types.go @@ -27,6 +27,8 @@ type RancherKubernetesEngineConfig struct { IgnoreDockerVersion bool `yaml:"ignore_docker_version" json:"ignoreDockerVersion" norman:"default=true"` // Kubernetes version to use (if kubernetes image is specifed, image version takes precedence) Version string `yaml:"kubernetes_version" json:"kubernetesVersion,omitempty"` + // Kubernetes Architecture to use: now only support amd64 and arm64 + Architecture string `yaml:"architecture" json:"architecture,omitempty" norman:"default=amd64"` // List of private registries and their credentials PrivateRegistries []PrivateRegistry `yaml:"private_registries" json:"privateRegistries,omitempty"` // Ingress controller used in the cluster diff --git a/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster.go b/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster.go index e656665f4f1..7e7921c0028 100644 --- a/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster.go +++ b/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster.go @@ -13,6 +13,7 @@ const ( ClusterFieldAppliedEnableNetworkPolicy = "appliedEnableNetworkPolicy" ClusterFieldAppliedPodSecurityPolicyTemplateName = "appliedPodSecurityPolicyTemplateId" ClusterFieldAppliedSpec = "appliedSpec" + ClusterFieldArch = "arch" ClusterFieldAuthImage = "authImage" ClusterFieldCACert = "caCert" ClusterFieldCapabilities = "capabilities" @@ -59,6 +60,7 @@ type Cluster struct { AppliedEnableNetworkPolicy bool `json:"appliedEnableNetworkPolicy,omitempty" yaml:"appliedEnableNetworkPolicy,omitempty"` AppliedPodSecurityPolicyTemplateName string `json:"appliedPodSecurityPolicyTemplateId,omitempty" yaml:"appliedPodSecurityPolicyTemplateId,omitempty"` AppliedSpec *ClusterSpec `json:"appliedSpec,omitempty" yaml:"appliedSpec,omitempty"` + Arch string `json:"arch,omitempty" yaml:"arch,omitempty"` AuthImage string `json:"authImage,omitempty" yaml:"authImage,omitempty"` CACert string `json:"caCert,omitempty" yaml:"caCert,omitempty"` Capabilities *Capabilities `json:"capabilities,omitempty" yaml:"capabilities,omitempty"` diff --git a/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster_spec.go b/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster_spec.go index f633b87a6c0..33d25539396 100644 --- a/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster_spec.go +++ b/vendor/github.com/rancher/types/client/management/v3/zz_generated_cluster_spec.go @@ -3,6 +3,7 @@ package client const ( ClusterSpecType = "clusterSpec" ClusterSpecFieldAmazonElasticContainerServiceConfig = "amazonElasticContainerServiceConfig" + ClusterSpecFieldArch = "arch" ClusterSpecFieldAzureKubernetesServiceConfig = "azureKubernetesServiceConfig" ClusterSpecFieldDefaultClusterRoleForProjectMembers = "defaultClusterRoleForProjectMembers" ClusterSpecFieldDefaultPodSecurityPolicyTemplateID = "defaultPodSecurityPolicyTemplateId" @@ -24,6 +25,7 @@ const ( type ClusterSpec struct { AmazonElasticContainerServiceConfig map[string]interface{} `json:"amazonElasticContainerServiceConfig,omitempty" yaml:"amazonElasticContainerServiceConfig,omitempty"` + Arch string `json:"arch,omitempty" yaml:"arch,omitempty"` AzureKubernetesServiceConfig map[string]interface{} `json:"azureKubernetesServiceConfig,omitempty" yaml:"azureKubernetesServiceConfig,omitempty"` DefaultClusterRoleForProjectMembers string `json:"defaultClusterRoleForProjectMembers,omitempty" yaml:"defaultClusterRoleForProjectMembers,omitempty"` DefaultPodSecurityPolicyTemplateID string `json:"defaultPodSecurityPolicyTemplateId,omitempty" yaml:"defaultPodSecurityPolicyTemplateId,omitempty"` diff --git a/vendor/github.com/rancher/types/client/management/v3/zz_generated_rancher_kubernetes_engine_config.go b/vendor/github.com/rancher/types/client/management/v3/zz_generated_rancher_kubernetes_engine_config.go index 9774086af19..8281224b017 100644 --- a/vendor/github.com/rancher/types/client/management/v3/zz_generated_rancher_kubernetes_engine_config.go +++ b/vendor/github.com/rancher/types/client/management/v3/zz_generated_rancher_kubernetes_engine_config.go @@ -5,6 +5,7 @@ const ( RancherKubernetesEngineConfigFieldAddonJobTimeout = "addonJobTimeout" RancherKubernetesEngineConfigFieldAddons = "addons" RancherKubernetesEngineConfigFieldAddonsInclude = "addonsInclude" + RancherKubernetesEngineConfigFieldArchitecture = "architecture" RancherKubernetesEngineConfigFieldAuthentication = "authentication" RancherKubernetesEngineConfigFieldAuthorization = "authorization" RancherKubernetesEngineConfigFieldBastionHost = "bastionHost" @@ -31,6 +32,7 @@ type RancherKubernetesEngineConfig struct { AddonJobTimeout int64 `json:"addonJobTimeout,omitempty" yaml:"addonJobTimeout,omitempty"` Addons string `json:"addons,omitempty" yaml:"addons,omitempty"` AddonsInclude []string `json:"addonsInclude,omitempty" yaml:"addonsInclude,omitempty"` + Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"` Authentication *AuthnConfig `json:"authentication,omitempty" yaml:"authentication,omitempty"` Authorization *AuthzConfig `json:"authorization,omitempty" yaml:"authorization,omitempty"` BastionHost *BastionHost `json:"bastionHost,omitempty" yaml:"bastionHost,omitempty"`