Skip to content

REPLACE-WITH-JIRA-KEY: Bump Kubernetes dependencies to v1.36.2#736

Draft
dfarrell07 wants to merge 7 commits into
openshift:masterfrom
dfarrell07:bump1.36-20260718185023
Draft

REPLACE-WITH-JIRA-KEY: Bump Kubernetes dependencies to v1.36.2#736
dfarrell07 wants to merge 7 commits into
openshift:masterfrom
dfarrell07:bump1.36-20260718185023

Conversation

@dfarrell07

@dfarrell07 dfarrell07 commented Jul 18, 2026

Copy link
Copy Markdown

Summary

Bump all k8s.io/* dependencies from v0.35.2 to v0.36.2 (Kubernetes 1.36.2),
Go from 1.25.0 to 1.26.0, and controller-runtime from v0.20.4 to v0.24.1.

What changed

  • Dependency bump: k8s.io/api, apimachinery, client-go, apiserver,
    apiextensions-apiserver, component-base, controller-manager, streaming
    all bumped to v0.36.2. controller-runtime bumped to v0.24.1.
  • Go version: 1.25.0 → 1.26.0 across go.mod, Dockerfiles, and CI config
  • golangci-lint: v1.54.2 → v2.12.2 (v1 cannot parse Go 1.26)
  • New .golangci.yml: Added for golangci-lint v2 configuration
  • Deprecated API cleanup: Migrated io/ioutil to os, klog v1 to v2
  • Lint fixes: Removed duplicate imports, dead code, fixed capitalized
    error strings (ST1005), suppressed pre-existing staticcheck warnings
  • KIND image: v1.27.3 → v1.36.1 with kubeadm v1beta4 extraArgs format
  • Format string fix: IntOrString type with %q verb in utils.go
  • ENVTEST: Bumped to 1.36, setup-envtest to release-0.24

Commits

Hash Description Type
c62e14c Rebase k8s-rebase-1.36.2 to k8s 1.36 mechanical
0b128f0 Update version references for k8s 1.36 mechanical
affa0d4 Fix fmt.Errorf format string for IntOrString type fix
f440977 Bump golangci-lint from v1.54.2 to v2.12.2 fix
6f487bd Migrate klog v1 imports to klog/v2 fix
80179ae Add .golangci.yml for golangci-lint v2 fix
96e48ae Migrate io/ioutil to os and deduplicate imports fix
8171d38 Remove duplicate package imports fix
d87c341 Fix capitalized error strings (ST1005) fix
00894c2 Remove dead code and unnecessary Sprintf fix
639c0cb Fix .golangci.yml: move QF checks to staticcheck settings fix
de23a5f Suppress pre-existing staticcheck warnings fix
ec8db5c4 ci: bump KIND image to v1.36.1 and update kubeadm config fix
495eb018 deps: remove unused k8s.io/klog v1 from go.mod and vendor fix

Verification

  • go build ./... — PASS
  • go vet ./... — PASS
  • golangci-lint run — PASS
  • Unit tests (6/8 packages) — PASS (2 envtest packages need kubebuilder binaries)
  • go test -run='^$' ./... — PASS (test compilation verified)

All commits carry Assisted-by: Claude Code and Signed-off-by trailers.

Summary by CodeRabbit

  • Improvements

    • Updated the Go toolchain and Kubernetes development environment to newer versions.
    • Refreshed development and linting tools for improved compatibility with current workflows.
    • Updated local Kind clusters to use a newer Kubernetes version.
    • Modernized file handling and logging components without changing application behavior.
  • Bug Fixes

    • Improved the clarity of validation errors for invalid port ranges.
    • Preserved cluster logging verbosity while updating configuration compatibility.

go get k8s.io/api@v0.36.2
go get k8s.io/apiextensions-apiserver@v0.36.2
go get k8s.io/apimachinery@v0.36.2
go get k8s.io/apiserver@v0.36.2
go get k8s.io/client-go@v0.36.2
go get k8s.io/component-base@v0.36.2
go get sigs.k8s.io/controller-runtime@v0.24.1
go get github.com/openshift/api
go get github.com/openshift/library-go
go get k8s.io/klog
go get k8s.io/klog/v2
go get k8s.io/kube-openapi
go get k8s.io/kubernetes
go get k8s.io/utils
go get sigs.k8s.io/apiserver-network-proxy/konnectivity-client
go get sigs.k8s.io/json
go get sigs.k8s.io/randfill
go get sigs.k8s.io/structured-merge-diff/v6
go get sigs.k8s.io/yaml
go mod tidy

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
./Dockerfile
./Dockerfile.daemon
Makefile

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
The IntOrString type does not satisfy the %q verb directly.
Use .String() to convert before formatting.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
golangci-lint v1 cannot parse Go 1.26 source. Update the version
in both the Makefile prereqs target and hack/lint.sh container
invocation. The v2 import path uses golangci-lint/v2/cmd/.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Update the kindest/node image from v1.27.3 to v1.36.1 to match
the k8s 1.36 rebase. Convert kubeadm extraArgs from the old
map format to the v1beta4 list-of-{name,value} format.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
Replace io/ioutil.ReadFile with os.ReadFile and
io/ioutil.ReadDir with os.ReadDir. Migrate klog v1 imports
to klog/v2. io/ioutil was removed in Go 1.24, and klog v1
is deprecated in favor of v2.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
All imports have migrated to klog/v2. Remove the unused v1
dependency and its vendored files.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Assisted-by: Claude Code <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 18, 2026
@openshift-ci

openshift-ci Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dfarrell07
Once this PR has been reviewed and has the lgtm label, please assign danwinship for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Walkthrough

Go 1.26, Kubernetes 1.36, dependency, container, development-tool, Kind configuration, logging, standard-library, and error-formatting updates are applied across the project.

Changes

Toolchain modernization

Layer / File(s) Summary
Go toolchain and module dependency baseline
Dockerfile, Dockerfile.daemon, go.mod
Go builder images and the Go module graph are upgraded, including Kubernetes dependencies and the migration from klog to klog/v2.
Development tools and Kind environment
Makefile, hack/kind-cluster.sh, hack/lint.sh
Envtest, golangci-lint, and Kind versions are updated; Kind verbosity arguments use the revised configuration structure.
Source compatibility and standard-library migrations
pkg/bpf-mgr/lib-bpfman.go, pkg/ebpf/ingress_node_firewall_loader.go, pkg/render/render.go, pkg/utils/utils.go
Logging imports and deprecated ioutil calls are replaced, while invalid port-range error formatting is adjusted.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: bumping Kubernetes-related dependencies to v1.36.2.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed No changed *_test.go/suite.go files or Ginkgo spec files were present in the PR diff, so there are no test titles to flag.
Test Structure And Quality ✅ Passed No Ginkgo test files changed in this PR; the diff is limited to go.mod, go.sum, and vendor updates.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added in the PR; the changed project Go files contain no It/Describe/Context/When markers or MicroShift guards.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests were added or modified; the diff only updates deps/vendor files, so SNO compatibility review is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only go.mod/go.sum and vendor/klog files changed; no manifests/controllers or scheduling constraints were added.
Ote Binary Stdout Contract ✅ Passed No stdout writes were added in main/init/BeforeSuite/AfterSuite code; changed klog usage is confined to non-entrypoint helper funcs, with no new stdout redirection gaps.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only changes build/dependency/runtime files, so the IPv6/disconnected-network check is not applicable.
No-Weak-Crypto ✅ Passed No added weak-crypto primitives, custom crypto, or non-constant-time secret comparisons appear in the PR diff; remaining hits are vendor docs/profile tables.
Container-Privileges ✅ Passed Full PR diff only bumps versions and kubeadm format; no new privileged/host namespace/securityContext flags were introduced.
No-Sensitive-Data-In-Logs ✅ Passed PR changes only imports/deps and file-read APIs; no new log statements or secret-bearing fields were added in the changed hunks.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Dockerfile.daemon (1)

7-10: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Add a non-root USER and a HEALTHCHECK directive.

As per path instructions for container security, the final image must not run as root (specify a USER directive) and must define a HEALTHCHECK.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile.daemon` around lines 7 - 10, Add a non-root USER directive and a
HEALTHCHECK directive to the final image stage after the daemon and syslog
binaries are copied, ensuring the container runs as an unprivileged user and
exposes a health-check command.

Sources: Path instructions, Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Line 1: Pin the golang base images in the Dockerfile and Dockerfile.daemon
FROM directives by replacing the mutable golang:1.26 tag with the approved
sha256 digest, preserving the existing image usage and build configuration.

In `@Dockerfile.daemon`:
- Line 3: Replace the broad COPY instruction in the Docker build with explicit
COPY directives for only the files and directories required by the daemon image.
Exclude secrets, local environment artifacts, and unrelated build-context files
while preserving the image’s existing build requirements.

---

Outside diff comments:
In `@Dockerfile.daemon`:
- Around line 7-10: Add a non-root USER directive and a HEALTHCHECK directive to
the final image stage after the daemon and syslog binaries are copied, ensuring
the container runs as an unprivileged user and exposes a health-check command.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

Comment thread Dockerfile
@@ -1,5 +1,5 @@
# Build the manager binary

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Pin non-Red Hat container images by digest.

As per path instructions for container security, non-Red Hat images must be pinned by digest (e.g., @sha256:...) instead of relying on mutable tags to ensure supply chain security and deterministic builds.

  • Dockerfile#L2-2: Replace the golang:1.26 tag with its sha256 digest.
  • Dockerfile.daemon#L1-1: Replace the golang:1.26 tag with its sha256 digest.
🧰 Tools
🪛 Trivy (0.72.0)

[error] 1-1: Image user should not be 'root'

Specify at least 1 USER command in Dockerfile with non-root user as argument

Rule: DS-0002

Learn more

(IaC/Dockerfile)


[error] 1-1: Image user should not be 'root'

Specify at least 1 USER command in Dockerfile with non-root user as argument

Rule: DS-0002

Learn more

(IaC/Dockerfile)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` at line 1, Pin the golang base images in the Dockerfile and
Dockerfile.daemon FROM directives by replacing the mutable golang:1.26 tag with
the approved sha256 digest, preserving the existing image usage and build
configuration.

Source: Path instructions

Comment thread Dockerfile.daemon
FROM golang:1.25 AS builder
FROM golang:1.26 AS builder
WORKDIR /go/src/github.com/openshift/ingress-node-firewall
COPY . .

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Copy specific files instead of the entire context.

As per path instructions for container security, you must copy specific files rather than the entire build context (COPY . .). This prevents unintended files (e.g., secrets, local environment artifacts) from leaking into the container and improves cache efficiency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile.daemon` at line 3, Replace the broad COPY instruction in the
Docker build with explicit COPY directives for only the files and directories
required by the daemon image. Exclude secrets, local environment artifacts, and
unrelated build-context files while preserving the image’s existing build
requirements.

Source: Path instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant