Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.21-sdk-1.31
tag: ci-build-root-golang-1.24-sdk-1.31
2 changes: 1 addition & 1 deletion .github/workflows/build-openstack-baremetal-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
needs: [build-openstack-baremetal-operator-agent]
with:
operator_name: openstack-baremetal
go_version: 1.21.x
go_version: 1.24.x
operator_sdk_version: 1.31.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also bump opertaor_sdk to 1.41.0 and controller-tools to 0.18.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a dedicated jira to look into the sdk update since with latest version there is also a directory structure change. I am now looking into bumping some additional version, like the controller-tools.

secrets:
IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/force-bump-pr-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ jobs:
with:
operator_name: openstack-baremetal
branch_name: ${{ github.ref_name }}
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31
secrets:
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}
1 change: 1 addition & 0 deletions .github/workflows/force-bump-pr-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ jobs:
uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-branches.yaml@main
with:
operator_name: openstack-baremetal
custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31
secrets:
FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }}
8 changes: 7 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
version: 2

linters:
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- errorlint
- revive
- ginkgolinter
- gofmt
- govet
- gosec
- errname
- err113

formatters:
enable:
- gofmt

run:
timeout: 5m
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repos:
- id: go-mod-tidy

- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
rev: v2.4.0
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,4 +1,4 @@
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest

# Build the manager binary
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.agent
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21
ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest

# Build the manager binary
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0
DEFAULT_IMG ?= quay.io/openstack-k8s-operators/openstack-baremetal-operator:latest
IMG ?= $(DEFAULT_IMG)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29
ENVTEST_K8S_VERSION = 1.31

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -86,7 +86,7 @@ SHELL = /usr/bin/env bash -o pipefail
# Extra vars which will be passed to the Docker-build
DOCKER_BUILD_ARGS ?=

GOTOOLCHAIN_VERSION ?= go1.21.0
GOTOOLCHAIN_VERSION ?= go1.24.0

.PHONY: all
all: build
Expand Down Expand Up @@ -219,7 +219,7 @@ GINKGO ?= $(LOCALBIN)/ginkgo

## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.14.0
CONTROLLER_TOOLS_VERSION ?= v0.18.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand All @@ -240,7 +240,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

.PHONY: operator-sdk
OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk
Expand Down Expand Up @@ -347,9 +347,10 @@ govet: get-ci-tools
# Run go test against code
gotest: test

GOLANGCI_LINT_VERSION ?= v2.4.0
.PHONY: golangci-lint
golangci-lint:
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1
test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION)
$(LOCALBIN)/golangci-lint run --fix

.PHONY: vulncheck
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.18.0
name: openstackbaremetalsets.baremetal.openstack.org
spec:
group: baremetal.openstack.org
Expand Down
10 changes: 7 additions & 3 deletions api/bases/baremetal.openstack.org_openstackprovisionservers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.18.0
name: openstackprovisionservers.baremetal.openstack.org
spec:
group: baremetal.openstack.org
Expand Down Expand Up @@ -104,11 +104,9 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.


This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate.


This field is immutable. It can only be set for containers.
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
Expand All @@ -119,6 +117,12 @@ spec:
the Pod where this field is used. It makes that resource available
inside a container.
type: string
request:
description: |-
Request is the name chosen for a request in the referenced claim.
If empty, everything from the claim is made available, otherwise
only the result of this request.
type: string
required:
- name
type: object
Expand Down
40 changes: 20 additions & 20 deletions api/go.mod
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
module github.com/openstack-k8s-operators/openstack-baremetal-operator/api

go 1.21
go 1.24

require (
github.com/go-logr/logr v1.4.3
github.com/go-playground/validator/v10 v10.25.0
github.com/metal3-io/baremetal-operator/apis v0.6.3
github.com/onsi/ginkgo/v2 v2.20.1
github.com/onsi/gomega v1.34.1
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250916144944-295824b4a7ce
k8s.io/api v0.29.15
k8s.io/apimachinery v0.29.15
sigs.k8s.io/controller-runtime v0.17.6
github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04
k8s.io/api v0.31.12
k8s.io/apimachinery v0.31.12
sigs.k8s.io/controller-runtime v0.19.7
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
Expand All @@ -46,37 +47,36 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.51.1 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/crypto v0.33.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/term v0.29.0 // indirect
golang.org/x/text v0.22.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.24.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.34.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
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.29.15 // indirect
k8s.io/client-go v0.29.15 // indirect
k8s.io/component-base v0.29.15 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/apiextensions-apiserver v0.31.0 // indirect
k8s.io/client-go v0.31.12 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)

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