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
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ linters:
- testifylint
- unparam
- zerologlint
- copyloopvar
disable:
- contextcheck
- noctx
Expand Down
20 changes: 1 addition & 19 deletions .govulncheck.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
ignored-vulnerabilities:
# Request smuggling due to acceptance of invalid chunked data in net/http
# Found in Found in: net/http/internal@go1.22.12
# Fixed in Fixed in: net/http/internal@go1.23.8
- id: GO-2025-3563
info: https://pkg.go.dev/vuln/GO-2025-3563
silence-until: 2025-08-30
# Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows in os in syscall
# Found in Found in: os@go1.22.12
# Fixed in Fixed in: os@go1.23.10
- id: GO-2025-3750
info: https://pkg.go.dev/vuln/GO-2025-3750
silence-until: 2025-08-30
# Sensitive headers not cleared on cross-origin redirect in net/http
# Found in Found in: net/http@go1.22.12
# Fixed in Fixed in: net/http@go1.23.10
- id: GO-2025-3751
info: https://pkg.go.dev/vuln/GO-2025-3751
silence-until: 2025-08-30
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 Host Operator repository. It contains the OpenSh

== Build

Requires Go version 1.22.x (1.22.12 or higher) - download for your development environment https://golang.org/dl/[here].
Requires Go version 1.23.x (1.23.12 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
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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: bannedusers.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: masteruserrecords.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: notifications.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: nstemplatetiers.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: proxyplugins.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: socialevents.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: spacebindings.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: spaceprovisionerconfigs.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
Copy link

@coderabbitai coderabbitai bot Sep 4, 2025

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify repo-wide consistency and tool pin.
Please confirm all CRD bases carry v0.17.2 and that the repo pins/uses controller-tools v0.17.2 in generation scripts.

Run:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) All base CRDs should have v0.17.2 annotation
ok=$(mktemp)
fd -t f -e yaml config/crd/bases | xargs -I{} rg -nH 'controller-gen\.kubebuilder\.io/version:\s*v0\.17\.2\b' {} \
  | cut -d: -f1 | sort -u > "$ok"
comm -23 <(fd -t f -e yaml config/crd/bases | sort) <(cat "$ok") | sed 's/^/MISSING v0.17.2: /' || true

# 2) Check controller-tools pin (go.mod/tools or scripts)
rg -n 'sigs\.k8s\.io/controller-tools' -g 'go.mod' -S || true
rg -nP '\bcontroller-gen\b' -g 'Makefile' -S || true

Length of output: 567


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Verify all YAMLs under config/crd/bases include the v0.17.2 annotation
all_files=$(mktemp)
matched_files=$(mktemp)
find config/crd/bases -type f -name '*.yaml' | sort > "$all_files"
grep -RlnP 'controller-gen\.kubebuilder\.io/version:\s*v0\.17\.2\b' config/crd/bases | cut -d: -f1 | sort > "$matched_files"
comm -23 "$all_files" "$matched_files" | sed 's/^/MISSING v0.17.2: /' || true

# 2) Confirm controller-tools is pinned to v0.17.2 in go.mod
grep -n 'sigs.k8s.io/controller-tools' go.mod || true

# 3) Confirm controller-gen invocation in Makefile
grep -Pn '\bcontroller-gen\b.*' -n Makefile || true

Length of output: 457


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Verify CRD annotations
find config/crd/bases -type f -name '*.yaml' | while read -r f; do
  grep -qP 'controller-gen\.kubebuilder\.io/version:\s*v0\.17\.2\b' "$f" || echo "MISSING v0.17.2 in $f"
done

# 2) Search for controller-tools in go.mod
grep -R "sigs.k8s.io/controller-tools" -n go.mod || echo "controller-tools not referenced in go.mod"

# 3) Search for controller-gen usage and version pin in entire repo
grep -R "controller-gen" -n . || echo "controller-gen not referenced in repo"

# 4) Locate any Go tool management files (e.g., tools.go)
find . -type f -name '*tools.go'

Length of output: 5418


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Display the version pin for controller-gen in make/get-tool.mk
grep -n 'CONTROLLER_GEN_VERSION' -n make/get-tool.mk || true

# Show surrounding context to verify the pinned version
grep -n -C3 'CONTROLLER_GEN_VERSION' make/get-tool.mk || true

Length of output: 716


Pin controller-gen to v0.17.2
In make/get-tool.mk (line 2) update CONTROLLER_GEN_VERSION from v0.16.5 to v0.17.2 to match the CRD annotations.

🤖 Prompt for AI Agents
In config/crd/bases/toolchain.dev.openshift.com_spacerequests.yaml around line
6, the CRD annotation indicates controller-gen.kubebuilder.io/version: v0.17.2
but make/get-tool.mk still pins CONTROLLER_GEN_VERSION to v0.16.5; update
CONTROLLER_GEN_VERSION in make/get-tool.mk (line 2) from v0.16.5 to v0.17.2 so
the tool version used matches the CRD annotation.

✅ Addressed in commit 3022166

Copy link
Contributor

Choose a reason for hiding this comment

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

that's a nice catch!

Copy link

Choose a reason for hiding this comment

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

@xcoulon Thank you! Maintaining consistency between the tool version used for generation and the annotations in the generated CRDs is crucial for reproducible builds and avoiding potential schema drift. It's always good to catch these version mismatches early.


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that this is gonna be part of the next PR - this PR contains only generated CRDs from the api PR.
Apart from that, it would be good to drop the make/get-tool.mk file and use the versions from the go.mod file

Copy link

Choose a reason for hiding this comment

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

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Copy link
Contributor Author

@rsoaresd rsoaresd Sep 4, 2025

Choose a reason for hiding this comment

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

@xcoulon @MatousJobanek thanks for your comments!

I usually do a separate PR since this one is generated by api PR. But I can join them from now on to make it easier for review

Apart from that, it would be good to drop the make/get-tool.mk file and use the versions from the go.mod file

I will try to address it, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MatousJobanek controller-tools is not presented on go.mod, so maybe we can not drop make/get-tool.mk

Copy link
Contributor

Choose a reason for hiding this comment

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

this can be defined via the tool.go file - see an example from api repo:
https://github.com/codeready-toolchain/api/blob/master/tools.go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MatousJobanek, thanks! Addressed

name: spacerequests.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/toolchain.dev.openshift.com_spaces.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: spaces.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: tiertemplaterevisions.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
Expand Down
10 changes: 5 additions & 5 deletions config/crd/bases/toolchain.dev.openshift.com_tiertemplates.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: tiertemplates.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
Expand Down Expand Up @@ -113,14 +113,14 @@ spec:
the Template to Config transformation.
properties:
description:
description: Description of a parameter. Optional.
description: description of a parameter. Optional.
type: string
displayName:
description: 'Optional: The name that will show in UI instead
of parameter ''Name'''
type: string
from:
description: From is an input value for the generator. Optional.
description: from is an input value for the generator. Optional.
type: string
generate:
description: |-
Expand All @@ -139,7 +139,7 @@ spec:
type: string
name:
description: |-
Name must be set and it can be referenced in Template
name must be set and it can be referenced in Template
Items using ${PARAMETER_NAME}. Required.
type: string
required:
Expand All @@ -148,7 +148,7 @@ spec:
type: boolean
value:
description: |-
Value holds the Parameter data. If specified, the generator will be
value holds the Parameter data. If specified, the generator will be
ignored. The value replaces all occurrences of the Parameter ${Name}
expression during the Template to Config transformation. Optional.
type: string
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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: toolchainconfigs.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: toolchainstatuses.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: usersignups.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.16.5
controller-gen.kubebuilder.io/version: v0.17.2
name: usertiers.toolchain.dev.openshift.com
spec:
group: toolchain.dev.openshift.com
Expand Down
Loading
Loading