From 244e2eacb050b4a5086b3eb546e27701cd47302f Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Thu, 29 Feb 2024 16:10:43 +0100 Subject: [PATCH] Fix metrics-server build for v0.7.0 Signed-off-by: Manuel Buil --- Dockerfile | 4 ++-- Makefile | 4 ++-- README.md | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index a4e9038..67e924c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,13 +14,13 @@ RUN set -x && \ # setup the build ARG PKG="github.com/kubernetes-incubator/metrics-server" ARG SRC="github.com/kubernetes-sigs/metrics-server" -ARG TAG="v0.6.4" +ARG TAG="v0.7.0" ARG ARCH="amd64" RUN git clone --depth=1 https://${SRC}.git $GOPATH/src/${PKG} WORKDIR $GOPATH/src/${PKG} RUN git fetch --all --tags --prune RUN git checkout tags/${TAG} -b ${TAG} -RUN go install -mod=readonly k8s.io/kube-openapi/cmd/openapi-gen && \ +RUN go install -mod=readonly -modfile=scripts/go.mod k8s.io/kube-openapi/cmd/openapi-gen && \ ${GOPATH}/bin/openapi-gen --logtostderr \ -i k8s.io/metrics/pkg/apis/metrics/v1beta1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/apimachinery/pkg/api/resource,k8s.io/apimachinery/pkg/version \ -p ${PKG}/pkg/generated/openapi/ \ diff --git a/Makefile b/Makefile index a3d92ca..d69a6ed 100644 --- a/Makefile +++ b/Makefile @@ -16,14 +16,14 @@ ORG ?= rancher # but still refers internally to github.com/kubernetes-incubator/metrics-server packages PKG ?= github.com/kubernetes-incubator/metrics-server SRC ?= github.com/kubernetes-sigs/metrics-server -TAG ?= v0.6.4$(BUILD_META) +TAG ?= v0.7.0$(BUILD_META) ifneq ($(DRONE_TAG),) TAG := $(DRONE_TAG) endif ifeq (,$(filter %$(BUILD_META),$(TAG))) - $(error TAG needs to end with build metadata: $(BUILD_META)) +$(error TAG needs to end with build metadata: $(BUILD_META)) endif .PHONY: image-build diff --git a/README.md b/README.md index a0b8ea2..8ba2bee 100644 --- a/README.md +++ b/README.md @@ -1,7 +1 @@ # rancher/hardened-k8s-metrics-server - -## Build - -```sh -TAG=v0.5.2 make -```