Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Bump Kubernetes version to v1.11.3 (#1459)
Browse files Browse the repository at this point in the history
* Bump Kubernetes version to v1.11.3

* fix: remove rkt container runtime support

kubelet v1.11 does not already support flags necessary to the runtime. Without doing this, I was unable to start kubelets on kube-aws controller nodes

* fix calico-related CRDs installation

* serviceaccounts should be created before anything else

ref #1459 (comment)
  • Loading branch information
mumoshu authored Sep 30, 2018
1 parent e1d2772 commit c113c7e
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 101 deletions.
4 changes: 2 additions & 2 deletions contrib/bump-version
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

if [ $# -ne 1 ] || [ `expr $1 : ".*.*"` == 0 ]; then
echo "USAGE: $0 <target-version>"
echo " example: $0 'v1.10.5'"
echo " example: $0 'v1.11.3'"
exit 1
fi

# the version needs to be published, see https://quay.io/repository/coreos/hyperkube?tag=latest&tab=tags
CURRENT_VERSION=${CURRENT_VERSION:-"v1.10.5"}
CURRENT_VERSION=${CURRENT_VERSION:-"v1.11.3"}
TARGET_VERSION=${1}

CURRENT_VERSION_BASE=${CURRENT_VERSION%%_*}
Expand Down
2 changes: 1 addition & 1 deletion core/controlplane/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
)

const (
k8sVer = "v1.10.5"
k8sVer = "v1.11.3"

credentialsDir = "credentials"
userDataDir = "userdata"
Expand Down
8 changes: 4 additions & 4 deletions core/controlplane/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1503,10 +1503,10 @@ func TestInvalidKubernetesVersion(t *testing.T) {
kubernetesVersion: v1.x.3
`,
`
kubernetesVersion: v1.10.5yes
kubernetesVersion: v1.11.3yes
`,
`
kubernetesVersion: $v1.10.5
kubernetesVersion: $v1.11.3
`}

for _, testCase := range testCases {
Expand All @@ -1522,7 +1522,7 @@ kubernetesVersion: $v1.10.5
func TestValidKubernetesVersion(t *testing.T) {
testCases := []string{
`
kubernetesVersion: v1.10.5
kubernetesVersion: v1.11.3
`,
`
kubernetesVersion: v1.7.2
Expand Down Expand Up @@ -1557,7 +1557,7 @@ kubernetesVersion: v1.8.12
func TestApiServerLeaseEndpointReconcilerEnabled(t *testing.T) {
testCases := []string{
`
kubernetesVersion: v1.10.5
kubernetesVersion: v1.11.3
`,
`
kubernetesVersion: v1.10.2
Expand Down
64 changes: 7 additions & 57 deletions core/controlplane/config/templates/cloud-config-controller
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,6 @@ coreos:
Environment="RKT_RUN_ARGS={{.HyperkubeImage.Options}}\
--volume dns,kind=host,source=/etc/resolv.conf \
--mount volume=dns,target=/etc/resolv.conf \
{{ if eq .ContainerRuntime "rkt" -}}
--volume rkt,kind=host,source=/opt/bin/host-rkt \
--mount volume=rkt,target=/usr/bin/rkt \
--volume var-lib-rkt,kind=host,source=/var/lib/rkt \
--mount volume=var-lib-rkt,target=/var/lib/rkt \
--volume stage,kind=host,source=/tmp \
--mount volume=stage,target=/tmp \
{{ end -}}
--volume var-lib-cni,kind=host,source=/var/lib/cni \
--mount volume=var-lib-cni,target=/var/lib/cni \
--volume var-run-calico,kind=host,source=/var/run/calico \
Expand Down Expand Up @@ -335,8 +327,6 @@ coreos:
--cni-bin-dir=/opt/cni/bin \
--network-plugin={{.K8sNetworkPlugin}} \
--container-runtime={{.ContainerRuntime}} \
--rkt-path=/usr/bin/rkt \
--rkt-stage1-image=coreos.com/rkt/stage1-coreos \
--node-labels=node-role.kubernetes.io/master="",kubernetes.io/role=master,service-cidr={{ .ServiceCIDR | toLabel }}{{if .NodeLabels.Enabled}},{{.NodeLabels.String}}{{end}} \
--register-with-taints=node.alpha.kubernetes.io/role=master:NoSchedule \
--allow-privileged=true \
Expand Down Expand Up @@ -365,36 +355,6 @@ coreos:
command: start
enable: true

{{ if eq .ContainerRuntime "rkt" }}
- name: rkt-api.service
enable: true
content: |
[Unit]
Before=kubelet.service
[Service]
ExecStart=/usr/bin/rkt api-service
Restart=always
RestartSec=10
[Install]
RequiredBy=kubelet.service

- name: load-rkt-stage1.service
enable: true
content: |
[Unit]
Description=Load rkt stage1 images
Documentation=http://github.com/coreos/rkt
Requires=network-online.target
After=network-online.target
Before=rkt-api.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rkt fetch /usr/lib/rkt/stage1-images/stage1-coreos.aci /usr/lib/rkt/stage1-images/stage1-fly.aci --insecure-options=image
[Install]
RequiredBy=rkt-api.service
{{ end }}

- name: install-kube-system.service
command: start
runtime: true
Expand Down Expand Up @@ -514,8 +474,6 @@ coreos:
What=/dev/{{.Experimental.EphemeralImageStorage.Disk}}
{{if eq .ContainerRuntime "docker"}}
Where=/var/lib/docker
{{else if eq .ContainerRuntime "rkt"}}
Where=/var/lib/rkt
{{end}}
Type={{.Experimental.EphemeralImageStorage.Filesystem}}
{{end}}
Expand Down Expand Up @@ -868,6 +826,13 @@ write_files:
sleep 3
done

# Service Accounts
applyall \
"${mfdir}/heapster-sa.yaml" \
"${mfdir}/{{ .KubeDns.Provider }}-sa.yaml" \
"${mfdir}/kube-proxy-sa.yaml" \
{{ if .KubernetesDashboard.Enabled }}"${mfdir}/kubernetes-dashboard-sa.yaml"{{ end }}

{{if .Experimental.KIAMSupport.Enabled }}
kiam_tls_dir=/etc/kubernetes/ssl/kiam
vols="${vols} -v $kiam_tls_dir:$kiam_tls_dir"
Expand Down Expand Up @@ -937,13 +902,6 @@ write_files:
"${mfdir}"/{kube-proxy,heapster-config}"-cm.yaml" \
"${mfdir}/{{ .KubeDns.Provider }}-cm.yaml"

# Service Accounts
applyall \
"${mfdir}/heapster-sa.yaml" \
"${mfdir}/{{ .KubeDns.Provider }}-sa.yaml" \
"${mfdir}/kube-proxy-sa.yaml" \
{{ if .KubernetesDashboard.Enabled }}"${mfdir}/kubernetes-dashboard-sa.yaml"{{ end }}

{{ if eq .KubeDns.Provider "coredns" -}}
applyall \
"${mfdir}/coredns-cr.yaml" \
Expand Down Expand Up @@ -1665,7 +1623,6 @@ write_files:
---

apiVersion: apiextensions.k8s.io/v1beta1
description: Calico Felix Configuration
kind: CustomResourceDefinition
metadata:
name: felixconfigurations.crd.projectcalico.org
Expand All @@ -1681,7 +1638,6 @@ write_files:
---

apiVersion: apiextensions.k8s.io/v1beta1
description: Calico BGP Configuration
kind: CustomResourceDefinition
metadata:
name: bgpconfigurations.crd.projectcalico.org
Expand All @@ -1697,7 +1653,6 @@ write_files:
---

apiVersion: apiextensions.k8s.io/v1beta1
description: Calico IP Pools
kind: CustomResourceDefinition
metadata:
name: ippools.crd.projectcalico.org
Expand All @@ -1713,7 +1668,6 @@ write_files:
---

apiVersion: apiextensions.k8s.io/v1beta1
description: Calico Cluster Information
kind: CustomResourceDefinition
metadata:
name: clusterinformations.crd.projectcalico.org
Expand All @@ -1729,7 +1683,6 @@ write_files:
---

apiVersion: apiextensions.k8s.io/v1beta1
description: Calico Global Network Policies
kind: CustomResourceDefinition
metadata:
name: globalnetworkpolicies.crd.projectcalico.org
Expand All @@ -1745,7 +1698,6 @@ write_files:
---

apiVersion: apiextensions.k8s.io/v1beta1
description: Calico Network Policies
kind: CustomResourceDefinition
metadata:
name: networkpolicies.crd.projectcalico.org
Expand Down Expand Up @@ -2948,8 +2900,6 @@ write_files:
namespace: kube-system
labels:
k8s-app: kube-proxy
annotations:
rkt.alpha.kubernetes.io/stage1-name-override: coreos.com/rkt/stage1-fly
spec:
updateStrategy:
type: RollingUpdate
Expand Down
34 changes: 0 additions & 34 deletions core/nodepool/config/templates/cloud-config-worker
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ coreos:
--cni-bin-dir=/opt/cni/bin \
--network-plugin={{.K8sNetworkPlugin}} \
--container-runtime={{.ContainerRuntime}} \
--rkt-path=/usr/bin/rkt \
--rkt-stage1-image=coreos.com/rkt/stage1-coreos \
--node-labels=kubernetes.io/role=node,node-role.kubernetes.io/node="",node-role.kubernetes.io/{{ toLabel .NodePoolName }}=""{{if .NodeLabels.Enabled}},{{.NodeLabels.String}}{{end}} \
--register-node=true \
{{if .Taints}}--register-with-taints={{.Taints.String}}\
Expand Down Expand Up @@ -393,36 +391,6 @@ coreos:
command: start
enable: true

{{ if eq .ContainerRuntime "rkt" }}
- name: rkt-api.service
enable: true
content: |
[Unit]
Before=kubelet.service
[Service]
ExecStart=/usr/bin/rkt api-service
Restart=always
RestartSec=10
[Install]
RequiredBy=kubelet.service

- name: load-rkt-stage1.service
enable: true
content: |
[Unit]
Description=Load rkt stage1 images
Documentation=http://github.com/coreos/rkt
Requires=network-online.target
After=network-online.target
Before=rkt-api.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rkt fetch /usr/lib/rkt/stage1-images/stage1-coreos.aci /usr/lib/rkt/stage1-images/stage1-fly.aci --insecure-options=image
[Install]
RequiredBy=rkt-api.service
{{ end }}

{{if .AwsEnvironment.Enabled}}
- name: set-aws-environment.service
enable: true
Expand Down Expand Up @@ -563,8 +531,6 @@ coreos:
What=/dev/{{.Experimental.EphemeralImageStorage.Disk}}
{{if eq .ContainerRuntime "docker"}}
Where=/var/lib/docker
{{else if eq .ContainerRuntime "rkt"}}
Where=/var/lib/rkt
{{end}}
Type={{.Experimental.EphemeralImageStorage.Filesystem}}
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion core/root/config/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ worker:
# and pulling from quay or dockerhub is slow and you get many timeouts.

# Version of hyperkube image to use. This is the tag for the hyperkube image repository.
# kubernetesVersion: v1.10.5
# kubernetesVersion: v1.11.3

# Hyperkube image repository to use.
# hyperkubeImage:
Expand Down
2 changes: 1 addition & 1 deletion e2e/kubernetes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.8.3

ARG KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.10.5}
ARG KUBERNETES_VERSION=${KUBERNETES_VERSION:-v1.11.3}

RUN apt-get update && \
apt-get install -y rsync && \
Expand Down
2 changes: 1 addition & 1 deletion e2e/kubernetes/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KUBERNETES_VERSION ?= v1.10.5
KUBERNETES_VERSION ?= v1.11.3
DOCKER_REPO ?=
DOCKER_TAG ?= $(DOCKER_REPO)kube-e2e:$(KUBERNETES_VERSION)
DOCKER_TAG_SANITIZED ?= $(shell echo $(DOCKER_TAG) | sed -e 's/+/_/')
Expand Down

2 comments on commit c113c7e

@davidmccormick
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - great to see k8s being bumped forward!

@mumoshu
Copy link
Contributor Author

@mumoshu mumoshu commented on c113c7e Oct 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for reviewing!

Please sign in to comment.