diff --git a/Makefile b/Makefile index 0b6ef64..338c865 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Image URL to use all building/pushing image targets IMG ?= controller:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.29.0 +ENVTEST_K8S_VERSION = 1.30.0 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -69,7 +69,7 @@ test-e2e: go test ./test/e2e/ -v -ginkgo.v .PHONY: lint -lint: golangci-lint ## Run golangci-lint linter & yamllint +lint: golangci-lint ## Run golangci-lint linter $(GOLANGCI_LINT) run .PHONY: lint-fix @@ -108,10 +108,10 @@ PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le docker-buildx: ## Build and push docker image for the manager for cross-platform support # copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - - $(CONTAINER_TOOL) buildx create --name project-v3-builder - $(CONTAINER_TOOL) buildx use project-v3-builder + - $(CONTAINER_TOOL) buildx create --name kubebuilder-updates-builder + $(CONTAINER_TOOL) buildx use kubebuilder-updates-builder - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile.cross . - - $(CONTAINER_TOOL) buildx rm project-v3-builder + - $(CONTAINER_TOOL) buildx rm kubebuilder-updates-builder rm Dockerfile.cross .PHONY: build-installer @@ -158,9 +158,9 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest-$(ENVTEST_VERSION) GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) ## Tool Versions -KUSTOMIZE_VERSION ?= v5.3.0 -CONTROLLER_TOOLS_VERSION ?= v0.14.0 -ENVTEST_VERSION ?= release-0.17 +KUSTOMIZE_VERSION ?= v5.4.1 +CONTROLLER_TOOLS_VERSION ?= v0.15.0 +ENVTEST_VERSION ?= release-0.18 GOLANGCI_LINT_VERSION ?= v1.61.0 .PHONY: kustomize diff --git a/cmd/main.go b/cmd/main.go index abd1607..c79b3e7 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -40,7 +40,7 @@ import ( googlecloudpubsuboperatorv1 "github.com/quipper/google-cloud-pubsub-operator/api/v1" pubsuboperatorv1 "github.com/quipper/google-cloud-pubsub-operator/api/v1" "github.com/quipper/google-cloud-pubsub-operator/internal/controller" - //+kubebuilder:scaffold:imports + // +kubebuilder:scaffold:imports ) var ( @@ -53,7 +53,7 @@ func init() { utilruntime.Must(pubsuboperatorv1.AddToScheme(scheme)) utilruntime.Must(googlecloudpubsuboperatorv1.AddToScheme(scheme)) - //+kubebuilder:scaffold:scheme + // +kubebuilder:scaffold:scheme } func main() { @@ -63,7 +63,7 @@ func main() { var secureMetrics bool var enableHTTP2 bool flag.StringVar(&metricsAddr, "metrics-bind-address", "0", "The address the metric endpoint binds to. "+ - "Use the port :8080. If not set, it will be '0 in order to disable the metrics server") + "Use the port :8080. If not set, it will be 0 in order to disable the metrics server") flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") flag.BoolVar(&enableLeaderElection, "leader-elect", false, "Enable leader election for controller manager. "+ @@ -148,7 +148,7 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "Subscription") os.Exit(1) } - //+kubebuilder:scaffold:builder + // +kubebuilder:scaffold:builder if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { setupLog.Error(err, "unable to set up health check") diff --git a/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_subscriptions.yaml b/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_subscriptions.yaml index 276b6a4..20c09a9 100644 --- a/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_subscriptions.yaml +++ b/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_subscriptions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: subscriptions.googlecloudpubsuboperator.quipper.github.io spec: group: googlecloudpubsuboperator.quipper.github.io diff --git a/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_topics.yaml b/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_topics.yaml index bd1768e..564ea9f 100644 --- a/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_topics.yaml +++ b/config/crd/bases/googlecloudpubsuboperator.quipper.github.io_topics.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.15.0 name: topics.googlecloudpubsuboperator.quipper.github.io spec: group: googlecloudpubsuboperator.quipper.github.io diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 0964a2b..b198aa8 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -4,18 +4,18 @@ resources: - bases/googlecloudpubsuboperator.quipper.github.io_topics.yaml - bases/googlecloudpubsuboperator.quipper.github.io_subscriptions.yaml -#+kubebuilder:scaffold:crdkustomizeresource +# +kubebuilder:scaffold:crdkustomizeresource patches: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD -#+kubebuilder:scaffold:crdkustomizewebhookpatch +# +kubebuilder:scaffold:crdkustomizewebhookpatch # [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix. # patches here are for enabling the CA injection for each CRD #- path: patches/cainjection_in_topics.yaml #- path: patches/cainjection_in_subscriptions.yaml -#+kubebuilder:scaffold:crdkustomizecainjectionpatch +# +kubebuilder:scaffold:crdkustomizecainjectionpatch # [WEBHOOK] To enable webhook, uncomment the following section # the following config is for teaching kustomize how to do kustomization for CRDs. diff --git a/config/default/manager_config_patch.yaml b/config/default/manager_config_patch.yaml deleted file mode 100644 index f6f5891..0000000 --- a/config/default/manager_config_patch.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 4cbff5b..6ed2a57 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -2,4 +2,4 @@ resources: - googlecloudpubsuboperator_v1_topic.yaml - googlecloudpubsuboperator_v1_subscription.yaml -#+kubebuilder:scaffold:manifestskustomizesamples +# +kubebuilder:scaffold:manifestskustomizesamples diff --git a/internal/controller/suite_test.go b/internal/controller/suite_test.go index 455dccd..d915152 100644 --- a/internal/controller/suite_test.go +++ b/internal/controller/suite_test.go @@ -42,7 +42,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" googlecloudpubsuboperatorv1 "github.com/quipper/google-cloud-pubsub-operator/api/v1" - //+kubebuilder:scaffold:imports + // +kubebuilder:scaffold:imports ) // These tests use Ginkgo (BDD-style Go testing framework). Refer to @@ -73,7 +73,7 @@ var _ = BeforeSuite(func() { // Note that you must have the required binaries setup under the bin directory to perform // the tests directly. When we run make test it will be setup and used automatically. BinaryAssetsDirectory: filepath.Join("..", "..", "bin", "k8s", - fmt.Sprintf("1.29.0-%s-%s", runtime.GOOS, runtime.GOARCH)), + fmt.Sprintf("1.30.0-%s-%s", runtime.GOOS, runtime.GOARCH)), } ctx, cancel := context.WithCancel(context.TODO()) @@ -92,7 +92,7 @@ var _ = BeforeSuite(func() { err = googlecloudpubsuboperatorv1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) - //+kubebuilder:scaffold:scheme + // +kubebuilder:scaffold:scheme k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) Expect(err).NotTo(HaveOccurred())