From cd3cfaf734e8596c052391a5174e99ebf1b72ee8 Mon Sep 17 00:00:00 2001 From: Lukas Krejci Date: Tue, 11 Nov 2025 17:06:10 +0100 Subject: [PATCH 1/4] configure the field owner for the toolchainclusterresources controller that now uses SSA --- cmd/main.go | 8 +++++--- go.mod | 2 ++ go.sum | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 33befcc1c..2d3b87f59 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -33,6 +33,7 @@ import ( "github.com/codeready-toolchain/host-operator/pkg/apis" "github.com/codeready-toolchain/host-operator/pkg/capacity" "github.com/codeready-toolchain/host-operator/pkg/cluster" + "github.com/codeready-toolchain/host-operator/pkg/constants" "github.com/codeready-toolchain/host-operator/pkg/metrics" "github.com/codeready-toolchain/host-operator/pkg/segment" "github.com/codeready-toolchain/host-operator/pkg/templates/nstemplatetiers" @@ -227,9 +228,10 @@ func main() { // nolint:gocyclo // Setup all Controllers if err = (&toolchainclusterresources.Reconciler{ - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - Templates: &deploy.ToolchainClusterTemplateFS, + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + Templates: &deploy.ToolchainClusterTemplateFS, + FieldManager: constants.HostOperatorFieldManager, }).SetupWithManager(mgr, namespace); err != nil { setupLog.Error(err, "unable to create controller", "controller", "ToolchainClusterResources") os.Exit(1) diff --git a/go.mod b/go.mod index 38de29617..01c657ed0 100644 --- a/go.mod +++ b/go.mod @@ -153,3 +153,5 @@ require ( go 1.23.0 toolchain go1.23.12 + +replace github.com/codeready-toolchain/toolchain-common => github.com/metlos/toolchain-common v0.0.0-20251111121252-51518cd65180 diff --git a/go.sum b/go.sum index a72cb2ede..fb041c96d 100644 --- a/go.sum +++ b/go.sum @@ -37,8 +37,6 @@ github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/codeready-toolchain/api v0.0.0-20251008084914-06282b83d4cd h1:A6WOUwlUdgOf4PDzzgKvycRj4Pk+1F6npWV4YoPVFcM= github.com/codeready-toolchain/api v0.0.0-20251008084914-06282b83d4cd/go.mod h1:TiQ/yNv3cGL4nxo3fgRtcHyYYuRf+nAgs6B1IAqvxOU= -github.com/codeready-toolchain/toolchain-common v0.0.0-20251006132314-2591ebe0bdb1 h1:jqs4yOuJbfW3CKe1EMJkkDo47wTKQ4M1OKox4DYWsKg= -github.com/codeready-toolchain/toolchain-common v0.0.0-20251006132314-2591ebe0bdb1/go.mod h1:eySMK8JR/Py9eoUJlAkOXqvfPp1vjl39scgrECr99XM= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -200,6 +198,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/metlos/toolchain-common v0.0.0-20251111121252-51518cd65180 h1:MFy4SQFym+uNVFWmVwXr2T6F0o92WTXM1DOvLIgs09c= +github.com/metlos/toolchain-common v0.0.0-20251111121252-51518cd65180/go.mod h1:5i7k9O0yVftzJwsjSjJjoXMYtUPkiirVsEswuaC8/5I= github.com/migueleliasweb/go-github-mock v0.0.18 h1:0lWt9MYmZQGnQE2rFtjlft/YtD6hzxuN6JJRFpujzEI= github.com/migueleliasweb/go-github-mock v0.0.18/go.mod h1:CcgXcbMoRnf3rRVHqGssuBquZDIcaplxL2W6G+xs7kM= github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ= From b05c14889b7354eb5c63c8abb70ad3f85de54f3b Mon Sep 17 00:00:00 2001 From: Rajiv Senthilnathan Date: Wed, 19 Nov 2025 22:07:42 -0500 Subject: [PATCH 2/4] Update ResourceQuota for base1ns namespace (#1216) * Update RQ for base1ns namespace * Add limits and update base template too --- deploy/templates/nstemplatetiers/base/cluster.yaml | 2 ++ deploy/templates/nstemplatetiers/base1ns/ns_dev.yaml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/deploy/templates/nstemplatetiers/base/cluster.yaml b/deploy/templates/nstemplatetiers/base/cluster.yaml index 4c6b3cbb5..df2d3d4dc 100644 --- a/deploy/templates/nstemplatetiers/base/cluster.yaml +++ b/deploy/templates/nstemplatetiers/base/cluster.yaml @@ -13,10 +13,12 @@ objects: limits.cpu: 40000m limits.memory: ${MEMORY_LIMIT} limits.ephemeral-storage: 15Gi + limits.nvidia.com/gpu: 0 requests.cpu: 6000m requests.memory: ${MEMORY_REQUEST} requests.storage: 60Gi requests.ephemeral-storage: 15Gi + requests.nvidia.com/gpu: 0 count/persistentvolumeclaims: "5" selector: annotations: null diff --git a/deploy/templates/nstemplatetiers/base1ns/ns_dev.yaml b/deploy/templates/nstemplatetiers/base1ns/ns_dev.yaml index 32d5b6935..490226284 100644 --- a/deploy/templates/nstemplatetiers/base1ns/ns_dev.yaml +++ b/deploy/templates/nstemplatetiers/base1ns/ns_dev.yaml @@ -75,8 +75,10 @@ objects: hard: limits.cpu: 30000m limits.memory: ${MEMORY_LIMIT} + limits.nvidia.com/gpu: 0 requests.cpu: 3000m requests.memory: ${MEMORY_REQUEST} + requests.nvidia.com/gpu: 0 - apiVersion: v1 kind: ResourceQuota metadata: @@ -88,8 +90,10 @@ objects: hard: limits.cpu: 20000m limits.memory: ${MEMORY_BUILD_LIMIT} + limits.nvidia.com/gpu: 0 requests.cpu: 3000m requests.memory: ${MEMORY_BUILD_REQUEST} + requests.nvidia.com/gpu: 0 - apiVersion: v1 kind: ResourceQuota metadata: From 300124302f54d3d08976dd8a367de935aa0ffe35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:10:10 -0800 Subject: [PATCH 3/4] chore(deps): bump actions/checkout from 5 to 6 (#1218) Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci-check-gomod.yml | 2 +- .github/workflows/ci-golang-sbom.yml | 4 ++-- .github/workflows/govulncheck.yml | 2 +- .github/workflows/operator-cd.yml | 2 +- .github/workflows/publish-operators-for-e2e-tests.yml | 4 ++-- .github/workflows/test-with-coverage.yml | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-check-gomod.yml b/.github/workflows/ci-check-gomod.yml index f6499d766..dfa864551 100644 --- a/.github/workflows/ci-check-gomod.yml +++ b/.github/workflows/ci-check-gomod.yml @@ -12,6 +12,6 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: check uses: codeready-toolchain/toolchain-cicd/gomod-check@master diff --git a/.github/workflows/ci-golang-sbom.yml b/.github/workflows/ci-golang-sbom.yml index 92b63a880..4ecc441a0 100644 --- a/.github/workflows/ci-golang-sbom.yml +++ b/.github/workflows/ci-golang-sbom.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install Go uses: actions/setup-go@v6 @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Install Go uses: actions/setup-go@v6 diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 0338a668e..013ae2114 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -11,7 +11,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Run govulncheck uses: codeready-toolchain/toolchain-cicd/govulncheck-action@master diff --git a/.github/workflows/operator-cd.yml b/.github/workflows/operator-cd.yml index 2b0b3878c..178cd6870 100644 --- a/.github/workflows/operator-cd.yml +++ b/.github/workflows/operator-cd.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/publish-operators-for-e2e-tests.yml b/.github/workflows/publish-operators-for-e2e-tests.yml index ceb278e84..ab9fa23df 100644 --- a/.github/workflows/publish-operators-for-e2e-tests.yml +++ b/.github/workflows/publish-operators-for-e2e-tests.yml @@ -17,7 +17,7 @@ jobs: steps: # Checkout from PR event - in that case the comment field is empty - name: Checkout code from PR event - uses: actions/checkout@v5 + uses: actions/checkout@v6 if: ${{ github.event.comment == '' }} with: ref: ${{github.event.pull_request.head.ref}} @@ -38,7 +38,7 @@ jobs: # Checkout the code based on the data retrieved from the previous step # Is executed only for comment events - in that case the pull_request field is empty - name: Checkout code from PR - uses: actions/checkout@v5 + uses: actions/checkout@v6 if: ${{ github.event.pull_request == '' }} with: repository: ${{ fromJson(steps.request.outputs.data).head.repo.full_name }} diff --git a/.github/workflows/test-with-coverage.yml b/.github/workflows/test-with-coverage.yml index 889214cb4..29ff38dec 100644 --- a/.github/workflows/test-with-coverage.yml +++ b/.github/workflows/test-with-coverage.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Checkout code - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} From 2ec06665e34f74301e6987e5c3c74d9b667ceb21 Mon Sep 17 00:00:00 2001 From: Lukas Krejci Date: Tue, 25 Nov 2025 19:46:23 +0100 Subject: [PATCH 4/4] update to the new toolchain-common --- go.mod | 4 +--- go.sum | 4 ++++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 01c657ed0..4dc2250ab 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/codeready-toolchain/host-operator require ( cloud.google.com/go/recaptchaenterprise/v2 v2.13.0 github.com/codeready-toolchain/api v0.0.0-20251008084914-06282b83d4cd - github.com/codeready-toolchain/toolchain-common v0.0.0-20251006132314-2591ebe0bdb1 + github.com/codeready-toolchain/toolchain-common v0.0.0-20251125180949-6ed5aeed75e4 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/go-logr/logr v1.4.2 github.com/gofrs/uuid v4.4.0+incompatible @@ -153,5 +153,3 @@ require ( go 1.23.0 toolchain go1.23.12 - -replace github.com/codeready-toolchain/toolchain-common => github.com/metlos/toolchain-common v0.0.0-20251111121252-51518cd65180 diff --git a/go.sum b/go.sum index fb041c96d..54fdb1cc7 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,10 @@ github.com/cloudflare/circl v1.6.1/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZ github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/codeready-toolchain/api v0.0.0-20251008084914-06282b83d4cd h1:A6WOUwlUdgOf4PDzzgKvycRj4Pk+1F6npWV4YoPVFcM= github.com/codeready-toolchain/api v0.0.0-20251008084914-06282b83d4cd/go.mod h1:TiQ/yNv3cGL4nxo3fgRtcHyYYuRf+nAgs6B1IAqvxOU= +github.com/codeready-toolchain/toolchain-common v0.0.0-20251121173236-e8b11c5f0284 h1:19VrHE1M0XtKvuZyh0yrFTGf4NC/Z2Js7a/LkF5pGaE= +github.com/codeready-toolchain/toolchain-common v0.0.0-20251121173236-e8b11c5f0284/go.mod h1:5i7k9O0yVftzJwsjSjJjoXMYtUPkiirVsEswuaC8/5I= +github.com/codeready-toolchain/toolchain-common v0.0.0-20251125180949-6ed5aeed75e4 h1:OZd7C6PZMc3BL5CD2NAHxWc1VKtuSjRUJtvEuFBVDEE= +github.com/codeready-toolchain/toolchain-common v0.0.0-20251125180949-6ed5aeed75e4/go.mod h1:5i7k9O0yVftzJwsjSjJjoXMYtUPkiirVsEswuaC8/5I= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=