Skip to content

Commit 5e5da43

Browse files
Merge pull request #477 from stuggi/golang_1.21
bump to golang 1.21 and k8s to 1.29
2 parents 87e8146 + 60ee4d9 commit 5e5da43

17 files changed

+153
-156
lines changed

.ci-operator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: tools
33
namespace: openstack-k8s-operators
4-
tag: ci-build-root-golang-1.20-sdk-1.31
4+
tag: ci-build-root-golang-1.21-sdk-1.31

.github/workflows/build-telemetry-operator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
1616
with:
1717
operator_name: telemetry
18-
go_version: 1.20.x
18+
go_version: 1.21.x
1919
operator_sdk_version: 1.31.0
2020
secrets:
2121
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ repos:
5757
entry: bashate --error . --ignore=E006,E040,E011,E020,E012
5858

5959
- repo: https://github.com/golangci/golangci-lint
60-
rev: v1.55.2
60+
rev: v1.59.1
6161
hooks:
6262
- id: golangci-lint-full
6363
args: ["-v"]

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.20
1+
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest
33

44
# Build the manager binary

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0
5454
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/telemetry-operator:latest
5555
IMG ?= $(DEFAULT_IMG)
5656
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
57-
ENVTEST_K8S_VERSION = 1.28
57+
ENVTEST_K8S_VERSION = 1.29
5858

5959
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6060
ifeq (,$(shell go env GOBIN))
@@ -198,6 +198,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
198198
## Tool Versions
199199
KUSTOMIZE_VERSION ?= v3.8.7
200200
CONTROLLER_TOOLS_VERSION ?= v0.11.1
201+
GOTOOLCHAIN_VERSION ?= go1.21.0
201202

202203
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
203204
.PHONY: kustomize
@@ -329,7 +330,7 @@ golint: get-ci-tools
329330

330331
.PHONY: gowork
331332
gowork: ## Generate go.work file to support our multi module repository
332-
test -f go.work || go work init
333+
test -f go.work || GOTOOLCHAIN=$(GOTOOLCHAIN_VERSION) go work init
333334
go work use .
334335
go work use ./api
335336
go work sync

api/bases/telemetry.openstack.org_metricstorages.yaml

+20-24
Original file line numberDiff line numberDiff line change
@@ -225,30 +225,6 @@ spec:
225225
must still be higher than capacity recorded in the status
226226
field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
227227
properties:
228-
claims:
229-
description: "Claims lists the names of resources,
230-
defined in spec.resourceClaims, that are used by
231-
this container. \n This is an alpha field and requires
232-
enabling the DynamicResourceAllocation feature gate.
233-
\n This field is immutable. It can only be set for
234-
containers."
235-
items:
236-
description: ResourceClaim references one entry
237-
in PodSpec.ResourceClaims.
238-
properties:
239-
name:
240-
description: Name must match the name of one
241-
entry in pod.spec.resourceClaims of the Pod
242-
where this field is used. It makes that resource
243-
available inside a container.
244-
type: string
245-
required:
246-
- name
247-
type: object
248-
type: array
249-
x-kubernetes-list-map-keys:
250-
- name
251-
x-kubernetes-list-type: map
252228
limits:
253229
additionalProperties:
254230
anyOf:
@@ -325,6 +301,26 @@ spec:
325301
description: 'storageClassName is the name of the StorageClass
326302
required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
327303
type: string
304+
volumeAttributesClassName:
305+
description: 'volumeAttributesClassName may be used to
306+
set the VolumeAttributesClass used by this claim. If
307+
specified, the CSI driver will create or update the
308+
volume with the attributes defined in the corresponding
309+
VolumeAttributesClass. This has a different purpose
310+
than storageClassName, it can be changed after the claim
311+
is created. An empty string value means that no VolumeAttributesClass
312+
will be applied to the claim but it''s not allowed to
313+
reset this field to empty string once it is set. If
314+
unspecified and the PersistentVolumeClaim is unbound,
315+
the default VolumeAttributesClass will be set by the
316+
persistentvolume controller if it exists. If the resource
317+
referred to by volumeAttributesClass does not exist,
318+
this PersistentVolumeClaim will be set to a Pending
319+
state, as reflected by the modifyVolumeStatus field,
320+
until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass
321+
(Alpha) Using this field requires the VolumeAttributesClass
322+
feature gate to be enabled.'
323+
type: string
328324
volumeMode:
329325
description: volumeMode defines what type of volume is
330326
required by the claim. Value of Filesystem is implied

api/bases/telemetry.openstack.org_telemetries.yaml

+21-24
Original file line numberDiff line numberDiff line change
@@ -776,30 +776,6 @@ spec:
776776
value but must still be higher than capacity recorded
777777
in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
778778
properties:
779-
claims:
780-
description: "Claims lists the names of resources,
781-
defined in spec.resourceClaims, that are used
782-
by this container. \n This is an alpha field
783-
and requires enabling the DynamicResourceAllocation
784-
feature gate. \n This field is immutable. It
785-
can only be set for containers."
786-
items:
787-
description: ResourceClaim references one entry
788-
in PodSpec.ResourceClaims.
789-
properties:
790-
name:
791-
description: Name must match the name of
792-
one entry in pod.spec.resourceClaims of
793-
the Pod where this field is used. It makes
794-
that resource available inside a container.
795-
type: string
796-
required:
797-
- name
798-
type: object
799-
type: array
800-
x-kubernetes-list-map-keys:
801-
- name
802-
x-kubernetes-list-type: map
803779
limits:
804780
additionalProperties:
805781
anyOf:
@@ -878,6 +854,27 @@ spec:
878854
description: 'storageClassName is the name of the
879855
StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
880856
type: string
857+
volumeAttributesClassName:
858+
description: 'volumeAttributesClassName may be used
859+
to set the VolumeAttributesClass used by this claim.
860+
If specified, the CSI driver will create or update
861+
the volume with the attributes defined in the corresponding
862+
VolumeAttributesClass. This has a different purpose
863+
than storageClassName, it can be changed after the
864+
claim is created. An empty string value means that
865+
no VolumeAttributesClass will be applied to the
866+
claim but it''s not allowed to reset this field
867+
to empty string once it is set. If unspecified and
868+
the PersistentVolumeClaim is unbound, the default
869+
VolumeAttributesClass will be set by the persistentvolume
870+
controller if it exists. If the resource referred
871+
to by volumeAttributesClass does not exist, this
872+
PersistentVolumeClaim will be set to a Pending state,
873+
as reflected by the modifyVolumeStatus field, until
874+
such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass
875+
(Alpha) Using this field requires the VolumeAttributesClass
876+
feature gate to be enabled.'
877+
type: string
881878
volumeMode:
882879
description: volumeMode defines what type of volume
883880
is required by the claim. Value of Filesystem is

api/go.mod

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module github.com/openstack-k8s-operators/telemetry-operator/api
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/onsi/ginkgo/v2 v2.20.1
77
github.com/onsi/gomega v1.34.1
88
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240813061654-72bf12d9b73e
99
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240905123813-174296c09ec6
1010
github.com/rhobs/observability-operator v0.0.28
11-
k8s.io/api v0.28.13
12-
k8s.io/apimachinery v0.28.13
13-
k8s.io/client-go v0.28.13
14-
sigs.k8s.io/controller-runtime v0.16.6
11+
k8s.io/api v0.29.9
12+
k8s.io/apimachinery v0.29.9
13+
k8s.io/client-go v0.29.9
14+
sigs.k8s.io/controller-runtime v0.17.6
1515
)
1616

1717
require (
@@ -67,8 +67,8 @@ require (
6767
gopkg.in/inf.v0 v0.9.1 // indirect
6868
gopkg.in/yaml.v2 v2.4.0 // indirect
6969
gopkg.in/yaml.v3 v3.0.1 // indirect
70-
k8s.io/apiextensions-apiserver v0.28.13 // indirect
71-
k8s.io/component-base v0.28.13 // indirect
70+
k8s.io/apiextensions-apiserver v0.29.2 // indirect
71+
k8s.io/component-base v0.29.2 // indirect
7272
k8s.io/klog/v2 v2.120.1 // indirect
7373
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
7474
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect

api/go.sum

+18-12
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
5656
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
5757
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
5858
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
59+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
5960
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
61+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
6062
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
6163
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
6264
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -78,6 +80,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
7880
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
7981
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
8082
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
83+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
8184
github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
8285
github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
8386
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
@@ -97,10 +100,12 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
97100
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
98101
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
99102
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
103+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
100104
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
101105
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
102106
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
103107
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
108+
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
104109
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
105110
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
106111
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
@@ -170,31 +175,32 @@ google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFW
170175
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
171176
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
172177
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
178+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
173179
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
174180
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
175181
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
176182
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
177183
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
178184
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
179185
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
180-
k8s.io/api v0.28.13 h1:0Sw8MjdkmrJAF/uVv09HXSZ3cQauVyZHQWKt8hiiKo4=
181-
k8s.io/api v0.28.13/go.mod h1:7hlRF5wArzXf0qbRRT2TMtHRa5SHBEVJhA02JpTxj9Q=
182-
k8s.io/apiextensions-apiserver v0.28.13 h1:+Q3jtMXBxvURuW0tzW1UsZMPud3T4OvgVPuI/uQUEQ8=
183-
k8s.io/apiextensions-apiserver v0.28.13/go.mod h1:yThTxyuc0ba1rXKZNK2aQNIbFxmGcU+CPc8YB40IGj0=
184-
k8s.io/apimachinery v0.28.13 h1:0O2mk2i0Yi+xkron0lK//biI21F1eGXb4eXECLU5v7g=
185-
k8s.io/apimachinery v0.28.13/go.mod h1:zUG757HaKs6Dc3iGtKjzIpBfqTM4yiRsEe3/E7NX15o=
186-
k8s.io/client-go v0.28.13 h1:kHgFOxWwAsa8VxL6Oylo10V6euobub9Jo0wyEWrhrWk=
187-
k8s.io/client-go v0.28.13/go.mod h1:IudvInbWfd+6WLreEVnBnZJCGFaSROCFbny9jFTkk7g=
188-
k8s.io/component-base v0.28.13 h1:hNgX2QcMt7Z5vy/9MB2rodbvBJj6H4Jq1JZDqGvVuf8=
189-
k8s.io/component-base v0.28.13/go.mod h1:G37g+bIAcjV2cAMEpFG2SEN7NgRFMizqSksOLpPN2bM=
186+
k8s.io/api v0.29.9 h1:FwdflpNsfMUYUOblMZNWJ4K/q0OSL5A4jGa0iOgcJco=
187+
k8s.io/api v0.29.9/go.mod h1:fNhmzRfKaSEHCmczA/jRx6CiDKhYOnFLJBERMJAXEk8=
188+
k8s.io/apiextensions-apiserver v0.29.2 h1:UK3xB5lOWSnhaCk0RFZ0LUacPZz9RY4wi/yt2Iu+btg=
189+
k8s.io/apiextensions-apiserver v0.29.2/go.mod h1:aLfYjpA5p3OwtqNXQFkhJ56TB+spV8Gc4wfMhUA3/b8=
190+
k8s.io/apimachinery v0.29.9 h1:YZ8HUid1TzQVz94cnNlsQjLdH0VoAhWSqz7t0q6B12A=
191+
k8s.io/apimachinery v0.29.9/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y=
192+
k8s.io/client-go v0.29.9 h1:4f/Wz6li3rEyIPFj32XAQMtOGMM1tg7KQi1oeS6ibPg=
193+
k8s.io/client-go v0.29.9/go.mod h1:2N1drQEZ5yiYrWVaE2Un8JiISUhl47D8pyZlYLszke4=
194+
k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8=
195+
k8s.io/component-base v0.29.2/go.mod h1:BfB3SLrefbZXiBfbM+2H1dlat21Uewg/5qtKOl8degM=
190196
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
191197
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
192198
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
193199
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
194200
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
195201
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
196-
sigs.k8s.io/controller-runtime v0.16.6 h1:FiXwTuFF5ZJKmozfP2Z0j7dh6kmxP4Ou1KLfxgKKC3I=
197-
sigs.k8s.io/controller-runtime v0.16.6/go.mod h1:+dQzkZxnylD0u49e0a+7AR+vlibEBaThmPca7lTyUsI=
202+
sigs.k8s.io/controller-runtime v0.17.6 h1:12IXsozEsIXWAMRpgRlYS1jjAHQXHtWEOMdULh3DbEw=
203+
sigs.k8s.io/controller-runtime v0.17.6/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY=
198204
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
199205
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
200206
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=

0 commit comments

Comments
 (0)