Skip to content

Commit

Permalink
Update RELEASE.md to use image build pipeline and manifests as part o…
Browse files Browse the repository at this point in the history
…f release
  • Loading branch information
serathius committed Apr 5, 2020
1 parent 1b38dc4 commit d2b31a9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
23 changes: 20 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ LDFLAGS:=-X sigs.k8s.io/metrics-server/pkg/version.gitVersion=$(GIT_TAG) -X sigs
_output/%/metrics-server: $(src_deps)
GO111MODULE=on GOARCH=$* CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o _output/$*/metrics-server sigs.k8s.io/metrics-server/cmd/metrics-server

yaml_deps=$(shell find deploy/kubernetes -type f -name "*.yaml")
_output/components.yaml: $(yaml_deps)
cat deploy/kubernetes/*.yaml > _output/components.yaml

# Image Rules
# -----------

Expand Down Expand Up @@ -62,6 +66,19 @@ push-multi-arch:
@for arch in $(ALL_ARCHITECTURES); do docker manifest annotate --arch $${arch} $(REGISTRY)/metrics-server:$(GIT_TAG) $(REGISTRY)/metrics-server-$${arch}:${VERSION}; done
docker manifest push --purge $(REGISTRY)/metrics-server:$(GIT_TAG)


# Release rules
# -------------

.PHONY: release-tag
release-tag:
git tag $(GIT_TAG)
git push $(GIT_TAG)

.PHONY: release-manifests
release-manifests: _output/components.yaml
echo "Please upload file _output/components.yaml to GitHub release"

# Unit tests
# ----------

Expand Down Expand Up @@ -90,15 +107,15 @@ test-e2e: test-e2e-1.17
test-e2e-all: test-e2e-1.17 test-e2e-1.16 test-e2e-1.15

.PHONY: test-e2e-1.17
test-e2e-1.17: container-amd64
test-e2e-1.17: container-amd64 _output/components.yaml
KUBERNETES_VERSION=v1.17.0 IMAGE=$(REGISTRY)/metrics-server-amd64:$(GIT_COMMIT) ./test/e2e.sh

.PHONY: test-e2e-1.16
test-e2e-1.16: container-amd64
test-e2e-1.16: container-amd64 _output/components.yaml
KUBERNETES_VERSION=v1.16.1 IMAGE=$(REGISTRY)/metrics-server-amd64:$(GIT_COMMIT) ./test/e2e.sh

.PHONY: test-e2e-1.15
test-e2e-1.15: container-amd64
test-e2e-1.15: container-amd64 _output/components.yaml
KUBERNETES_VERSION=v1.15.0 IMAGE=$(REGISTRY)/metrics-server-amd64:$(GIT_COMMIT) ./test/e2e.sh

# Static analysis
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ Metrics Server | Metrics API group/version | Supported Kubernetes version
0.2.x | `metrics.k8s.io/v1beta1` | 1.8+


In order to deploy metrics-server in your cluster run the following command from
the top-level directory of this repository:
In order to deploy metrics-server in your cluster run the following command:

```console
$ kubectl apply -f deploy/kubernetes/
$ kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.6/components.yaml
```

You can also use this helm chart to deploy the metric-server in your cluster (This isn't supported by the metrics-server maintainers): https://github.com/helm/charts/tree/master/stable/metrics-server
Expand Down
12 changes: 8 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ The Metrics Server is released on an as-needed basis. The process is as follows:

1. An issue is proposing a new release with a changelog since the last release
1. At least one [OWNER](OWNERS) must LGTM this release
1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION`
1. An OWNER pushes docker images into all officially supported image registries
1. The release issue is closed
1. An announcement email is sent to `kubernetes-sig-instrumentation@googlegroups.com` with the subject `[ANNOUNCE] metrics-server $VERSION is released`
1. A PR that bumps version hardcoded in code is created and merged
1. An OWNER creates a draft GitHub release
1. An OWNER creates a release tag using `GIT_TAG=$VERSION make release-tag` and waits for [prow.k8s.io](prow.k8s.io) to build and push new images to [gcr.io/k8s-staging-metrics-server](https://gcr.io/k8s-staging-metrics-server)
1. An OWNER builds the release manifests using `make release-manifests` and uploads them to Github release
1. A PR in [kubernetes/k8s.io](https://github.com/kubernetes/k8s.io/blob/master/k8s.gcr.io/images/k8s-staging-metrics-server/images.yaml) is created to release images to `k8s.gcr.io`
1. An OWNER publishes the GitHub release
1. An announcement email is sent to `kubernetes-sig-instrumentation@googlegroups.com` with the subject `[ANNOUNCE] metrics-server $VERSION is released`
1. The release issue is closed
2 changes: 1 addition & 1 deletion test/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ setup_kind() {
}

deploy(){
kubectl apply -f deploy/kubernetes/
kubectl apply -f _output/components.yaml
# Apply patch to use provided image
kubectl -n kube-system patch deployment metrics-server --patch "{\"spec\": {\"template\": {\"spec\": {\"containers\": [{\"name\": \"metrics-server\", \"image\": \"${IMAGE}\", \"imagePullPolicy\": \"Never\"}]}}}}"
# Configure metrics-server preffered address to InternalIP for it to work with KinD
Expand Down

0 comments on commit d2b31a9

Please sign in to comment.