Skip to content

Commit 8e66d97

Browse files
committed
Upgrade kuberntes to v1.8.0
1 parent ffbfc60 commit 8e66d97

File tree

12 files changed

+85
-76
lines changed

12 files changed

+85
-76
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ANSIBLE_VERSION = 2.3.0.0
1818
PROVISIONER_VERSION = v1.5.0
1919
KUBERANG_VERSION = v1.2.1
2020
GO_VERSION = 1.8.0
21-
KUBECTL_VERSION = v1.7.4
21+
KUBECTL_VERSION = v1.8.0
2222
HELM_VERSION = v2.5.1
2323

2424
ifeq ($(origin GLIDE_GOOS), undefined)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ KET operational tools include:
2929
## Components
3030
| Component | Version |
3131
| --- | --- |
32-
| Kubernetes | v1.7.4 |
32+
| Kubernetes | v1.8.0 |
3333
| Docker | v1.12.6 |
3434
| Etcd (for Kubernetes) | v3.1.10 |
3535
| Etcd (for Calico & Contiv) | v3.1.10 |

ansible/group_vars/all.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#===============================================================================
22
# VERSIONS
3-
kubernetes_yum_version: 1.7.4-0
4-
kubernetes_deb_version: 1.7.4-00
3+
kubernetes_yum_version: 1.8.0-0
4+
kubernetes_deb_version: 1.8.0-00
55
docker_engine_yum_version: 1.12.6-1.el7.centos
66
docker_engine_apt_version: 1.12.6-0~ubuntu-xenial
77
glusterfs_server_version_rhel: "3.8.15-2.el7"
@@ -151,17 +151,17 @@ kubernetes_certificates:
151151
service_account_key: "{{ kubernetes_certificates_dir }}/service-account-key.pem"
152152

153153
kubernetes_api_server_option_defaults:
154-
"admission-control": "NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota"
154+
"admission-control": "NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota,NodeRestriction"
155155
"advertise-address": "{{ internal_ipv4 }}"
156156
"allow-privileged": "true"
157157
"apiserver-count": "{{ kubernetes_master_apiserver_count }}"
158158
"anonymous-auth": "false"
159-
"authorization-mode": "RBAC,ABAC"
159+
"authorization-mode": "Node,RBAC,ABAC"
160160
"authorization-policy-file": "{{ kubernetes_authorization_policy_path }}"
161161
"basic-auth-file": "{{ kubernetes_basic_auth_path }}"
162162
"bind-address": "0.0.0.0"
163163
"client-ca-file": "{{ kubernetes_certificates.ca }}"
164-
"cloud-provider": "{{ cloud_provider | quote }}"
164+
"cloud-provider": "{{ cloud_provider }}"
165165
"cloud-config": "{{ cloud_config }}"
166166
"enable-swagger-ui": "true"
167167
"etcd-cafile": "{{ kubernetes_certificates.ca }}"

ansible/group_vars/container_images.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ official_images:
44
version: v3.1.10
55
kube_proxy:
66
name: gcr.io/google-containers/kube-proxy-amd64
7-
version: v1.7.4
7+
version: v1.8.0
88
kube_controller_manager:
99
name: gcr.io/google-containers/kube-controller-manager-amd64
10-
version: v1.7.4
10+
version: v1.8.0
1111
kube_scheduler:
1212
name: gcr.io/google-containers/kube-scheduler-amd64
13-
version: v1.7.4
13+
version: v1.8.0
1414
kube_apiserver:
1515
name: gcr.io/google-containers/kube-apiserver-amd64
16-
version: v1.7.4
16+
version: v1.8.0
1717
calico_node:
1818
name: calico/node
1919
version: v1.3.0

docs/packages.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ EOF'
3939
| Component | Install Command |
4040
| ---- | ---- |
4141
| Etcd Node | `sudo yum -y install docker-engine-1.12.6-1.el7.centos` |
42-
| Kubernetes Node | `sudo yum -y install docker-engine-1.12.6-1.el7.centos nfs-utils kubelet-1.7.4-0 kubectl-1.7.4-0` |
42+
| Kubernetes Node | `sudo yum -y install docker-engine-1.12.6-1.el7.centos nfs-utils kubelet-1.8.0-0 kubectl-1.8.0-0` |
4343

4444
## Installing via DEB (Ubuntu Xenial)
4545

@@ -90,7 +90,7 @@ sudo apt-get update
9090
| Component | Install Command |
9191
| ---- | ---- |
9292
| Etcd Node | `sudo apt-get install -y docker-engine=1.12.6-0~ubuntu-xenial` |
93-
| Kubernetes Node | `sudo apt-get install -y docker-engine=1.12.6-0~ubuntu-xenial nfs-common kubelet=1.7.4-00 kubectl=1.7.4-00` |
93+
| Kubernetes Node | `sudo apt-get install -y docker-engine=1.12.6-0~ubuntu-xenial nfs-common kubelet=1.8.0-00 kubectl=1.8.0-00` |
9494

9595
#### Stop the kubelet
9696
When the Ubuntu kubelet package is installed the service will be started and will bind to ports. This will cause some preflight port checks to fail.

docs/provision.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ If you are building a large cluster or one that won't have access to these repos
123123
<td></td>
124124
</tr>
125125
<tr>
126-
<td>Kismatic package of Kubernetes kubelet 1.7.4</td>
126+
<td>Kismatic package of Kubernetes kubelet 1.8.0</td>
127127
<td>Kubernetes</td>
128128
<td></td>
129129
<td>yes</td>
130130
<td>yes</td>
131131
</tr>
132132
<tr>
133-
<td>Kismatic package of Kubernetes kubectl 1.7.4</td>
133+
<td>Kismatic package of Kubernetes kubectl 1.8.0</td>
134134
<td>Kubernetes</td>
135135
<td></td>
136136
<td>yes</td>

integration/aws/client.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (c *Client) prepareSession() error {
106106

107107
// CreateNode is for creating a machine on AWS using the given AMI and InstanceType.
108108
// Returns the ID of the newly created machine.
109-
func (c Client) CreateNode(ami AMI, instanceType InstanceType, addBlockDevice bool) (string, error) {
109+
func (c Client) CreateNode(ami AMI, instanceType InstanceType, addBlockDevice bool, customTags map[string]string) (string, error) {
110110
api, err := c.getEC2APIClient()
111111
if err != nil {
112112
return "", err
@@ -181,6 +181,11 @@ func (c Client) CreateNode(ami AMI, instanceType InstanceType, addBlockDevice bo
181181
},
182182
},
183183
}
184+
if customTags != nil {
185+
for k, v := range customTags {
186+
tagReq.Tags = append(tagReq.Tags, &ec2.Tag{Key: aws.String(k), Value: aws.String(v)})
187+
}
188+
}
184189
err = retry.WithBackoff(func() error {
185190
var err2 error
186191
_, err2 = api.CreateTags(tagReq)

integration/aws/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestClient(t *testing.T) {
2727
},
2828
}
2929
fmt.Println("Creating node")
30-
nodeID, err := c.CreateNode(Ubuntu1604LTSEast, T2Micro)
30+
nodeID, err := c.CreateNode(Ubuntu1604LTSEast, T2Micro, nil)
3131
if err != nil {
3232
t.Fatalf("Failed to create node: %v", err)
3333
}

integration/packet/node.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type Node struct {
3737
}
3838

3939
// CreateNode creates a node in packet with the given hostname and OS
40-
func (c Client) CreateNode(hostname string, os OS) (*Node, error) {
40+
func (c Client) CreateNode(hostname string, os OS, _ map[string]string) (*Node, error) {
4141
device := &packngo.DeviceCreateRequest{
4242
HostName: hostname,
4343
OS: string(os),

integration/prepare.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ EOF`
5252
moveGlusterRepoFileYum = `sudo mv /tmp/gluster.repo /etc/yum.repos.d`
5353

5454
installDockerYum = `sudo yum -y install docker-engine-1.12.6-1.el7.centos`
55-
installKubeletYum = `sudo yum -y install kubelet-1.7.4-0`
55+
installKubeletYum = `sudo yum -y install kubelet-1.8.0-0`
5656
installNFSUtilsYum = `sudo yum -y install nfs-utils` // required for the kubelet
57-
installKubectlYum = `sudo yum -y install kubectl-1.7.4-0`
57+
installKubectlYum = `sudo yum -y install kubectl-1.8.0-0`
5858
installGlusterfsServerYum = `sudo yum -y install --nogpgcheck glusterfs-server-3.8.15-2.el7`
5959

6060
updateAptGet = `sudo apt-get update`
@@ -64,10 +64,10 @@ EOF`
6464

6565
addKubernetesRepoKeyApt = `wget -qO - https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -`
6666
addKubernetesRepoApt = `sudo add-apt-repository "deb https://packages.cloud.google.com/apt/ kubernetes-xenial main"`
67-
installKubeletApt = `sudo apt-get -y install kubelet=1.7.4-00`
67+
installKubeletApt = `sudo apt-get -y install kubelet=1.8.0-00`
6868
stopKubeletService = `sudo systemctl stop kubelet`
6969
installNFSCommonApt = `sudo apt-get -y install nfs-common`
70-
installKubectlApt = `sudo apt-get -y install kubectl=1.7.4-00`
70+
installKubectlApt = `sudo apt-get -y install kubectl=1.8.0-00`
7171

7272
addGlusterRepoApt = `sudo add-apt-repository -y ppa:gluster/glusterfs-3.8`
7373
installGlusterfsServerApt = `sudo apt-get -y install glusterfs-server=3.8.15-ubuntu1~xenial1`

integration/provision.go

+10-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package integration
22

33
import (
44
"fmt"
5+
"math/rand"
56
"os"
67
"path/filepath"
78
"time"
@@ -165,38 +166,41 @@ func (p awsProvisioner) ProvisionNodes(nodeCount NodeCount, distro linuxDistro,
165166
}
166167
}
167168

169+
// when AWS cloud-provider is enabled all nodes in a cluster must have a unique identifier,
170+
// set via kubernetes.io/cluster/$UNIQUE_ID EC2 tag
171+
uniqueTag := fmt.Sprintf("kubernetes.io/cluster/testcluster%d", rand.Intn(32767))
168172
provisioned := provisionedNodes{}
169173
var i uint16
170174
for i = 0; i < nodeCount.Etcd; i++ {
171-
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice)
175+
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice, map[string]string{uniqueTag: ""})
172176
if err != nil {
173177
return provisioned, err
174178
}
175179
provisioned.etcd = append(provisioned.etcd, NodeDeets{id: nodeID})
176180
}
177181
for i = 0; i < nodeCount.Master; i++ {
178-
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice)
182+
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice, map[string]string{uniqueTag: ""})
179183
if err != nil {
180184
return provisioned, err
181185
}
182186
provisioned.master = append(provisioned.master, NodeDeets{id: nodeID})
183187
}
184188
for i = 0; i < nodeCount.Worker; i++ {
185-
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice)
189+
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice, map[string]string{uniqueTag: ""})
186190
if err != nil {
187191
return provisioned, err
188192
}
189193
provisioned.worker = append(provisioned.worker, NodeDeets{id: nodeID})
190194
}
191195
for i = 0; i < nodeCount.Ingress; i++ {
192-
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice)
196+
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice, map[string]string{uniqueTag: ""})
193197
if err != nil {
194198
return provisioned, err
195199
}
196200
provisioned.ingress = append(provisioned.ingress, NodeDeets{id: nodeID})
197201
}
198202
for i = 0; i < nodeCount.Storage; i++ {
199-
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice)
203+
nodeID, err := p.client.CreateNode(ami, aws.T2Medium, addBlockDevice, map[string]string{uniqueTag: ""})
200204
if err != nil {
201205
return provisioned, err
202206
}
@@ -429,7 +433,7 @@ func (p packetProvisioner) RemoveDNS(dnsRecord *DNSRecord) error {
429433

430434
func (p packetProvisioner) createNode(distro packet.OS, count uint16) (string, error) {
431435
hostname := fmt.Sprintf("kismatic-integration-%d-%d", time.Now().UnixNano(), count)
432-
node, err := p.client.CreateNode(hostname, distro)
436+
node, err := p.client.CreateNode(hostname, distro, nil)
433437
if err != nil {
434438
return "", err
435439
}

0 commit comments

Comments
 (0)