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
62 changes: 1 addition & 61 deletions .govulncheck.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1 @@
ignored-vulnerabilities:
# Panic when validating certificates with DSA public keys in crypto/x509
# Found in: crypto/x509@go1.23.12
# Fixed in: crypto/x509@go1.24.8
- id: GO-2025-4013
info: https://pkg.go.dev/vuln/GO-2025-4013
silence-until: 2026-01-09
# Lack of limit when parsing cookies can cause memory exhaustion in net/http
# Found in: net/http@go1.23.12
# Fixed in: net/http@go1.24.8
- id: GO-2025-4012
info: https://pkg.go.dev/vuln/GO-2025-4012
silence-until: 2026-01-09
# Parsing DER payload can cause memory exhaustion in encoding/asn1
# Found in: encoding/asn1@go1.23.12
# Fixed in: encoding/asn1@go1.24.8
- id: GO-2025-4011
info: https://pkg.go.dev/vuln/GO-2025-4011
silence-until: 2026-01-09
# Insufficient validation of bracketed IPv6 hostnames in net/url
# Found in: net/url@go1.23.12
# Fixed in: net/url@go1.24.8
- id: GO-2025-4010
info: https://pkg.go.dev/vuln/GO-2025-4010
silence-until: 2026-01-09
# Quadratic complexity when parsing some invalid inputs in encoding/pem
# Found in: encoding/pem@go1.23.12
# Fixed in: encoding/pem@go1.24.8
- id: GO-2025-4009
info: https://pkg.go.dev/vuln/GO-2025-4009
silence-until: 2026-01-09
# ALPN negotiation error contains attacker controlled information in crypto/tls
# Found in: crypto/tls@go1.23.12
# Fixed in: crypto/tls@go1.24.8
- id: GO-2025-4008
info: https://pkg.go.dev/vuln/GO-2025-4008
silence-until: 2026-01-09
# Quadratic complexity when checking name constraints in crypto/x509
# Found in: crypto/x509@go1.23.12
# Fixed in: crypto/x509@go1.24.9
- id: GO-2025-4007
info: https://pkg.go.dev/vuln/GO-2025-4007
silence-until: 2026-01-09
# Excessive CPU consumption in ParseAddress in net/mail
# Found in: net/mail@go1.23.12
# Fixed in: net/mail@go1.24.8
- id: GO-2025-4006
info: https://pkg.go.dev/vuln/GO-2025-4006
silence-until: 2026-01-09
# Excessive resource consumption when printing error string for host certificate validation in crypto/x509
# Found in: crypto/x509@go1.23.12
# Fixed in: crypto/x509@go1.24.11
- id: GO-2025-4155
info: https://pkg.go.dev/vuln/GO-2025-4155
silence-until: 2026-01-09
# Improper application of excluded DNS name constraints when verifying wildcard names in crypto/x509
# Found in: crypto/x509@go1.23.12
# Fixed in: crypto/x509@go1.24.11
- id: GO-2025-4175
info: https://pkg.go.dev/vuln/GO-2025-4175
silence-until: 2026-01-09
ignored-vulnerabilities: []
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This is the CodeReady Toolchain Member Operator repository. It contains the Open

== Build

Requires Go version 1.23.x (1.23.12 or higher) - download for your development environment https://golang.org/dl/[here].
Requires Go version 1.24.x (1.24.11 or higher) - download for your development environment https://golang.org/dl/[here].

This repository uses https://github.com/golang/go/wiki/Modules[Go modules].

Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/toolchain.dev.openshift.com_idlers.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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: idlers.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: memberoperatorconfigs.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: memberstatuses.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: nstemplatesets.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: spacebindingrequests.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: spacerequests.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: toolchainclusters.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: useraccounts.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
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.17.3
controller-gen.kubebuilder.io/version: v0.18.0
name: workspaces.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
Expand Down
4 changes: 2 additions & 2 deletions config/scorecard/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resources:
- bases/config.yaml
patchesJson6902:
patches:
- path: patches/basic.config.yaml
target:
group: scorecard.operatorframework.io
Expand All @@ -13,4 +13,4 @@ patchesJson6902:
version: v1alpha3
kind: Configuration
name: config
#+kubebuilder:scaffold:patchesJson6902
#+kubebuilder:scaffold:patches
3 changes: 1 addition & 2 deletions controllers/idler/idler_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type Reconciler struct {
// and what is in the Idler.Spec
// Note:
// The Controller will requeue the Request to be processed again if the returned error is non-nil or
// Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
// Result.RequeueAfter > 0 is true, otherwise upon completion it will remove the work from the queue.
Copy link
Contributor

Choose a reason for hiding this comment

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

btw, idler controller still uses the Result.Requeue - shouldn't it be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thanks!! It was a leftover

func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)
logger.Info("new reconcile loop")
Expand Down Expand Up @@ -125,7 +125,6 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.
}
logger.Info("requeueing for next pod to check", "after_seconds", requeueAfter.Seconds())
result := reconcile.Result{
Requeue: true,
RequeueAfter: requeueAfter,
}
return result, r.setStatusReady(ctx, idler)
Expand Down
8 changes: 0 additions & 8 deletions controllers/idler/idler_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func TestEnsureIdling(t *testing.T) {

// then
require.NoError(t, err)
assert.True(t, res.Requeue)
assert.Equal(t, time.Duration(idler.Spec.TimeoutSeconds)*time.Second, res.RequeueAfter)
memberoperatortest.AssertThatIdler(t, idler.Name, fakeClients).HasConditions(memberoperatortest.Running())
})
Expand All @@ -150,7 +149,6 @@ func TestEnsureIdling(t *testing.T) {

// then
require.NoError(t, err)
assert.True(t, res.Requeue)
// the pods (without startTime) contain also a VM pod, so the next reconcile will be scheduled to the 1/12th of the timeout
assert.Equal(t, time.Duration(idler.Spec.TimeoutSeconds)*time.Second/12, res.RequeueAfter)
})
Expand Down Expand Up @@ -236,7 +234,6 @@ func TestEnsureIdling(t *testing.T) {
memberoperatortest.AssertThatIdler(t, idler.Name, fakeClients).
HasConditions(memberoperatortest.Running(), memberoperatortest.IdlerNotificationCreated())

assert.True(t, res.Requeue)
// something was idled, expect the next reconcile in 5% of the timeout
assertRequeueTimeInDelta(t, res.RequeueAfter, int32(float32(idler.Spec.TimeoutSeconds)*0.05/12))

Expand All @@ -259,7 +256,6 @@ func TestEnsureIdling(t *testing.T) {
HasConditions(memberoperatortest.Running(), memberoperatortest.IdlerNotificationCreated())

// no pods being tracked -> requeue after idler timeout
assert.True(t, res.Requeue)
assert.Equal(t, time.Duration(idler.Spec.TimeoutSeconds)*time.Second, res.RequeueAfter)
})
})
Expand All @@ -282,7 +278,6 @@ func TestEnsureIdling(t *testing.T) {

// then
require.NoError(t, err)
assert.True(t, res.Requeue)
// with VMs, it needs to be approx one twelfth of the idler timeout plus-minus one second
assertRequeueTimeInDelta(t, res.RequeueAfter, idler.Spec.TimeoutSeconds/12)

Expand All @@ -300,7 +295,6 @@ func TestEnsureIdling(t *testing.T) {

// then
require.NoError(t, err)
assert.True(t, res.Requeue)
// without VMs, it needs to be approx the idler timeout plus-minus one second
assertRequeueTimeInDelta(t, res.RequeueAfter, idler.Spec.TimeoutSeconds)
})
Expand Down Expand Up @@ -366,7 +360,6 @@ func TestEnsureIdling(t *testing.T) {

//then
require.NoError(t, err)
assert.True(t, res.Requeue)
// something was idled, expect the next reconcile in 5% of the timeout
assert.Equal(t, time.Duration(int32(float32(idler.Spec.TimeoutSeconds)*0.05/12))*time.Second, res.RequeueAfter)
memberoperatortest.AssertThatIdler(t, idler.Name, fakeClients).
Expand All @@ -389,7 +382,6 @@ func TestEnsureIdling(t *testing.T) {

//then
require.NoError(t, err)
assert.True(t, res.Requeue)
// pods (exceeding the timeout) are still running, expect the next reconcile in 5% of the timeout
assert.Equal(t, time.Duration(int32(float32(idler.Spec.TimeoutSeconds)*0.05/12))*time.Second, res.RequeueAfter)
memberoperatortest.AssertThatIdler(t, idler.Name, fakeClients).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Reconciler struct {
// and what is in the MemberOperatorConfig.Spec
// Note:
// The Controller will requeue the Request to be processed again if the returned error is non-nil or
// Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
// Result.RequeueAfter > 0 is true, otherwise upon completion it will remove the work from the queue.
func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
reqLogger := log.FromContext(ctx)
reqLogger.Info("Reconciling MemberOperatorConfig")
Expand Down
6 changes: 3 additions & 3 deletions controllers/useraccount/useraccount_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package useraccount
import (
"context"
"fmt"
rbac "k8s.io/api/rbac/v1"
"time"

rbac "k8s.io/api/rbac/v1"

toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1"
commoncontroller "github.com/codeready-toolchain/toolchain-common/controllers"
"github.com/codeready-toolchain/toolchain-common/pkg/condition"
Expand Down Expand Up @@ -64,7 +65,7 @@ type Reconciler struct {
// and what is in the UserAccount.Spec
// Note:
// The Controller will requeue the Request to be processed again if the returned error is non-nil or
// Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
// Result.RequeueAfter > 0 is true, otherwise upon completion it will remove the work from the queue.
func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)
logger.Info("reconciling UserAccount")
Expand Down Expand Up @@ -137,7 +138,6 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.
if ok && readyCond.Reason == toolchainv1alpha1.UserAccountUpdatingReason && time.Since(readyCond.LastTransitionTime.Time) <= time.Second {
// then don't do anything and just postpone the next reconcile
return ctrl.Result{
Requeue: true,
RequeueAfter: time.Second,
}, nil
}
Expand Down
Loading
Loading