Skip to content
Closed
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.22-sdk-1.31
2 changes: 1 addition & 1 deletion .github/workflows/build-infra-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: infra
go_version: 1.21.x
go_version: 1.22.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 @@ -56,7 +56,7 @@ repos:
exclude: ^vendor

- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
rev: v1.63.4
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.22
ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest

# Build the manager binary
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ GINKGO ?= $(LOCALBIN)/ginkgo
## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.14.0
GOTOOLCHAIN_VERSION ?= go1.21.0
GOTOOLCHAIN_VERSION ?= go1.22.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
4 changes: 2 additions & 2 deletions apis/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
module github.com/openstack-k8s-operators/infra-operator/apis

go 1.21
go 1.22

require (
github.com/go-logr/logr v1.4.2
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.20250419062702-0acec6a591c8
github.com/rabbitmq/cluster-operator/v2 v2.9.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
k8s.io/api v0.29.15
k8s.io/apimachinery v0.29.15
k8s.io/client-go v0.29.15
Expand Down Expand Up @@ -53,6 +52,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.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.18.0 // indirect
golang.org/x/sys v0.23.0 // indirect
Expand Down
2 changes: 1 addition & 1 deletion apis/network/v1beta1/ipset_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package v1beta1
import (
"fmt"
"net"
"slices"
"strings"

"golang.org/x/exp/slices"
"k8s.io/apimachinery/pkg/api/equality"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion apis/network/v1beta1/netconfig_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"fmt"
"net"
"regexp"
"slices"
"strconv"

"golang.org/x/exp/slices"
"k8s.io/apimachinery/pkg/api/equality"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down
2 changes: 1 addition & 1 deletion controllers/instanceha/instanceha_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.CaBundleSecretName)))
condition.TLSInputReadyWaitingMessage, instance.Spec.CaBundleSecretName))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand Down
8 changes: 4 additions & 4 deletions controllers/memcached/memcached_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName)))
condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand All @@ -284,7 +284,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error())))
condition.TLSInputReadyWaitingMessage, err.Error()))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand All @@ -308,7 +308,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
memcachedv1.MTLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error())))
condition.TLSInputReadyWaitingMessage, err.Error()))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand All @@ -327,7 +327,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
memcachedv1.MTLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(memcachedv1.MTLSInputReadyWaitingMessage)))
"%s", fmt.Sprintf(memcachedv1.MTLSInputReadyWaitingMessage)))
return ctrl.Result{}, nil
}
}
Expand Down
10 changes: 5 additions & 5 deletions controllers/network/bgpconfiguration_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"context"
"encoding/json"
"fmt"
"slices"
"strings"

"golang.org/x/exp/slices"
"k8s.io/apimachinery/pkg/api/equality"
k8s_errors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -496,7 +496,7 @@ func getPodNetworkDetails(

// verify the nodeName information is already present in the pod spec, otherwise report an error to reconcile
if pod.Spec.NodeName == "" {
return detailList, fmt.Errorf(fmt.Sprintf("empty spec.nodeName on pod %s", pod.Name))
return detailList, fmt.Errorf("empty spec.nodeName on pod %s", pod.Name)
}

detail := bgp.PodDetail{
Expand All @@ -513,8 +513,8 @@ func getPodNetworkDetails(
// reflect all requested networks. return with an error to reconcile if the length
// is <= the status. Note: the status also has the pod network
if len(netsStatus) <= len(netAttach) {
return detailList, fmt.Errorf(fmt.Sprintf("metadata.Annotations['k8s.ovn.org/pod-networks'] %s on pod %s, does not match requested networks %s",
pod.GetAnnotations()[k8s_networkv1.NetworkStatusAnnot], pod.Name, netAttachString))
return detailList, fmt.Errorf("metadata.Annotations['k8s.ovn.org/pod-networks'] %s on pod %s, does not match requested networks %s",
pod.GetAnnotations()[k8s_networkv1.NetworkStatusAnnot], pod.Name, netAttachString)
}

var netsStatusCopy = make([]k8s_networkv1.NetworkStatus, len(netsStatus))
Expand Down Expand Up @@ -550,7 +550,7 @@ func getPodNetworkDetails(

// verify there is IP information for the network, otherwise report an error to reconcile
if len(netStat.IPs) == 0 {
return detailList, fmt.Errorf(fmt.Sprintf("no IP information for network %s on pod %s", netStat.Name, pod.Name))
return detailList, fmt.Errorf("no IP information for network %s on pod %s", netStat.Name, pod.Name)
}
}

Expand Down
2 changes: 1 addition & 1 deletion controllers/network/service_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (r *ServiceReconciler) getServiceDNSData(
for _, ingr := range svc.Status.LoadBalancer.Ingress {
addr := net.ParseIP(ingr.IP)
if addr == nil {
return nil, fmt.Errorf(fmt.Sprintf("unrecognized address %s", ingr.IP))
return nil, fmt.Errorf("unrecognized address %s", ingr.IP)
}

if host, ok := svcDNSHosts[addr.String()]; !ok {
Expand Down
2 changes: 1 addition & 1 deletion controllers/rabbitmq/rabbitmq_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error())))
condition.TLSInputReadyWaitingMessage, err.Error()))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand Down
4 changes: 2 additions & 2 deletions controllers/redis/redis_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName)))
condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand All @@ -270,7 +270,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ct
condition.TLSInputReadyCondition,
condition.RequestedReason,
condition.SeverityInfo,
fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error())))
condition.TLSInputReadyWaitingMessage, err.Error()))
return ctrl.Result{}, nil
}
instance.Status.Conditions.Set(condition.FalseCondition(
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/openstack-k8s-operators/infra-operator

go 1.21
go 1.22

require (
github.com/go-logr/logr v1.4.2
Expand Down
6 changes: 3 additions & 3 deletions pkg/ipam/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"net"
"net/netip"
"slices"

networkv1 "github.com/openstack-k8s-operators/infra-operator/apis/network/v1beta1"
"golang.org/x/exp/slices"
)

// AssignIPDetails -
Expand Down Expand Up @@ -49,7 +49,7 @@ func (a *AssignIPDetails) fixedIPExists() (*networkv1.IPAddress, error) {
}
idx := slices.IndexFunc(a.Reservelist.Items, f)
if idx >= 0 && a.Reservelist.Items[idx].Spec.IPSetRef.Name != a.IPSet {
return nil, fmt.Errorf(fmt.Sprintf("%s already reserved for %s", fixedIP, a.Reservelist.Items[idx].Spec.IPSetRef.Name))
return nil, fmt.Errorf("%s already reserved for %s", fixedIP, a.Reservelist.Items[idx].Spec.IPSetRef.Name)
}

return &networkv1.IPAddress{
Expand Down Expand Up @@ -107,5 +107,5 @@ func (a *AssignIPDetails) iterateForAssignment() (*networkv1.IPAddress, error) {
}
}

return nil, fmt.Errorf(fmt.Sprintf("no ip address could be created for %s in subnet %s", a.IPSet, a.SubNet.Name))
return nil, fmt.Errorf("no ip address could be created for %s in subnet %s", a.IPSet, a.SubNet.Name)
}
4 changes: 2 additions & 2 deletions zuul.d/projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
jobs:
- openstack-k8s-operators-content-provider:
vars:
cifmw_operator_build_golang_ct: "docker.io/library/golang:1.21"
cifmw_operator_build_golang_alt_ct: "quay.rdoproject.org/openstack-k8s-operators/golang:1.21"
cifmw_operator_build_golang_ct: "docker.io/library/golang:1.22"
cifmw_operator_build_golang_alt_ct: "quay.rdoproject.org/openstack-k8s-operators/golang:1.22"