Skip to content

Commit

Permalink
Bump github.com/gardener/gardener to 1.85.5
Browse files Browse the repository at this point in the history
  • Loading branch information
simcod committed Sep 3, 2024
1 parent 326e2f0 commit 30f0f5b
Show file tree
Hide file tree
Showing 15 changed files with 319 additions and 222 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:

- name: Verify
run: |
make revendor
make tidy
make verify
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.idea/
.vscode

hack/tools/bin/
hack/tools/bin
vendor
VERSION
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ FROM golang:1.22 AS builder

WORKDIR /go/src/github.com/metal-stack/gardener-extension-dns-powerdns

# 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

FROM alpine:3.19
FROM gcr.io/distroless/static-debian12:nonroot

WORKDIR /

Expand Down
34 changes: 17 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: Apache-2.0

ENSURE_GARDENER_MOD := $(shell go get github.com/gardener/gardener@$$(go list -m -f "{{.Version}}" github.com/gardener/gardener))
GARDENER_HACK_DIR := $(shell go list -m -f "{{.Dir}}" github.com/gardener/gardener)/hack
IMAGE_TAG := $(or ${GITHUB_TAG_NAME}, latest)
REGISTRY := ghcr.io/metal-stack
IMAGE_PREFIX := $(REGISTRY)
Expand All @@ -24,8 +26,8 @@ endif

export GO111MODULE := on

TOOLS_DIR := hack/tools
-include vendor/github.com/gardener/gardener/hack/tools.mk
TOOLS_DIR := $(HACK_DIR)/tools
-include $(GARDENER_HACK_DIR)/tools.mk


#################################################################
Expand All @@ -37,9 +39,9 @@ build:
go build -ldflags $(LD_FLAGS) -tags netgo ./cmd/gardener-extension-dns-powerdns

.PHONY: install
install: revendor $(HELM)
install: tidy $(HELM)
@LD_FLAGS="-w -X github.com/gardener/$(EXTENSION_PREFIX)-$(NAME)/pkg/version.Version=$(VERSION)" \
$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/install.sh ./...
bash $(GARDENER_HACK_DIR)/install.sh ./...

.PHONY: docker-image
docker-image:
Expand All @@ -55,33 +57,31 @@ docker-push:
# Rules for verification, formatting, linting, testing and cleaning #
#####################################################################

.PHONY: revendor
revendor:
@GO111MODULE=on go mod vendor
.PHONY: tidy
tidy:
@GO111MODULE=on go mod tidy
@chmod +x $(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/*
@chmod +x $(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/.ci/*
@mkdir -p $(REPO_ROOT)/.ci/hack && cp $(GARDENER_HACK_DIR)/.ci/* $(REPO_ROOT)/.ci/hack/ && chmod +xw $(REPO_ROOT)/.ci/hack/*

.PHONY: clean
clean:
@$(shell find ./example -type f -name "controller-registration.yaml" -exec rm '{}' \;)
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/clean.sh ./cmd/... ./pkg/...
@bash $(GARDENER_HACK_DIR)/clean.sh ./cmd/... ./pkg/...

.PHONY: check-generate
check-generate:
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/check-generate.sh $(REPO_ROOT)
@bash $(GARDENER_HACK_DIR)/check-generate.sh $(REPO_ROOT)

.PHONY: check
check: $(GOIMPORTS) $(GOLANGCI_LINT) $(HELM)
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/check.sh --golangci-lint-config=./.golangci.yaml ./cmd/... ./pkg/...
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/check-charts.sh ./charts
@REPO_ROOT=$(REPO_ROOT) bash $(GARDENER_HACK_DIR)/check.sh --golangci-lint-config=./.golangci.yaml ./cmd/... ./pkg/...
@REPO_ROOT=$(REPO_ROOT) bash $(GARDENER_HACK_DIR)/check-charts.sh ./charts

.PHONY: generate
generate: $(HELM) $(YQ)
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/generate.sh ./charts/... ./cmd/... ./pkg/...
generate: $(VGOPATH) $(HELM) $(YQ)
@REPO_ROOT=$(REPO_ROOT) VGOPATH=$(VGOPATH) GARDENER_HACK_DIR=$(GARDENER_HACK_DIR) bash $(GARDENER_HACK_DIR)/generate-sequential.sh ./charts/... ./cmd/... ./pkg/...

.PHONY: generate-in-container
generate-in-container: revendor $(HELM)
generate-in-container: tidy $(HELM)
# echo $(shell git describe --abbrev=0 --tags) > VERSION
docker run --rm -i$(DOCKER_TTY_ARG) \
--env GOCACHE=/gocache \
Expand All @@ -95,7 +95,7 @@ generate-in-container: revendor $(HELM)

.PHONY: format
format: $(GOIMPORTS) $(GOIMPORTSREVISER)
@$(REPO_ROOT)/vendor/github.com/gardener/gardener/hack/format.sh ./cmd ./pkg
@bash $(GARDENER_HACK_DIR)/format.sh ./cmd ./pkg

.PHONY: verify
verify: check format
2 changes: 1 addition & 1 deletion charts/gardener-extension-dns-powerdns/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//
// SPDX-License-Identifier: Apache-2.0

//go:generate sh -c "../../vendor/github.com/gardener/gardener/hack/generate-controller-registration.sh powerdns . $(cat ../../VERSION) ../../example/controller-registration.yaml DNSRecord:powerdns"
//go:generate sh -c "bash $GARDENER_HACK_DIR/generate-controller-registration.sh powerdns . $(cat ../../VERSION) ../../example/controller-registration.yaml DNSRecord:powerdns"

// Package chart enables go:generate support for generating the correct controller registration.
package chart
10 changes: 4 additions & 6 deletions cmd/gardener-extension-dns-powerdns/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/gardener/gardener/extensions/pkg/util"
gardenerhealthz "github.com/gardener/gardener/pkg/healthz"
"github.com/spf13/cobra"
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/component-base/version/verflag"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand All @@ -33,11 +32,10 @@ func NewControllerManagerCommand(ctx context.Context) *cobra.Command {
generalOpts = &controllercmd.GeneralOptions{}
restOpts = &controllercmd.RESTOptions{}
mgrOpts = &controllercmd.ManagerOptions{
LeaderElection: true,
LeaderElectionResourceLock: resourcelock.LeasesResourceLock,
LeaderElectionID: controllercmd.LeaderElectionNameID(powerdns.Name),
LeaderElectionNamespace: os.Getenv("LEADER_ELECTION_NAMESPACE"),
HealthBindAddress: ":8081",
LeaderElection: true,
LeaderElectionID: controllercmd.LeaderElectionNameID(powerdns.Name),
LeaderElectionNamespace: os.Getenv("LEADER_ELECTION_NAMESPACE"),
HealthBindAddress: ":8081",
}
configFileOpts = &pdnscmd.ConfigOptions{}

Expand Down
42 changes: 20 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ module github.com/metal-stack/gardener-extension-dns-powerdns
go 1.22

require (
github.com/gardener/gardener v1.76.4
github.com/gardener/gardener v1.85.5
github.com/go-logr/logr v1.4.1
github.com/joeig/go-powerdns/v3 v3.10.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
golang.org/x/tools v0.18.0
k8s.io/api v0.26.15
k8s.io/apimachinery v0.26.15
k8s.io/client-go v0.26.15
k8s.io/code-generator v0.26.15
k8s.io/component-base v0.26.15
k8s.io/api v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/code-generator v0.28.3
k8s.io/component-base v0.28.3
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
sigs.k8s.io/controller-runtime v0.14.7
sigs.k8s.io/controller-runtime v0.16.3
)

require (
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/ahmetb/gen-crd-api-reference-docs v0.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -36,7 +36,7 @@ require (
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gardener/etcd-druid v0.22.0 // indirect
github.com/gardener/hvpa-controller/api v0.5.0 // indirect
github.com/gardener/machine-controller-manager v0.49.3 // indirect
github.com/gardener/machine-controller-manager v0.50.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/errors v0.21.0 // indirect
Expand All @@ -48,9 +48,8 @@ require (
github.com/gobwas/glob v0.2.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect
Expand All @@ -60,6 +59,7 @@ require (
github.com/huandu/xstrings v1.4.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/ironcore-dev/vgopath v0.1.3 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect
Expand All @@ -82,9 +82,11 @@ require (
github.com/prometheus/procfs v0.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
go.uber.org/mock v0.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20230321023759-10a507213a29 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
Expand All @@ -100,26 +102,22 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
istio.io/api v0.0.0-20230302172406-582f573dde0c // indirect
istio.io/client-go v1.18.0-alpha.0 // indirect
k8s.io/apiextensions-apiserver v0.26.10 // indirect
istio.io/api v1.19.2-0.20231011000955-f3015ebb5bd4 // indirect
istio.io/client-go v1.19.3 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
k8s.io/autoscaler/vertical-pod-autoscaler v1.0.0 // indirect
k8s.io/client-go v0.28.3 // indirect
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
k8s.io/helm v2.17.0+incompatible // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-aggregator v0.26.10 // indirect
k8s.io/kube-aggregator v0.28.3 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/kubelet v0.26.10 // indirect
k8s.io/metrics v0.26.10 // indirect
k8s.io/kubelet v0.28.3 // indirect
k8s.io/metrics v0.28.3 // indirect
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20231015215740-bf15e44028f9 // indirect
sigs.k8s.io/controller-tools v0.11.4 // indirect
sigs.k8s.io/controller-tools v0.13.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
k8s.io/client-go => k8s.io/client-go v0.26.15
k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
)
Loading

0 comments on commit 30f0f5b

Please sign in to comment.