From f25aff20660689577d0a10544e82370014c86841 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:03:03 +0000 Subject: [PATCH 1/2] vendor: bump sigs.k8s.io/controller-tools in /tools Bumps [sigs.k8s.io/controller-tools](https://github.com/kubernetes-sigs/controller-tools) from 0.12.0 to 0.12.1. - [Release notes](https://github.com/kubernetes-sigs/controller-tools/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-tools/blob/master/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-tools/compare/v0.12.0...v0.12.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-tools dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- tools/go.mod | 2 +- tools/go.sum | 4 ++-- tools/vendor/modules.txt | 2 +- .../sigs.k8s.io/controller-tools/pkg/genall/options.go | 3 +++ .../sigs.k8s.io/controller-tools/pkg/markers/collect.go | 9 ++++----- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index b98e851a6..bf435a923 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -7,7 +7,7 @@ require ( google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 google.golang.org/protobuf v1.31.0 sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20230620070423-a784ee78d04b - sigs.k8s.io/controller-tools v0.12.0 + sigs.k8s.io/controller-tools v0.12.1 sigs.k8s.io/kustomize/kustomize/v4 v4.5.7 ) diff --git a/tools/go.sum b/tools/go.sum index 46dfdfcaa..4d573a6c6 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -1987,8 +1987,8 @@ sigs.k8s.io/controller-runtime v0.14.5 h1:6xaWFqzT5KuAQ9ufgUaj1G/+C4Y1GRkhrxl+BJ sigs.k8s.io/controller-runtime v0.14.5/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20230620070423-a784ee78d04b h1:OZOsH3AuA+PGDU1ksxqhnGjP14YJRcQOHzKTcKeJw3U= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20230620070423-a784ee78d04b/go.mod h1:B6HLcvOy2S1qq2eWOFm9xepiKPMIc8Z9OXSPsnUDaR4= -sigs.k8s.io/controller-tools v0.12.0 h1:TY6CGE6+6hzO7hhJFte65ud3cFmmZW947jajXkuDfBw= -sigs.k8s.io/controller-tools v0.12.0/go.mod h1:rXlpTfFHZMpZA8aGq9ejArgZiieHd+fkk/fTatY8A2M= +sigs.k8s.io/controller-tools v0.12.1 h1:GyQqxzH5wksa4n3YDIJdJJOopztR5VDM+7qsyg5yE4U= +sigs.k8s.io/controller-tools v0.12.1/go.mod h1:rXlpTfFHZMpZA8aGq9ejArgZiieHd+fkk/fTatY8A2M= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kubebuilder/v3 v3.9.1 h1:9JNKRg9GzlLBYwYRx1nQlwha8+Pd9gPyat1lj7T+jZw= diff --git a/tools/vendor/modules.txt b/tools/vendor/modules.txt index 8e54a45b6..5ba5e9d28 100644 --- a/tools/vendor/modules.txt +++ b/tools/vendor/modules.txt @@ -1561,7 +1561,7 @@ sigs.k8s.io/controller-runtime/tools/setup-envtest/remote sigs.k8s.io/controller-runtime/tools/setup-envtest/store sigs.k8s.io/controller-runtime/tools/setup-envtest/versions sigs.k8s.io/controller-runtime/tools/setup-envtest/workflows -# sigs.k8s.io/controller-tools v0.12.0 +# sigs.k8s.io/controller-tools v0.12.1 ## explicit; go 1.20 sigs.k8s.io/controller-tools/cmd/controller-gen sigs.k8s.io/controller-tools/pkg/crd diff --git a/tools/vendor/sigs.k8s.io/controller-tools/pkg/genall/options.go b/tools/vendor/sigs.k8s.io/controller-tools/pkg/genall/options.go index 836b1617e..658b96bb3 100644 --- a/tools/vendor/sigs.k8s.io/controller-tools/pkg/genall/options.go +++ b/tools/vendor/sigs.k8s.io/controller-tools/pkg/genall/options.go @@ -136,6 +136,9 @@ func protoFromOptions(optionsRegistry *markers.Registry, options []string) (prot switch val := val.(type) { case Generator: gens = append(gens, &val) + if _, alreadyExists := gensByName[defn.Name]; alreadyExists { + return protoRuntime{}, fmt.Errorf("multiple instances of '%s' generator specified", defn.Name) + } gensByName[defn.Name] = &val case OutputRule: _, genName := splitOutputRuleOption(defn.Name) diff --git a/tools/vendor/sigs.k8s.io/controller-tools/pkg/markers/collect.go b/tools/vendor/sigs.k8s.io/controller-tools/pkg/markers/collect.go index b2f821991..63aa7344b 100644 --- a/tools/vendor/sigs.k8s.io/controller-tools/pkg/markers/collect.go +++ b/tools/vendor/sigs.k8s.io/controller-tools/pkg/markers/collect.go @@ -31,7 +31,7 @@ import ( type Collector struct { *Registry - byPackage map[string]map[ast.Node]MarkerValues + byPackage map[*loader.Package]map[ast.Node]MarkerValues mu sync.Mutex } @@ -53,7 +53,7 @@ func (c *Collector) init() { c.Registry = &Registry{} } if c.byPackage == nil { - c.byPackage = make(map[string]map[ast.Node]MarkerValues) + c.byPackage = make(map[*loader.Package]map[ast.Node]MarkerValues) } } @@ -75,7 +75,7 @@ func (c *Collector) init() { func (c *Collector) MarkersInPackage(pkg *loader.Package) (map[ast.Node]MarkerValues, error) { c.mu.Lock() c.init() - if markers, exist := c.byPackage[pkg.ID]; exist { + if markers, exist := c.byPackage[pkg]; exist { c.mu.Unlock() return markers, nil } @@ -91,8 +91,7 @@ func (c *Collector) MarkersInPackage(pkg *loader.Package) (map[ast.Node]MarkerVa c.mu.Lock() defer c.mu.Unlock() - c.byPackage[pkg.ID] = markers - + c.byPackage[pkg] = markers return markers, nil } From 0c2fceab6d06f105d93c81aab8fbda7590aee131 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 18 Jul 2023 08:25:37 +0200 Subject: [PATCH 2/2] vendor: template changes for controller-tools template changes for controller-tools update Signed-off-by: Madhu Rajanna --- .../bases/csiaddons.openshift.io_csiaddonsnodes.yaml | 2 +- .../bases/csiaddons.openshift.io_networkfences.yaml | 2 +- .../csiaddons.openshift.io_reclaimspacecronjobs.yaml | 2 +- .../csiaddons.openshift.io_reclaimspacejobs.yaml | 2 +- ...torage.openshift.io_volumereplicationclasses.yaml | 2 +- ...tion.storage.openshift.io_volumereplications.yaml | 2 +- deploy/controller/crds.yaml | 12 ++++++------ deploy/controller/install-all-in-one.yaml | 12 ++++++------ 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/config/crd/bases/csiaddons.openshift.io_csiaddonsnodes.yaml b/config/crd/bases/csiaddons.openshift.io_csiaddonsnodes.yaml index 1c9acfe86..19b25e58a 100644 --- a/config/crd/bases/csiaddons.openshift.io_csiaddonsnodes.yaml +++ b/config/crd/bases/csiaddons.openshift.io_csiaddonsnodes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: csiaddonsnodes.csiaddons.openshift.io spec: group: csiaddons.openshift.io diff --git a/config/crd/bases/csiaddons.openshift.io_networkfences.yaml b/config/crd/bases/csiaddons.openshift.io_networkfences.yaml index 4fa74f61f..ed416c1ce 100644 --- a/config/crd/bases/csiaddons.openshift.io_networkfences.yaml +++ b/config/crd/bases/csiaddons.openshift.io_networkfences.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: networkfences.csiaddons.openshift.io spec: group: csiaddons.openshift.io diff --git a/config/crd/bases/csiaddons.openshift.io_reclaimspacecronjobs.yaml b/config/crd/bases/csiaddons.openshift.io_reclaimspacecronjobs.yaml index 61757d018..105eb179c 100644 --- a/config/crd/bases/csiaddons.openshift.io_reclaimspacecronjobs.yaml +++ b/config/crd/bases/csiaddons.openshift.io_reclaimspacecronjobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: reclaimspacecronjobs.csiaddons.openshift.io spec: group: csiaddons.openshift.io diff --git a/config/crd/bases/csiaddons.openshift.io_reclaimspacejobs.yaml b/config/crd/bases/csiaddons.openshift.io_reclaimspacejobs.yaml index 48949721d..6cf218ccf 100644 --- a/config/crd/bases/csiaddons.openshift.io_reclaimspacejobs.yaml +++ b/config/crd/bases/csiaddons.openshift.io_reclaimspacejobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: reclaimspacejobs.csiaddons.openshift.io spec: group: csiaddons.openshift.io diff --git a/config/crd/bases/replication.storage.openshift.io_volumereplicationclasses.yaml b/config/crd/bases/replication.storage.openshift.io_volumereplicationclasses.yaml index 6a9190d1f..260ec6514 100644 --- a/config/crd/bases/replication.storage.openshift.io_volumereplicationclasses.yaml +++ b/config/crd/bases/replication.storage.openshift.io_volumereplicationclasses.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: volumereplicationclasses.replication.storage.openshift.io spec: group: replication.storage.openshift.io diff --git a/config/crd/bases/replication.storage.openshift.io_volumereplications.yaml b/config/crd/bases/replication.storage.openshift.io_volumereplications.yaml index 53307f71c..3ca1d96d3 100644 --- a/config/crd/bases/replication.storage.openshift.io_volumereplications.yaml +++ b/config/crd/bases/replication.storage.openshift.io_volumereplications.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: volumereplications.replication.storage.openshift.io spec: group: replication.storage.openshift.io diff --git a/deploy/controller/crds.yaml b/deploy/controller/crds.yaml index 8610276e7..67127ce7f 100644 --- a/deploy/controller/crds.yaml +++ b/deploy/controller/crds.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: csiaddonsnodes.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -105,7 +105,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: networkfences.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -284,7 +284,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: reclaimspacecronjobs.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -497,7 +497,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: reclaimspacejobs.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -693,7 +693,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: volumereplicationclasses.replication.storage.openshift.io spec: group: replication.storage.openshift.io @@ -761,7 +761,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: volumereplications.replication.storage.openshift.io spec: group: replication.storage.openshift.io diff --git a/deploy/controller/install-all-in-one.yaml b/deploy/controller/install-all-in-one.yaml index 218ac8506..ce7f3b55a 100644 --- a/deploy/controller/install-all-in-one.yaml +++ b/deploy/controller/install-all-in-one.yaml @@ -9,7 +9,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: csiaddonsnodes.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -112,7 +112,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: networkfences.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -291,7 +291,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: reclaimspacecronjobs.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -504,7 +504,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: reclaimspacejobs.csiaddons.openshift.io spec: group: csiaddons.openshift.io @@ -700,7 +700,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: volumereplicationclasses.replication.storage.openshift.io spec: group: replication.storage.openshift.io @@ -768,7 +768,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.12.0 + controller-gen.kubebuilder.io/version: v0.12.1 name: volumereplications.replication.storage.openshift.io spec: group: replication.storage.openshift.io