Skip to content

Commit

Permalink
Clean up vendor dir references in the VPA directory
Browse files Browse the repository at this point in the history
Signed-off-by: Feruzjon Muyassarov <[email protected]>
  • Loading branch information
fmuyassarov committed Jun 7, 2024
1 parent 6320648 commit 6b18596
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/hack/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ case ${SUITE} in
recommender|updater|admission-controller|actuation|full-vpa)
export KUBECONFIG=$HOME/.kube/config
pushd ${SCRIPT_ROOT}/e2e
go test -mod vendor ./v1beta2/*go -v --test.timeout=90m --args --ginkgo.v=true --ginkgo.focus="\[VPA\] \[${SUITE}\]" --report-dir=/workspace/_artifacts --disable-log-dump --ginkgo.timeout=90m
go test ./v1beta2/*go -v --test.timeout=90m --args --ginkgo.v=true --ginkgo.focus="\[VPA\] \[${SUITE}\]" --report-dir=/workspace/_artifacts --disable-log-dump --ginkgo.timeout=90m
V1BETA2_RESULT=$?
go test -mod vendor ./v1/*go -v --test.timeout=90m --args --ginkgo.v=true --ginkgo.focus="\[VPA\] \[${SUITE}\]" --report-dir=/workspace/_artifacts --disable-log-dump --ginkgo.timeout=90m
go test ./v1/*go -v --test.timeout=90m --args --ginkgo.v=true --ginkgo.focus="\[VPA\] \[${SUITE}\]" --report-dir=/workspace/_artifacts --disable-log-dump --ginkgo.timeout=90m
V1_RESULT=$?
popd
echo v1beta2 test result: ${V1BETA2_RESULT}
Expand Down
5 changes: 2 additions & 3 deletions vertical-pod-autoscaler/hack/update-kubernetes-deps-in-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ function update_deps() {
echo "Updating k8s to ${K8S_TAG}"
go get "k8s.io/kubernetes@v${K8S_TAG}"

echo "Running go mod tidy and vendoring deps"
# tidy and vendor modules
echo "Running go mod tidy"
# tidy
go mod tidy
go mod vendor
)
5 changes: 2 additions & 3 deletions vertical-pod-autoscaler/hack/update-kubernetes-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ function update_deps() {
echo "Updating k8s to ${K8S_TAG}"
go get "k8s.io/kubernetes@v${K8S_TAG}"

echo "Running go mod tidy and vendoring deps"
# tidy and vendor modules
echo "Running go mod tidy"
# tidy
go mod tidy
go mod vendor
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ WORKDIR /gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler

ARG TARGETOS TARGETARCH

RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/admission-controller -mod vendor -o admission-controller-$TARGETARCH
RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/admission-controller -o admission-controller-$TARGETARCH

FROM gcr.io/distroless/static:latest
MAINTAINER Tomasz Kulczynski "[email protected]"
Expand Down
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/pkg/admission-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ clean-%:
rm -f ${COMPONENT}-$*

format:
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -w {} + | tee /dev/stderr)"
test -z "$$(find . -type f -o -name '*.go' -exec gofmt -s -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -type f -o -name '*.go' -exec gofmt -s -w {} + | tee /dev/stderr)"

.PHONY: all build test-unit clean format release
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/pkg/recommender/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ WORKDIR /gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler

ARG TARGETOS TARGETARCH

RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/recommender -mod vendor -o recommender-$TARGETARCH
RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/recommender -o recommender-$TARGETARCH

FROM gcr.io/distroless/static:latest
MAINTAINER Krzysztof Grygiel "[email protected]"
Expand Down
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/pkg/recommender/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ clean-%:
rm -f ${COMPONENT}-$*

format:
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -w {} + | tee /dev/stderr)"
test -z "$$(find . -type f -o -name '*.go' -exec gofmt -s -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -type f -o -name '*.go' -exec gofmt -s -w {} + | tee /dev/stderr)"

.PHONY: all build test-unit clean format release
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/pkg/updater/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ WORKDIR /gopath/src/k8s.io/autoscaler/vertical-pod-autoscaler

ARG TARGETOS TARGETARCH

RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/updater -mod vendor -o updater-$TARGETARCH
RUN CGO_ENABLED=0 LD_FLAGS=-s GOARCH=$TARGETARCH GOOS=$TARGETOS go build -C pkg/updater -o updater-$TARGETARCH

FROM gcr.io/distroless/static:latest
MAINTAINER Marcin Wielgus "[email protected]"
Expand Down
4 changes: 2 additions & 2 deletions vertical-pod-autoscaler/pkg/updater/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ clean-%:
rm -f ${COMPONENT}-$*

format:
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -path ./vendor -prune -type f -o -name '*.go' -exec gofmt -s -w {} + | tee /dev/stderr)"
test -z "$$(find . -type f -o -name '*.go' -exec gofmt -s -d {} + | tee /dev/stderr)" || \
test -z "$$(find . -type f -o -name '*.go' -exec gofmt -s -w {} + | tee /dev/stderr)"

.PHONY: all build test-unit clean format release

0 comments on commit 6b18596

Please sign in to comment.