From 20e867e822ce6f7a61b9a85cc8267076422247bb Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 29 Mar 2017 21:58:18 -0400 Subject: [PATCH 1/2] Bump alpha channel: 1.5.6, and 1.6.0 for kops 1.6 --- channels/alpha | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/channels/alpha b/channels/alpha index 7983f85c75..4e9856e242 100644 --- a/channels/alpha +++ b/channels/alpha @@ -10,17 +10,21 @@ spec: - providerID: gce name: "cos-cloud/cos-stable-56-9000-84-2" cluster: - kubernetesVersion: v1.5.4 + kubernetesVersion: v1.5.6 networking: kubenet: {} kubernetesVersions: - range: ">=1.5.0" - recommendedVersion: 1.5.4 + recommendedVersion: 1.5.6 requiredVersion: 1.5.1 - range: "<1.5.0" recommendedVersion: 1.4.9 requiredVersion: 1.4.2 kopsVersions: + - range: ">=1.6.0-alpha.1" + #recommendedVersion: 1.6.0 + #requiredVersion: 1.6.0 + kubernetesVersion: 1.6.0 - range: ">=1.5.0-alpha1" recommendedVersion: 1.5.1 #requiredVersion: 1.5.1 From 5a539882b003f5f63d5efbab330f026db95d508e Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Thu, 30 Mar 2017 01:08:55 -0400 Subject: [PATCH 2/2] Version updates for kops 1.6.0-alpha.1 --- Makefile | 15 +- docs/development/release.md | 7 +- ....2.yaml.template => k8s-1.5.yaml.template} | 6 +- ....0.yaml.template => k8s-1.6.yaml.template} | 6 +- ....1.yaml.template => k8s-1.5.yaml.template} | 0 ....0.yaml.template => k8s-1.6.yaml.template} | 0 .../v1.4.0.yaml.template | 151 ------------------ .../{v1.5.0.yaml => v1.6.0.yaml} | 17 +- .../pkg/fi/cloudup/bootstrapchannelbuilder.go | 16 +- .../kopeio-vxlan/manifest.yaml | 11 +- .../simple/manifest.yaml | 10 +- 11 files changed, 55 insertions(+), 184 deletions(-) rename upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/{v1.5.2.yaml.template => k8s-1.5.yaml.template} (91%) rename upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/{v1.6.0.yaml.template => k8s-1.6.yaml.template} (95%) rename upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/{v1.5.1.yaml.template => k8s-1.5.yaml.template} (100%) rename upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/{v1.6.0.yaml.template => k8s-1.6.yaml.template} (100%) delete mode 100644 upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.4.0.yaml.template rename upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/{v1.5.0.yaml => v1.6.0.yaml} (58%) diff --git a/Makefile b/Makefile index 1ad8ca9f83..14caa597ab 100644 --- a/Makefile +++ b/Makefile @@ -29,10 +29,10 @@ GOVERSION=1.7.4 MAKEDIR:=$(strip $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")) # Keep in sync with upup/models/cloudup/resources/addons/dns-controller/ -DNS_CONTROLLER_TAG=1.5.2 +DNS_CONTROLLER_TAG=1.6.0 -KOPS_RELEASE_VERSION=1.5.3 -KOPS_CI_VERSION=1.6.0-alpha.0 +KOPS_RELEASE_VERSION=1.6.0-alpha.1 +KOPS_CI_VERSION=1.6.0-alpha.2 GITSHA := $(shell cd ${GOPATH_1ST}/src/k8s.io/kops; git describe --always) @@ -326,6 +326,15 @@ channels: channels-gocode channels-gocode: go install ${EXTRA_BUILDFLAGS} -ldflags "-X k8s.io/kops.Version=${VERSION} ${EXTRA_LDFLAGS}" k8s.io/kops/channels/cmd/channels +# -------------------------------------------------- +# release tasks + +release-tag: + git tag ${KOPS_RELEASE_VERSION} + +release-github: + shipbot -tag ${KOPS_RELEASE_VERSION} + # -------------------------------------------------- # API / embedding examples diff --git a/docs/development/release.md b/docs/development/release.md index 34cca365b6..5690c16331 100644 --- a/docs/development/release.md +++ b/docs/development/release.md @@ -48,7 +48,7 @@ make ci ## Push new dns-controller image if needed ``` -make dns-controller-push DNS_CONTROLLER_TAG=1.5.1 DOCKER_REGISTRY=kope +make dns-controller-push DOCKER_REGISTRY=kope ``` ## Upload new version @@ -63,8 +63,7 @@ make upload S3_BUCKET=s3://kubeupv2 Make sure you are on the release branch `git checkout release-1.X` ``` -export TAG=1.5.0-alpha4 -git tag ${TAG} +make release-tag git push --tags ``` @@ -80,7 +79,7 @@ versions to that. Manually create a release on github & upload, but soon we'll publish shipbot which automates this... ``` -bazel run //cmd/shipbot -- -tag ${TAG} +make release-github ``` diff --git a/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/v1.5.2.yaml.template b/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/k8s-1.5.yaml.template similarity index 91% rename from upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/v1.5.2.yaml.template rename to upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/k8s-1.5.yaml.template index ad62255d08..ea48c16ef5 100644 --- a/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/v1.5.2.yaml.template +++ b/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/k8s-1.5.yaml.template @@ -6,7 +6,7 @@ metadata: labels: k8s-addon: dns-controller.addons.k8s.io k8s-app: dns-controller - version: v1.5.2 + version: v1.6.0 spec: replicas: 1 selector: @@ -17,7 +17,7 @@ spec: labels: k8s-addon: dns-controller.addons.k8s.io k8s-app: dns-controller - version: v1.5.2 + version: v1.6.0 annotations: scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/tolerations: '[{"key": "dedicated", "value": "master"}]' @@ -28,7 +28,7 @@ spec: hostNetwork: true containers: - name: dns-controller - image: kope/dns-controller:1.5.2 + image: kope/dns-controller:1.6.0 command: {{ range $arg := DnsControllerArgv }} - "{{ $arg }}" diff --git a/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/v1.6.0.yaml.template b/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/k8s-1.6.yaml.template similarity index 95% rename from upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/v1.6.0.yaml.template rename to upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/k8s-1.6.yaml.template index 8740635ce4..fcb0dfd847 100644 --- a/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/v1.6.0.yaml.template +++ b/upup/models/cloudup/resources/addons/dns-controller.addons.k8s.io/k8s-1.6.yaml.template @@ -6,7 +6,7 @@ metadata: labels: k8s-addon: dns-controller.addons.k8s.io k8s-app: dns-controller - version: v1.5.2 + version: v1.6.0 spec: replicas: 1 selector: @@ -17,7 +17,7 @@ spec: labels: k8s-addon: dns-controller.addons.k8s.io k8s-app: dns-controller - version: v1.5.2 + version: v1.6.0 annotations: scheduler.alpha.kubernetes.io/critical-pod: '' spec: @@ -31,7 +31,7 @@ spec: serviceAccount: dns-controller containers: - name: dns-controller - image: kope/dns-controller:1.5.2 + image: kope/dns-controller:1.6.0 command: {{ range $arg := DnsControllerArgv }} - "{{ $arg }}" diff --git a/upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.5.1.yaml.template b/upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/k8s-1.5.yaml.template similarity index 100% rename from upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.5.1.yaml.template rename to upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/k8s-1.5.yaml.template diff --git a/upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.6.0.yaml.template b/upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/k8s-1.6.yaml.template similarity index 100% rename from upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.6.0.yaml.template rename to upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/k8s-1.6.yaml.template diff --git a/upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.4.0.yaml.template b/upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.4.0.yaml.template deleted file mode 100644 index f223861e3d..0000000000 --- a/upup/models/cloudup/resources/addons/kube-dns.addons.k8s.io/v1.4.0.yaml.template +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 2016 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: kube-dns-v20 - namespace: kube-system - labels: - k8s-addon: kube-dns.addons.k8s.io - k8s-app: kube-dns - version: v20 - kubernetes.io/cluster-service: "true" -spec: - replicas: {{ KubeDNS.Replicas }} - selector: - matchLabels: - k8s-app: kube-dns - version: v20 - template: - metadata: - labels: - k8s-app: kube-dns - version: v20 - annotations: - scheduler.alpha.kubernetes.io/critical-pod: '' - scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' - spec: - containers: - - name: kubedns - image: gcr.io/google_containers/kubedns-amd64:1.8 - resources: - # TODO: Set memory limits when we've profiled the container for large - # clusters, then set request = limit to keep this container in - # guaranteed class. Currently, this container falls into the - # "burstable" category so the kubelet doesn't backoff from restarting it. - limits: - memory: 170Mi - requests: - cpu: 100m - memory: 70Mi - livenessProbe: - httpGet: - path: /healthz-kubedns - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - path: /readiness - port: 8081 - scheme: HTTP - # we poll on pod startup for the Kubernetes master service and - # only setup the /readiness HTTP server once that's available. - initialDelaySeconds: 3 - timeoutSeconds: 5 - args: - # command = "/kube-dns" - - --domain={{ KubeDNS.Domain }}. - - --dns-port=10053 - ports: - - containerPort: 10053 - name: dns-local - protocol: UDP - - containerPort: 10053 - name: dns-tcp-local - protocol: TCP - - name: dnsmasq - image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4 - livenessProbe: - httpGet: - path: /healthz-dnsmasq - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - args: - - --cache-size=1000 - - --no-resolv - - --server=127.0.0.1#10053 - - --log-facility=- - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - name: healthz - image: gcr.io/google_containers/exechealthz-amd64:1.2 - resources: - limits: - memory: 50Mi - requests: - cpu: 10m - # Note that this container shouldn't really need 50Mi of memory. The - # limits are set higher than expected pending investigation on #29688. - # The extra memory was stolen from the kubedns container to keep the - # net memory requested by the pod constant. - memory: 50Mi - args: - - --cmd=nslookup kubernetes.default.svc.{{ KubeDNS.Domain }} 127.0.0.1 >/dev/null - - --url=/healthz-dnsmasq - - --cmd=nslookup kubernetes.default.svc.{{ KubeDNS.Domain }} 127.0.0.1:10053 >/dev/null - - --url=/healthz-kubedns - - --port=8080 - - --quiet - ports: - - containerPort: 8080 - protocol: TCP - dnsPolicy: Default # Don't use cluster DNS. - ---- - -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - labels: - k8s-addon: kube-dns.addons.k8s.io - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "KubeDNS" -spec: - selector: - k8s-app: kube-dns - clusterIP: {{ KubeDNS.ServerIP }} - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP diff --git a/upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.5.0.yaml b/upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.6.0.yaml similarity index 58% rename from upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.5.0.yaml rename to upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.6.0.yaml index 366aa180a5..7c8b21c084 100644 --- a/upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.5.0.yaml +++ b/upup/models/cloudup/resources/addons/storage-aws.addons.k8s.io/v1.6.0.yaml @@ -2,10 +2,21 @@ apiVersion: storage.k8s.io/v1beta1 kind: StorageClass metadata: name: default - annotations: - storageclass.beta.kubernetes.io/is-default-class: "true" labels: - kubernetes.io/cluster-service: "true" + k8s-addon: storage-aws.addons.k8s.io +provisioner: kubernetes.io/aws-ebs +parameters: + type: gp2 + +--- + +apiVersion: storage.k8s.io/v1beta1 +kind: StorageClass +metadata: + name: gp2 + annotations: + storageclass.beta.kubernetes.io/is-default-class: "true" + labels: k8s-addon: storage-aws.addons.k8s.io provisioner: kubernetes.io/aws-ebs parameters: diff --git a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go index 94cef0a8d9..8684cc66fe 100644 --- a/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go +++ b/upup/pkg/fi/cloudup/bootstrapchannelbuilder.go @@ -97,15 +97,16 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri key := "kube-dns.addons.k8s.io" var version string + var location string switch { case kv.Major == 1 && kv.Minor <= 5: version = "1.5.1" + location = key + "/k8s-1.5.yaml" default: version = "1.6.0" + location = key + "/k8s-1.6.yaml" } - location := key + "/v" + version + ".yaml" - addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{ Name: fi.String(key), Version: fi.String(version), @@ -134,15 +135,18 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri key := "dns-controller.addons.k8s.io" var version string + var location string switch { case kv.Major == 1 && kv.Minor <= 5: - version = "1.5.2" + // This is awkward... we would like to do version 1.6.0, + // but if we do then we won't get the new manifest when we upgrade to 1.6.0 + version = "1.5.3" + location = key + "/k8s-1.5.yaml" default: version = "1.6.0" + location = key + "/k8s-1.6.yaml" } - location := key + "/v" + version + ".yaml" - addons.Spec.Addons = append(addons.Spec.Addons, &channelsapi.AddonSpec{ Name: fi.String(key), Version: fi.String(version), @@ -154,7 +158,7 @@ func (b *BootstrapChannelBuilder) buildManifest() (*channelsapi.Addons, map[stri { key := "storage-aws.addons.k8s.io" - version := "1.5.0" + version := "1.6.0" location := key + "/v" + version + ".yaml" diff --git a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/kopeio-vxlan/manifest.yaml b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/kopeio-vxlan/manifest.yaml index a3e971fe03..439d13599e 100644 --- a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/kopeio-vxlan/manifest.yaml +++ b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/kopeio-vxlan/manifest.yaml @@ -9,7 +9,7 @@ spec: selector: k8s-addon: core.addons.k8s.io version: 1.4.0 - - manifest: kube-dns.addons.k8s.io/v1.5.1.yaml + - manifest: kube-dns.addons.k8s.io/k8s-1.5.yaml name: kube-dns.addons.k8s.io selector: k8s-addon: kube-dns.addons.k8s.io @@ -19,19 +19,18 @@ spec: selector: k8s-addon: limit-range.addons.k8s.io version: 1.5.0 - - manifest: dns-controller.addons.k8s.io/v1.5.2.yaml + - manifest: dns-controller.addons.k8s.io/k8s-1.5.yaml name: dns-controller.addons.k8s.io selector: k8s-addon: dns-controller.addons.k8s.io - version: 1.5.2 - - manifest: storage-aws.addons.k8s.io/v1.5.0.yaml + version: 1.5.3 + - manifest: storage-aws.addons.k8s.io/v1.6.0.yaml name: storage-aws.addons.k8s.io selector: k8s-addon: storage-aws.addons.k8s.io - version: 1.5.0 + version: 1.6.0 - manifest: networking.kope.io/v1.0.20161116.yaml name: networking.kope.io selector: role.kubernetes.io/networking: "1" version: 1.0.20161116 - diff --git a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/manifest.yaml b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/manifest.yaml index 0a819819fc..f44f5c479b 100644 --- a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/manifest.yaml +++ b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/simple/manifest.yaml @@ -9,7 +9,7 @@ spec: selector: k8s-addon: core.addons.k8s.io version: 1.4.0 - - manifest: kube-dns.addons.k8s.io/v1.5.1.yaml + - manifest: kube-dns.addons.k8s.io/k8s-1.5.yaml name: kube-dns.addons.k8s.io selector: k8s-addon: kube-dns.addons.k8s.io @@ -19,13 +19,13 @@ spec: selector: k8s-addon: limit-range.addons.k8s.io version: 1.5.0 - - manifest: dns-controller.addons.k8s.io/v1.5.2.yaml + - manifest: dns-controller.addons.k8s.io/k8s-1.5.yaml name: dns-controller.addons.k8s.io selector: k8s-addon: dns-controller.addons.k8s.io - version: 1.5.2 - - manifest: storage-aws.addons.k8s.io/v1.5.0.yaml + version: 1.5.3 + - manifest: storage-aws.addons.k8s.io/v1.6.0.yaml name: storage-aws.addons.k8s.io selector: k8s-addon: storage-aws.addons.k8s.io - version: 1.5.0 + version: 1.6.0