Skip to content

Commit

Permalink
Merge pull request #412 from bshephar/go1.21
Browse files Browse the repository at this point in the history
Update Go to 1.21
  • Loading branch information
openshift-merge-bot[bot] authored Sep 25, 2024
2 parents 994d506 + fa3c5b8 commit 928e09f
Show file tree
Hide file tree
Showing 13 changed files with 361 additions and 116 deletions.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: tools
namespace: openstack-k8s-operators
tag: ci-build-root-golang-1.20-sdk-1.31
tag: ci-build-root-golang-1.21-sdk-1.31
2 changes: 1 addition & 1 deletion .github/workflows/build-neutron-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main
with:
operator_name: neutron
go_version: 1.20.x
go_version: 1.21.x
operator_sdk_version: 1.31.0
secrets:
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ repos:
# E012: here doc didn't end before EOF

- repo: https://github.com/golangci/golangci-lint
rev: v1.55.2
rev: v1.59.1
hooks:
- id: golangci-lint-full
args: ["-v"]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.20
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest

FROM $GOLANG_BUILDER AS builder
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ OPERATOR_SDK_VERSION ?= v1.31.0
# Image URL to use all building/pushing image targets
IMG ?= quay.io/openstack-k8s-operators/neutron-operator:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28
ENVTEST_K8S_VERSION = 1.29

# Set minimum Go version
GOTOOLCHAIN_VERSION ?= go1.21.0

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -345,7 +348,7 @@ golint: get-ci-tools

.PHONY: gowork
gowork: ## Generate go.work file to support our multi module repository
test -f go.work || go work init
test -f go.work || GOTOOLCHAIN=$(GOTOOLCHAIN_VERSION) go work init
go work use .
go work use ./api
go work sync
Expand Down
170 changes: 142 additions & 28 deletions api/bases/neutron.openstack.org_neutronapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -786,34 +786,6 @@ spec:
recorded in the status field of the
claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
properties:
claims:
description: "Claims lists the names
of resources, defined in spec.resourceClaims,
that are used by this container.
\n This is an alpha field and
requires enabling the DynamicResourceAllocation
feature gate. \n This field is
immutable. It can only be set
for containers."
items:
description: ResourceClaim references
one entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match
the name of one entry in
pod.spec.resourceClaims
of the Pod where this field
is used. It makes that resource
available inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
Expand Down Expand Up @@ -909,6 +881,34 @@ spec:
name of the StorageClass required
by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
type: string
volumeAttributesClassName:
description: 'volumeAttributesClassName
may be used to set the VolumeAttributesClass
used by this claim. If specified,
the CSI driver will create or update
the volume with the attributes defined
in the corresponding VolumeAttributesClass.
This has a different purpose than
storageClassName, it can be changed
after the claim is created. An empty
string value means that no VolumeAttributesClass
will be applied to the claim but it''s
not allowed to reset this field to
empty string once it is set. If unspecified
and the PersistentVolumeClaim is unbound,
the default VolumeAttributesClass
will be set by the persistentvolume
controller if it exists. If the resource
referred to by volumeAttributesClass
does not exist, this PersistentVolumeClaim
will be set to a Pending state, as
reflected by the modifyVolumeStatus
field, until such as a resource exists.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass
(Alpha) Using this field requires
the VolumeAttributesClass feature
gate to be enabled.'
type: string
volumeMode:
description: volumeMode defines what
type of volume is required by the
Expand Down Expand Up @@ -1324,6 +1324,120 @@ spec:
description: Projection that may be projected
along with other supported volume types
properties:
clusterTrustBundle:
description: "ClusterTrustBundle allows
a pod to access the `.spec.trustBundle`
field of ClusterTrustBundle objects
in an auto-updating file. \n Alpha,
gated by the ClusterTrustBundleProjection
feature gate. \n ClusterTrustBundle
objects can either be selected by name,
or by the combination of signer name
and a label selector. \n Kubelet performs
aggressive normalization of the PEM
contents written into the pod filesystem.
\ Esoteric PEM features such as inter-block
comments and block headers are stripped.
\ Certificates are deduplicated. The
ordering of certificates within the
file is arbitrary, and Kubelet may change
the order over time."
properties:
labelSelector:
description: Select all ClusterTrustBundles
that match this label selector. Only
has effect if signerName is set. Mutually-exclusive
with name. If unset, interpreted
as "match nothing". If set but
empty, interpreted as "match everything".
properties:
matchExpressions:
description: matchExpressions
is a list of label selector
requirements. The requirements
are ANDed.
items:
description: A label selector
requirement is a selector
that contains values, a key,
and an operator that relates
the key and values.
properties:
key:
description: key is the
label key that the selector
applies to.
type: string
operator:
description: operator represents
a key's relationship to
a set of values. Valid
operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an
array of string values.
If the operator is In
or NotIn, the values array
must be non-empty. If
the operator is Exists
or DoesNotExist, the values
array must be empty. This
array is replaced during
a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a
map of {key,value} pairs. A
single {key,value} in the matchLabels
map is equivalent to an element
of matchExpressions, whose key
field is "key", the operator
is "In", and the values array
contains only "value". The requirements
are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
name:
description: Select a single ClusterTrustBundle
by object name. Mutually-exclusive
with signerName and labelSelector.
type: string
optional:
description: If true, don't block
pod startup if the referenced ClusterTrustBundle(s)
aren't available. If using name,
then the named ClusterTrustBundle
is allowed not to exist. If using
signerName, then the combination
of signerName and labelSelector
is allowed to match zero ClusterTrustBundles.
type: boolean
path:
description: Relative path from the
volume root to write the bundle.
type: string
signerName:
description: Select all ClusterTrustBundles
that match this signer name. Mutually-exclusive
with name. The contents of all
selected ClusterTrustBundles will
be unified and deduplicated.
type: string
required:
- path
type: object
configMap:
description: configMap information about
the configMap data to project
Expand Down
20 changes: 9 additions & 11 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/openstack-k8s-operators/neutron-operator/api

go 1.20
go 1.21

require (
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240910122823-bdcfe881513b
github.com/openstack-k8s-operators/lib-common/modules/storage v0.4.1-0.20240910122823-bdcfe881513b
k8s.io/api v0.28.13
k8s.io/apimachinery v0.28.13
sigs.k8s.io/controller-runtime v0.16.6
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
sigs.k8s.io/controller-runtime v0.17.6
)

require (
Expand All @@ -18,7 +18,6 @@ require (
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.9 // indirect
Expand All @@ -42,7 +41,6 @@ require (
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/goleak v1.3.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
Expand All @@ -56,9 +54,9 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.28.13 // indirect
k8s.io/client-go v0.28.13 // indirect
k8s.io/component-base v0.28.13 // indirect
k8s.io/apiextensions-apiserver v0.29.2 // indirect
k8s.io/client-go v0.29.2 // indirect
k8s.io/component-base v0.29.2 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
Expand All @@ -67,6 +65,6 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

// mschuppert: map to latest commit from release-4.13 tag
// mschuppert: map to latest commit from release-4.16 tag
// must consistent within modules and service operators
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 //allow-merging
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 //allow-merging
Loading

0 comments on commit 928e09f

Please sign in to comment.