Skip to content

Commit

Permalink
Adapt after vendor removal
Browse files Browse the repository at this point in the history
  • Loading branch information
ialidzhikov committed Mar 26, 2024
1 parent 55ccdac commit 0d07374
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
!pkg/
!test/
!third_party/
!vendor/

!.gitignore
!.golangci.yaml
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
FROM golang:1.22.1 AS builder

WORKDIR /go/src/github.com/gardener/gardener-custom-metrics

# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN make install

############# gardener-custom-metrics
Expand Down
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ include $(REPO_ROOT)/third_party/gardener/gardener/hack/tools.mk
.PHONY: start
start:
@LEADER_ELECTION_NAMESPACE=garden GO111MODULE=on go run \
-mod=vendor \
-ldflags $(LD_FLAGS) \
./cmd \
./cmd/gardener-custom-metrics \
--secure-port=6443 \
--lister-kubeconfig=$(REPO_ROOT)/dev/kubeconfig.yaml \
--authentication-kubeconfig=$(REPO_ROOT)/dev/kubeconfig.yaml \
Expand Down Expand Up @@ -83,10 +82,9 @@ docker-push:
# Rules for verification, formatting, linting, testing and cleaning #
#####################################################################

.PHONY: revendor
revendor:
.PHONY: tidy
tidy:
@GO111MODULE=on go mod tidy
@GO111MODULE=on go mod vendor

.PHONY: clean
clean:
Expand Down
1 change: 0 additions & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ build:
- cmd/**
- example/**
- pkg/**
- vendor/**
- VERSION
ldflags:
- '{{.LD_FLAGS}}'
Expand Down

0 comments on commit 0d07374

Please sign in to comment.