CNTRLPLANE-3895: Bump kubernetes dependencies to v1.36 - #441
Conversation
…image to be consistent with ART for 5.0 Reconciling with https://github.com/openshift-eng/ocp-build-data/tree/af322abdd1a4d7d0161a69a16369a0ab1748515a/images/ose-cluster-openshift-controller-manager-operator.yml
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
WalkthroughThe project updates its Go directive and dependencies to newer versions, then aligns CI and Docker images with Go 1.26 and OpenShift 5.0 while preserving the existing build commands and artifact wiring. ChangesToolchain and platform alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@go.mod`:
- Around line 91-97: Update the go.opentelemetry.io/otel/sdk dependency from
v1.40.0 to v1.43.0 or later to use the version containing the security fix. Keep
the related OpenTelemetry dependency versions consistent with the refreshed SDK
requirements and preserve the existing indirect dependency declarations.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Signed-off-by: jubittajohn <jujohn@redhat.com>
Signed-off-by: jubittajohn <jujohn@redhat.com>
Signed-off-by: jubittajohn <jujohn@redhat.com>
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 3: Replace the Dockerfile’s broad COPY . . instruction with explicit COPY
instructions for only the source, configuration, dependency, and build files
required by the image. Do not rely on .dockerignore as the primary fix; ensure
unrelated build-context files are never copied.
- Around line 1-7: Update both the builder and final stages of the Dockerfile to
declare a supported non-root USER. Create or select the non-root user before the
build in the builder stage and ensure
/go/src/github.com/openshift/cluster-openshift-controller-manager-operator
remains writable; configure the final stage with the same or an appropriate
non-root user so the resulting image does not run as root.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder | ||
| WORKDIR /go/src/github.com/openshift/cluster-openshift-controller-manager-operator | ||
| COPY . . | ||
| RUN GO_COMPLIANCE_INFO=0 make build \ | ||
| && gzip cluster-openshift-controller-manager-operator-tests-ext | ||
|
|
||
| FROM registry.ci.openshift.org/ocp/4.22:base-rhel9 | ||
| FROM registry.ci.openshift.org/ocp/5.0:base-rhel9 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Run the image explicitly as non-root.
Neither stage declares USER, and Trivy reports that the resulting image runs as root. Add a supported non-root user to the builder and final stages, ensuring the build workspace remains writable. The deployment security context does not replace the image-level non-root requirement.
🧰 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
(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` around lines 1 - 7, Update both the builder and final stages of
the Dockerfile to declare a supported non-root USER. Create or select the
non-root user before the build in the builder stage and ensure
/go/src/github.com/openshift/cluster-openshift-controller-manager-operator
remains writable; configure the final stage with the same or an appropriate
non-root user so the resulting image does not run as root.
Sources: Path instructions, Linters/SAST tools
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder | ||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder | ||
| WORKDIR /go/src/github.com/openshift/cluster-openshift-controller-manager-operator | ||
| COPY . . |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Avoid copying the entire build context.
Replace COPY . . with explicit copies of the required source and build files. A reviewed .dockerignore is useful as an additional safeguard, but does not satisfy the requirement to avoid copying the entire context.
🤖 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 3, Replace the Dockerfile’s broad COPY . . instruction
with explicit COPY instructions for only the source, configuration, dependency,
and build files required by the image. Do not rely on .dockerignore as the
primary fix; ensure unrelated build-context files are never copied.
Source: Path instructions
|
/retest |
|
@jubittajohn: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@jubittajohn: This pull request references CNTRLPLANE-3895 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Bump kubernetes dependencies to
v1.36.2Summary by CodeRabbit