Skip to content

Commit

Permalink
Merge branch 'release-0.5' into updatelogcheck0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjunmyfm192085 committed Jun 16, 2022
2 parents 943e774 + 181b748 commit b1cc719
Show file tree
Hide file tree
Showing 16 changed files with 89 additions and 91 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
@@ -1,6 +1,7 @@
# Update the base image in Makefile when updating golang version. This has to
# be pre-pulled in order to work on GCB.
FROM golang:1.16.4 as build
ARG ARCH
FROM golang:1.16.8 as build

WORKDIR /go/src/sigs.k8s.io/metrics-server
COPY go.mod .
Expand All @@ -15,9 +16,8 @@ ARG ARCH
ARG GIT_COMMIT
ARG GIT_TAG
RUN make metrics-server
RUN setcap cap_net_bind_service=+ep metrics-server

FROM gcr.io/distroless/static:latest
FROM gcr.io/distroless/static:latest-$ARCH
COPY --from=build /go/src/sigs.k8s.io/metrics-server/metrics-server /
USER 65534
ENTRYPOINT ["/metrics-server"]
28 changes: 14 additions & 14 deletions Makefile
Expand Up @@ -44,8 +44,8 @@ CONTAINER_ARCH_TARGETS=$(addprefix container-,$(ALL_ARCHITECTURES))
container:
# Pull base image explicitly. Keep in sync with Dockerfile, otherwise
# GCB builds will start failing.
docker pull golang:1.16.4
docker buildx build -t $(REGISTRY)/metrics-server-$(ARCH):$(CHECKSUM) --build-arg ARCH=$(ARCH) --build-arg GIT_TAG=$(GIT_TAG) --build-arg GIT_COMMIT=$(GIT_COMMIT) .
docker pull golang:1.16.8
docker build -t $(REGISTRY)/metrics-server-$(ARCH):$(CHECKSUM) --build-arg ARCH=$(ARCH) --build-arg GIT_TAG=$(GIT_TAG) --build-arg GIT_COMMIT=$(GIT_COMMIT) .

.PHONY: container-all
container-all: $(CONTAINER_ARCH_TARGETS);
Expand Down Expand Up @@ -136,23 +136,23 @@ test-cli: container
# -----------

.PHONY: test-e2e
test-e2e: test-e2e-1.21
test-e2e: test-e2e-1.24


.PHONY: test-e2e-all
test-e2e-all: test-e2e-1.21 test-e2e-1.20 test-e2e-1.19
test-e2e-all: test-e2e-1.24 test-e2e-1.23 test-e2e-1.22

.PHONY: test-e2e-1.21
test-e2e-1.21:
NODE_IMAGE=kindest/node:v1.21.1@sha256:fae9a58f17f18f06aeac9772ca8b5ac680ebbed985e266f711d936e91d113bad ./test/test-e2e.sh
.PHONY: test-e2e-1.24
test-e2e-1.24:
NODE_IMAGE=kindest/node:v1.24.0@sha256:0866296e693efe1fed79d5e6c7af8df71fc73ae45e3679af05342239cdc5bc8e ./test/test-e2e.sh

.PHONY: test-e2e-1.20
test-e2e-1.20:
NODE_IMAGE=kindest/node:v1.20.7@sha256:e645428988191fc824529fd0bb5c94244c12401cf5f5ea3bd875eb0a787f0fe9 ./test/test-e2e.sh
.PHONY: test-e2e-1.23
test-e2e-1.23:
NODE_IMAGE=kindest/node:v1.23.0@sha256:49824ab1727c04e56a21a5d8372a402fcd32ea51ac96a2706a12af38934f81ac ./test/test-e2e.sh

.PHONY: test-e2e-1.19
test-e2e-1.19:
NODE_IMAGE=kindest/node:v1.19.11@sha256:7664f21f9cb6ba2264437de0eb3fe99f201db7a3ac72329547ec4373ba5f5911 ./test/test-e2e.sh
.PHONY: test-e2e-1.22
test-e2e-1.22:
NODE_IMAGE=kindest/node:v1.22.0@sha256:b8bda84bb3a190e6e028b1760d277454a72267a5454b57db34437c34a588d047 ./test/test-e2e.sh

# Static analysis
# ---------------
Expand Down Expand Up @@ -196,7 +196,7 @@ HAS_GOLANGCI:=$(shell which golangci-lint)
.PHONY: golangci
golangci:
ifndef HAS_GOLANGCI
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin latest
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.2
endif

# Table of Contents
Expand Down
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -47,7 +47,7 @@ distributions. Please ensure that your cluster distribution supports these requi

[reachable from kube-apiserver]: https://kubernetes.io/docs/concepts/architecture/master-node-communication/#master-to-cluster
[enable an aggregation layer]: https://kubernetes.io/docs/tasks/access-kubernetes-api/configure-aggregation-layer/
[authentication and authorization]: https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet-authentication-authorization/
[authentication and authorization]: https://kubernetes.io/docs/reference/access-authn-authz/kubelet-authn-authz/
[container metrics RPCs]: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/cri-container-stats.md
[cAdvisor]: https://github.com/google/cadvisor

Expand Down Expand Up @@ -117,7 +117,7 @@ Most useful flags:
You can get a full list of Metrics Server configuration flags by running:

```shell
docker run --rm k8s.gcr.io/metrics-server/metrics-server:v0.5.0 --help
docker run --rm k8s.gcr.io/metrics-server/metrics-server:v0.5.2 --help
```

#### Helm Chart
Expand All @@ -134,9 +134,9 @@ For more information, see:
- [Metrics API design]
- [Metrics Server design]

[Kubernetes monitoring architecture]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/monitoring_architecture.md
[Metrics API design]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/resource-metrics-api.md
[Metrics Server design]: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/metrics-server.md
[Kubernetes monitoring architecture]: https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/monitoring_architecture.md
[Metrics API design]: https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/resource-metrics-api.md
[Metrics Server design]: https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/metrics-server.md

## Have a question?

Expand Down
15 changes: 8 additions & 7 deletions go.mod
Expand Up @@ -13,15 +13,16 @@ require (
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
golang.org/x/perf v0.0.0-20210220033136-40a54f11e909
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/apiserver v0.21.1
k8s.io/client-go v0.21.1
k8s.io/component-base v0.21.1
golang.org/x/tools v0.1.10 // indirect
k8s.io/api v0.21.5
k8s.io/apimachinery v0.21.5
k8s.io/apiserver v0.21.5
k8s.io/client-go v0.21.5
k8s.io/component-base v0.21.5
k8s.io/klog/v2 v2.8.0
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7
k8s.io/kubelet v0.21.1
k8s.io/metrics v0.21.1
k8s.io/kubelet v0.21.5
k8s.io/metrics v0.21.5
sigs.k8s.io/logtools v0.1.0
sigs.k8s.io/mdtoc v1.0.1
)

0 comments on commit b1cc719

Please sign in to comment.