From 29d64453dde6895b4e5625d6f2edd1168ab956f8 Mon Sep 17 00:00:00 2001 From: Helene Durand Date: Mon, 15 Jan 2024 11:45:15 +0100 Subject: [PATCH] MINOR: fix controller-gen version to v0.13.0 --- crs/code-generator.sh | 6 ++++-- crs/controller-gen/version_check_test.go | 4 ++++ go.mod | 1 + go.sum | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 crs/controller-gen/version_check_test.go diff --git a/crs/code-generator.sh b/crs/code-generator.sh index 4b9be7d7..93d9fc5d 100755 --- a/crs/code-generator.sh +++ b/crs/code-generator.sh @@ -75,7 +75,9 @@ mkdir -p ${CR_DIR}/generated cp -r ${OUTPUT_DIR}/${CR_PKG}/generated/{clientset,listers,informers} ${CR_DIR}/generated rm -rf ${OUTPUT_DIR} -go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest +CONTROLLER_GEN_VERSION=$(go list -m sigs.k8s.io/controller-tools | cut -d ' ' -f2) +go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} + # Controller-gen version -echo "Controller-gen: " $(controller-gen --version) +echo "Controller-gen: " ${CONTROLLER_GEN_VERSION} controller-gen crd paths=./crs/api/ingress/... output:crd:dir=./crs/definition diff --git a/crs/controller-gen/version_check_test.go b/crs/controller-gen/version_check_test.go new file mode 100644 index 00000000..c271a374 --- /dev/null +++ b/crs/controller-gen/version_check_test.go @@ -0,0 +1,4 @@ +package controllergenversion + +// Blank import just to ensure via go.mod that we have a specific controller-gen version +import _ "sigs.k8s.io/controller-tools/pkg/version" diff --git a/go.mod b/go.mod index 28861d66..c6854cb4 100644 --- a/go.mod +++ b/go.mod @@ -22,6 +22,7 @@ require ( k8s.io/apimachinery v0.28.3 k8s.io/client-go v0.28.3 sigs.k8s.io/controller-runtime v0.16.2 + sigs.k8s.io/controller-tools v0.13.0 sigs.k8s.io/gateway-api v0.5.0 sigs.k8s.io/yaml v1.4.0 ) diff --git a/go.sum b/go.sum index dbeda692..00443366 100644 --- a/go.sum +++ b/go.sum @@ -253,6 +253,7 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= @@ -474,6 +475,8 @@ k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSn k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= +sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= sigs.k8s.io/gateway-api v0.5.0 h1:ze+k9fJqvmL8s1t3e4q1ST8RnN+f09dEv+gfacahlAE= sigs.k8s.io/gateway-api v0.5.0/go.mod h1:x0AP6gugkFV8fC/oTlnOMU0pnmuzIR8LfIPRVUjxSqA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=