diff --git a/hack/machine_types/vpc_ip_resource_limit.go b/hack/machine_types/vpc_ip_resource_limit.go index 6a74ba5fe28df..0cca550890aeb 100644 --- a/hack/machine_types/vpc_ip_resource_limit.go +++ b/hack/machine_types/vpc_ip_resource_limit.go @@ -200,6 +200,13 @@ var InstanceENIsAvailable = map[string]int{ "t3.large": 3, "t3.xlarge": 4, "t3.2xlarge": 4, + "t3a.nano": 2, + "t3a.micro": 2, + "t3a.small": 3, + "t3a.medium": 3, + "t3a.large": 3, + "t3a.xlarge": 4, + "t3a.2xlarge": 4, "u-6tb1.metal": 5, "u-9tb1.metal": 5, "u-12tb1.metal": 5, @@ -391,6 +398,13 @@ var InstanceIPsAvailable = map[string]int64{ "t3.large": 12, "t3.xlarge": 15, "t3.2xlarge": 15, + "t3a.nano": 2, + "t3a.micro": 2, + "t3a.small": 4, + "t3a.medium": 6, + "t3a.large": 12, + "t3a.xlarge": 15, + "t3a.2xlarge": 15, "u-6tb1.metal": 30, "u-9tb1.metal": 30, "u-12tb1.metal": 30, diff --git a/pkg/apis/kops/networking.go b/pkg/apis/kops/networking.go index 25d588f9adb91..1a866672e8535 100644 --- a/pkg/apis/kops/networking.go +++ b/pkg/apis/kops/networking.go @@ -110,6 +110,8 @@ type CanalNetworkingSpec struct { // LogSeveritySys the severity to set for logs which are sent to syslog // Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE) LogSeveritySys string `json:"logSeveritySys,omitempty"` + // MTU to be set in the cni-network-config (default: 1500) + MTU *int32 `json:"mtu,omitempty"` // PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"` // PrometheusMetricsEnabled can be set to enable the experimental Prometheus diff --git a/pkg/apis/kops/v1alpha1/networking.go b/pkg/apis/kops/v1alpha1/networking.go index bfbbe1aa4864b..8a866fae0cba9 100644 --- a/pkg/apis/kops/v1alpha1/networking.go +++ b/pkg/apis/kops/v1alpha1/networking.go @@ -110,6 +110,8 @@ type CanalNetworkingSpec struct { // LogSeveritySys the severity to set for logs which are sent to syslog // Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE) LogSeveritySys string `json:"logSeveritySys,omitempty"` + // MTU to be set in the cni-network-config (default: 1500) + MTU *int32 `json:"mtu,omitempty"` // PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"` // PrometheusMetricsEnabled can be set to enable the experimental Prometheus diff --git a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go index 1affa37754c6c..22997969f4681 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go @@ -1129,6 +1129,7 @@ func autoConvert_v1alpha1_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *Ca out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction out.DisableFlannelForwardRules = in.DisableFlannelForwardRules out.LogSeveritySys = in.LogSeveritySys + out.MTU = in.MTU out.PrometheusGoMetricsEnabled = in.PrometheusGoMetricsEnabled out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled out.PrometheusMetricsPort = in.PrometheusMetricsPort @@ -1146,6 +1147,7 @@ func autoConvert_kops_CanalNetworkingSpec_To_v1alpha1_CanalNetworkingSpec(in *ko out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction out.DisableFlannelForwardRules = in.DisableFlannelForwardRules out.LogSeveritySys = in.LogSeveritySys + out.MTU = in.MTU out.PrometheusGoMetricsEnabled = in.PrometheusGoMetricsEnabled out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled out.PrometheusMetricsPort = in.PrometheusMetricsPort diff --git a/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go index b273b931bd284..13843d2fc861e 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go @@ -285,6 +285,11 @@ func (in *CalicoNetworkingSpec) DeepCopy() *CalicoNetworkingSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CanalNetworkingSpec) DeepCopyInto(out *CanalNetworkingSpec) { *out = *in + if in.MTU != nil { + in, out := &in.MTU, &out.MTU + *out = new(int32) + **out = **in + } return } @@ -2563,7 +2568,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) { if in.Canal != nil { in, out := &in.Canal, &out.Canal *out = new(CanalNetworkingSpec) - **out = **in + (*in).DeepCopyInto(*out) } if in.Kuberouter != nil { in, out := &in.Kuberouter, &out.Kuberouter diff --git a/pkg/apis/kops/v1alpha2/networking.go b/pkg/apis/kops/v1alpha2/networking.go index 6d7d180f8ed7d..f31cb4bedaeaf 100644 --- a/pkg/apis/kops/v1alpha2/networking.go +++ b/pkg/apis/kops/v1alpha2/networking.go @@ -110,6 +110,8 @@ type CanalNetworkingSpec struct { // LogSeveritySys the severity to set for logs which are sent to syslog // Default: INFO (other options: DEBUG, WARNING, ERROR, CRITICAL, NONE) LogSeveritySys string `json:"logSeveritySys,omitempty"` + // MTU to be set in the cni-network-config (default: 1500) + MTU *int32 `json:"mtu,omitempty"` // PrometheusGoMetricsEnabled enables Prometheus Go runtime metrics collection PrometheusGoMetricsEnabled bool `json:"prometheusGoMetricsEnabled,omitempty"` // PrometheusMetricsEnabled can be set to enable the experimental Prometheus diff --git a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go index a4156c13edb77..932a8e96a7b7b 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go @@ -1171,6 +1171,7 @@ func autoConvert_v1alpha2_CanalNetworkingSpec_To_kops_CanalNetworkingSpec(in *Ca out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction out.DisableFlannelForwardRules = in.DisableFlannelForwardRules out.LogSeveritySys = in.LogSeveritySys + out.MTU = in.MTU out.PrometheusGoMetricsEnabled = in.PrometheusGoMetricsEnabled out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled out.PrometheusMetricsPort = in.PrometheusMetricsPort @@ -1188,6 +1189,7 @@ func autoConvert_kops_CanalNetworkingSpec_To_v1alpha2_CanalNetworkingSpec(in *ko out.DefaultEndpointToHostAction = in.DefaultEndpointToHostAction out.DisableFlannelForwardRules = in.DisableFlannelForwardRules out.LogSeveritySys = in.LogSeveritySys + out.MTU = in.MTU out.PrometheusGoMetricsEnabled = in.PrometheusGoMetricsEnabled out.PrometheusMetricsEnabled = in.PrometheusMetricsEnabled out.PrometheusMetricsPort = in.PrometheusMetricsPort diff --git a/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go index ab45d00f63f69..d661f07ac5fd9 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go @@ -259,6 +259,11 @@ func (in *CalicoNetworkingSpec) DeepCopy() *CalicoNetworkingSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CanalNetworkingSpec) DeepCopyInto(out *CanalNetworkingSpec) { *out = *in + if in.MTU != nil { + in, out := &in.MTU, &out.MTU + *out = new(int32) + **out = **in + } return } @@ -2634,7 +2639,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) { if in.Canal != nil { in, out := &in.Canal, &out.Canal *out = new(CanalNetworkingSpec) - **out = **in + (*in).DeepCopyInto(*out) } if in.Kuberouter != nil { in, out := &in.Kuberouter, &out.Kuberouter diff --git a/pkg/apis/kops/zz_generated.deepcopy.go b/pkg/apis/kops/zz_generated.deepcopy.go index 3f52e45e1e1ef..6e87994282110 100644 --- a/pkg/apis/kops/zz_generated.deepcopy.go +++ b/pkg/apis/kops/zz_generated.deepcopy.go @@ -275,6 +275,11 @@ func (in *CalicoNetworkingSpec) DeepCopy() *CalicoNetworkingSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CanalNetworkingSpec) DeepCopyInto(out *CanalNetworkingSpec) { *out = *in + if in.MTU != nil { + in, out := &in.MTU, &out.MTU + *out = new(int32) + **out = **in + } return } @@ -2832,7 +2837,7 @@ func (in *NetworkingSpec) DeepCopyInto(out *NetworkingSpec) { if in.Canal != nil { in, out := &in.Canal, &out.Canal *out = new(CanalNetworkingSpec) - **out = **in + (*in).DeepCopyInto(*out) } if in.Kuberouter != nil { in, out := &in.Kuberouter, &out.Kuberouter diff --git a/pkg/model/openstackmodel/firewall.go b/pkg/model/openstackmodel/firewall.go index 7f5cb37e84c62..8282ec055b7d4 100644 --- a/pkg/model/openstackmodel/firewall.go +++ b/pkg/model/openstackmodel/firewall.go @@ -21,6 +21,7 @@ import ( "k8s.io/kops/pkg/apis/kops" "k8s.io/kops/upup/pkg/fi" "k8s.io/kops/upup/pkg/fi/cloudup/openstacktasks" + //TODO: Replace with klog "github.com/golang/glog" "k8s.io/kops/pkg/dns" diff --git a/upup/models/cloudup/resources/addons/networking.projectcalico.org.canal/k8s-1.12.yaml.template b/upup/models/cloudup/resources/addons/networking.projectcalico.org.canal/k8s-1.12.yaml.template index e68f5e2a34b41..483701757b80a 100644 --- a/upup/models/cloudup/resources/addons/networking.projectcalico.org.canal/k8s-1.12.yaml.template +++ b/upup/models/cloudup/resources/addons/networking.projectcalico.org.canal/k8s-1.12.yaml.template @@ -1,8 +1,8 @@ -# Canal Version v3.5.0 -# https://docs.projectcalico.org/v3.5/releases#v3.5.0 +# Canal Version v3.6.1 +# https://docs.projectcalico.org/v3.6/release-notes/#v361 # This manifest includes the following component versions: -# calico/node:v3.5.0 -# calico/cni:v3.5.0 +# calico/node:v3.6.1 +# calico/cni:v3.6.1 # coreos/flannel:v0.11.0 # This ConfigMap is used to configure a self-hosted Canal installation. @@ -23,6 +23,9 @@ data: # the pod network. masquerade: "true" + # MTU default is 1500, can be overridden + veth_mtu: "{{- or .Networking.Canal.MTU "1500" }}" + # The CNI network configuration to install on each node. The special # values in this config will be automatically populated. cni_network_config: |- @@ -34,6 +37,7 @@ data: "type": "calico", "log_level": "info", "datastore_type": "kubernetes", + "mtu": __CNI_MTU__, "nodename": "__KUBERNETES_NODE_NAME__", "ipam": { "type": "host-local", @@ -115,12 +119,18 @@ spec: # This container installs the Calico CNI binaries # and CNI network config file on each node. - name: install-cni - image: calico/cni:v3.5.0 + image: calico/cni:v3.6.1 command: ["/install-cni.sh"] env: # Name of the CNI config file to create. - name: CNI_CONF_NAME value: "10-canal.conflist" + # CNI MTU Config variable + - name: CNI_MTU + valueFrom: + configMapKeyRef: + name: canal-config + key: veth_mtu # The CNI network config to install on each node. - name: CNI_NETWORK_CONFIG valueFrom: @@ -145,7 +155,7 @@ spec: # container programs network policy and routes on each # host. - name: calico-node - image: calico/node:v3.5.0 + image: calico/node:v3.6.1 env: # Use Kubernetes API as the backing datastore. - name: DATASTORE_TYPE @@ -173,6 +183,11 @@ spec: # Disable file logging so `kubectl logs` works. - name: CALICO_DISABLE_FILE_LOGGING value: "true" + - name: FELIX_IPINIPMTU + valueFrom: + configMapKeyRef: + name: canal-config + key: veth_mtu # Disable IPv6 on Kubernetes. - name: FELIX_IPV6SUPPORT value: "false" @@ -367,6 +382,7 @@ rules: - globalbgpconfigs - bgpconfigurations - ippools + - ipamblocks - globalnetworkpolicies - globalnetworksets - networkpolicies diff --git a/upup/pkg/fi/cloudup/awsup/machine_types.go b/upup/pkg/fi/cloudup/awsup/machine_types.go index 5ab75f73878fb..dc5da9c9dafd5 100644 --- a/upup/pkg/fi/cloudup/awsup/machine_types.go +++ b/upup/pkg/fi/cloudup/awsup/machine_types.go @@ -1826,6 +1826,84 @@ var MachineTypes []AWSMachineTypeInfo = []AWSMachineTypeInfo{ Burstable: true, }, + // t3a family + { + Name: "t3a.nano", + MemoryGB: 0.5, + ECU: 0 * BurstableCreditsToECUS, + Cores: 2, + InstanceENIs: 2, + InstanceIPsPerENI: 2, + EphemeralDisks: nil, + Burstable: true, + }, + + { + Name: "t3a.micro", + MemoryGB: 1, + ECU: 0 * BurstableCreditsToECUS, + Cores: 2, + InstanceENIs: 2, + InstanceIPsPerENI: 2, + EphemeralDisks: nil, + Burstable: true, + }, + + { + Name: "t3a.small", + MemoryGB: 2, + ECU: 0 * BurstableCreditsToECUS, + Cores: 2, + InstanceENIs: 3, + InstanceIPsPerENI: 4, + EphemeralDisks: nil, + Burstable: true, + }, + + { + Name: "t3a.medium", + MemoryGB: 4, + ECU: 0 * BurstableCreditsToECUS, + Cores: 2, + InstanceENIs: 3, + InstanceIPsPerENI: 6, + EphemeralDisks: nil, + Burstable: true, + }, + + { + Name: "t3a.large", + MemoryGB: 8, + ECU: 0 * BurstableCreditsToECUS, + Cores: 2, + InstanceENIs: 3, + InstanceIPsPerENI: 12, + EphemeralDisks: nil, + Burstable: true, + }, + + { + Name: "t3a.xlarge", + MemoryGB: 16, + ECU: 0 * BurstableCreditsToECUS, + Cores: 4, + InstanceENIs: 4, + InstanceIPsPerENI: 15, + EphemeralDisks: nil, + Burstable: true, + }, + + { + Name: "t3a.2xlarge", + MemoryGB: 32, + ECU: 0 * BurstableCreditsToECUS, + Cores: 8, + InstanceENIs: 4, + InstanceIPsPerENI: 15, + EphemeralDisks: nil, + Burstable: true, + }, + // x1 family { Name: "x1.16xlarge", diff --git a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go index 28c9d2c757ddc..77fd6c579d218 100644 --- a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go +++ b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go @@ -893,13 +893,12 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri if b.cluster.Spec.Networking.Canal != nil { key := "networking.projectcalico.org.canal" - // 2.6.3-kops.1 = 2.6.2 with kops manifest tweaks. This should go away with the next version bump. versions := map[string]string{ "pre-k8s-1.6": "2.4.2-kops.2", "k8s-1.6": "2.4.2-kops.2", "k8s-1.8": "2.6.7-kops.3", "k8s-1.9": "3.2.3-kops.1", - "k8s-1.12": "3.5.0", + "k8s-1.12": "3.6.1", } { id := "pre-k8s-1.6" diff --git a/upup/pkg/fi/cloudup/openstacktasks/lb.go b/upup/pkg/fi/cloudup/openstacktasks/lb.go index 355a9416ffe56..77d4dbb50d401 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/lb.go +++ b/upup/pkg/fi/cloudup/openstacktasks/lb.go @@ -18,9 +18,10 @@ package openstacktasks import ( "fmt" - "github.com/gophercloud/gophercloud/openstack/networking/v2/ports" "time" + "github.com/gophercloud/gophercloud/openstack/networking/v2/ports" + "github.com/golang/glog" "github.com/gophercloud/gophercloud" "github.com/gophercloud/gophercloud/openstack/loadbalancer/v2/loadbalancers"