Skip to content

Commit b069b29

Browse files
committed
Bump Go version to 1.21
* bump in go.mod (base and api) * bump go-toolset in Dockerfile * bump in github jobs ('.github/workflows') * Bump the golangci-lint version in the .pre-commit-config.yaml to v1.59.1 (1.60 >= golang 1.22; 1.61 >= golang 1.23) * Bump build_root_image in .ci-operator.yaml to ci-build-root-golang-1.21-sdk-1.31 Jira: OSPRH-6501 Signed-off-by: Brendan Shephard <[email protected]>
1 parent 9c3e4ba commit b069b29

12 files changed

+355
-110
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-horizon-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: horizon
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
@@ -26,7 +26,7 @@ repos:
2626
- id: go-mod-tidy
2727

2828
- repo: https://github.com/golangci/golangci-lint
29-
rev: v1.55.2
29+
rev: v1.59.1
3030
hooks:
3131
- id: golangci-lint-full
3232
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

+1-1
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/horizon-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))

api/bases/horizon.openstack.org_horizons.yaml

+142-28
Original file line numberDiff line numberDiff line change
@@ -778,34 +778,6 @@ spec:
778778
recorded in the status field of the
779779
claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
780780
properties:
781-
claims:
782-
description: "Claims lists the names
783-
of resources, defined in spec.resourceClaims,
784-
that are used by this container.
785-
\n This is an alpha field and
786-
requires enabling the DynamicResourceAllocation
787-
feature gate. \n This field is
788-
immutable. It can only be set
789-
for containers."
790-
items:
791-
description: ResourceClaim references
792-
one entry in PodSpec.ResourceClaims.
793-
properties:
794-
name:
795-
description: Name must match
796-
the name of one entry in
797-
pod.spec.resourceClaims
798-
of the Pod where this field
799-
is used. It makes that resource
800-
available inside a container.
801-
type: string
802-
required:
803-
- name
804-
type: object
805-
type: array
806-
x-kubernetes-list-map-keys:
807-
- name
808-
x-kubernetes-list-type: map
809781
limits:
810782
additionalProperties:
811783
anyOf:
@@ -901,6 +873,34 @@ spec:
901873
name of the StorageClass required
902874
by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
903875
type: string
876+
volumeAttributesClassName:
877+
description: 'volumeAttributesClassName
878+
may be used to set the VolumeAttributesClass
879+
used by this claim. If specified,
880+
the CSI driver will create or update
881+
the volume with the attributes defined
882+
in the corresponding VolumeAttributesClass.
883+
This has a different purpose than
884+
storageClassName, it can be changed
885+
after the claim is created. An empty
886+
string value means that no VolumeAttributesClass
887+
will be applied to the claim but it''s
888+
not allowed to reset this field to
889+
empty string once it is set. If unspecified
890+
and the PersistentVolumeClaim is unbound,
891+
the default VolumeAttributesClass
892+
will be set by the persistentvolume
893+
controller if it exists. If the resource
894+
referred to by volumeAttributesClass
895+
does not exist, this PersistentVolumeClaim
896+
will be set to a Pending state, as
897+
reflected by the modifyVolumeStatus
898+
field, until such as a resource exists.
899+
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass
900+
(Alpha) Using this field requires
901+
the VolumeAttributesClass feature
902+
gate to be enabled.'
903+
type: string
904904
volumeMode:
905905
description: volumeMode defines what
906906
type of volume is required by the
@@ -1316,6 +1316,120 @@ spec:
13161316
description: Projection that may be projected
13171317
along with other supported volume types
13181318
properties:
1319+
clusterTrustBundle:
1320+
description: "ClusterTrustBundle allows
1321+
a pod to access the `.spec.trustBundle`
1322+
field of ClusterTrustBundle objects
1323+
in an auto-updating file. \n Alpha,
1324+
gated by the ClusterTrustBundleProjection
1325+
feature gate. \n ClusterTrustBundle
1326+
objects can either be selected by name,
1327+
or by the combination of signer name
1328+
and a label selector. \n Kubelet performs
1329+
aggressive normalization of the PEM
1330+
contents written into the pod filesystem.
1331+
\ Esoteric PEM features such as inter-block
1332+
comments and block headers are stripped.
1333+
\ Certificates are deduplicated. The
1334+
ordering of certificates within the
1335+
file is arbitrary, and Kubelet may change
1336+
the order over time."
1337+
properties:
1338+
labelSelector:
1339+
description: Select all ClusterTrustBundles
1340+
that match this label selector. Only
1341+
has effect if signerName is set. Mutually-exclusive
1342+
with name. If unset, interpreted
1343+
as "match nothing". If set but
1344+
empty, interpreted as "match everything".
1345+
properties:
1346+
matchExpressions:
1347+
description: matchExpressions
1348+
is a list of label selector
1349+
requirements. The requirements
1350+
are ANDed.
1351+
items:
1352+
description: A label selector
1353+
requirement is a selector
1354+
that contains values, a key,
1355+
and an operator that relates
1356+
the key and values.
1357+
properties:
1358+
key:
1359+
description: key is the
1360+
label key that the selector
1361+
applies to.
1362+
type: string
1363+
operator:
1364+
description: operator represents
1365+
a key's relationship to
1366+
a set of values. Valid
1367+
operators are In, NotIn,
1368+
Exists and DoesNotExist.
1369+
type: string
1370+
values:
1371+
description: values is an
1372+
array of string values.
1373+
If the operator is In
1374+
or NotIn, the values array
1375+
must be non-empty. If
1376+
the operator is Exists
1377+
or DoesNotExist, the values
1378+
array must be empty. This
1379+
array is replaced during
1380+
a strategic merge patch.
1381+
items:
1382+
type: string
1383+
type: array
1384+
required:
1385+
- key
1386+
- operator
1387+
type: object
1388+
type: array
1389+
matchLabels:
1390+
additionalProperties:
1391+
type: string
1392+
description: matchLabels is a
1393+
map of {key,value} pairs. A
1394+
single {key,value} in the matchLabels
1395+
map is equivalent to an element
1396+
of matchExpressions, whose key
1397+
field is "key", the operator
1398+
is "In", and the values array
1399+
contains only "value". The requirements
1400+
are ANDed.
1401+
type: object
1402+
type: object
1403+
x-kubernetes-map-type: atomic
1404+
name:
1405+
description: Select a single ClusterTrustBundle
1406+
by object name. Mutually-exclusive
1407+
with signerName and labelSelector.
1408+
type: string
1409+
optional:
1410+
description: If true, don't block
1411+
pod startup if the referenced ClusterTrustBundle(s)
1412+
aren't available. If using name,
1413+
then the named ClusterTrustBundle
1414+
is allowed not to exist. If using
1415+
signerName, then the combination
1416+
of signerName and labelSelector
1417+
is allowed to match zero ClusterTrustBundles.
1418+
type: boolean
1419+
path:
1420+
description: Relative path from the
1421+
volume root to write the bundle.
1422+
type: string
1423+
signerName:
1424+
description: Select all ClusterTrustBundles
1425+
that match this signer name. Mutually-exclusive
1426+
with name. The contents of all
1427+
selected ClusterTrustBundles will
1428+
be unified and deduplicated.
1429+
type: string
1430+
required:
1431+
- path
1432+
type: object
13191433
configMap:
13201434
description: configMap information about
13211435
the configMap data to project

api/go.mod

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

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240905123813-174296c09ec6
77
github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.0
8-
k8s.io/api v0.28.13
9-
k8s.io/apimachinery v0.28.13
10-
sigs.k8s.io/controller-runtime v0.16.6
8+
k8s.io/api v0.29.2
9+
k8s.io/apimachinery v0.29.2
10+
sigs.k8s.io/controller-runtime v0.17.6
1111
)
1212

1313
require (
@@ -18,7 +18,6 @@ require (
1818
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
1919
github.com/fsnotify/fsnotify v1.7.0 // indirect
2020
github.com/go-logr/logr v1.4.2 // indirect
21-
github.com/go-logr/zapr v1.3.0 // indirect
2221
github.com/go-openapi/jsonpointer v0.20.2 // indirect
2322
github.com/go-openapi/jsonreference v0.20.4 // indirect
2423
github.com/go-openapi/swag v0.22.9 // indirect
@@ -42,7 +41,6 @@ require (
4241
github.com/prometheus/common v0.46.0 // indirect
4342
github.com/prometheus/procfs v0.12.0 // indirect
4443
github.com/spf13/pflag v1.0.5 // indirect
45-
go.uber.org/goleak v1.3.0 // indirect
4644
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
4745
golang.org/x/net v0.28.0 // indirect
4846
golang.org/x/oauth2 v0.16.0 // indirect
@@ -56,9 +54,9 @@ require (
5654
gopkg.in/inf.v0 v0.9.1 // indirect
5755
gopkg.in/yaml.v2 v2.4.0 // indirect
5856
gopkg.in/yaml.v3 v3.0.1 // indirect
59-
k8s.io/apiextensions-apiserver v0.28.13 // indirect
60-
k8s.io/client-go v0.28.13 // indirect
61-
k8s.io/component-base v0.28.13 // indirect
57+
k8s.io/apiextensions-apiserver v0.29.2 // indirect
58+
k8s.io/client-go v0.29.2 // indirect
59+
k8s.io/component-base v0.29.2 // indirect
6260
k8s.io/klog/v2 v2.120.1 // indirect
6361
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
6462
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect

0 commit comments

Comments
 (0)