MCO-2244: Update MCO dependencies to Kubernetes 1.36 - #6321
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe Docker build and Go dependency baselines advance to OpenShift 5.0 and Go 1.26. Controller, daemon, and operator event emissions now use explicit string format arguments without changing event conditions or control flow. ChangesPlatform and dependency updates
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 16: Update the final image stage based on FROM
registry.ci.openshift.org/ocp/5.0:base-rhel9 to add a HEALTHCHECK instruction
and set a non-root USER before ENTRYPOINT. Ensure the chosen user can execute
the entrypoint and that the container never runs as root.
- Line 5: Replace the broad COPY directives in both builder stages with explicit
copies of only the source files required by make install
DESTDIR=./instroot-rhel9 and make install DESTDIR=./instroot-rhel8. Update
Dockerfile lines 5-5 and 13-13 consistently, preserving each stage’s existing
build behavior while excluding sensitive and unnecessary context files.
In `@go.mod`:
- Line 222: Update the go.opentelemetry.io/otel/sdk dependency from v1.40.0 to a
patched release that invokes kenv using an absolute path, and regenerate the
vendor contents so vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go
reflects the upgraded implementation.
In `@pkg/daemon/daemon.go`:
- Line 1548: Update the Eventf call in the Config Drift Monitor startup path so
ConfigDriftMonitorStarted remains the event reason, move the descriptive “Config
Drift Monitor started, watching against” text into the format argument, and
retain odc.currentConfig.Name as the formatted event detail.
🪄 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 rhel9-builder | ||
| ARG TAGS="" | ||
| WORKDIR /go/src/github.com/openshift/machine-config-operator | ||
| COPY . . |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Avoid copying the entire build context.
Both builder stages copy the entire build context (COPY . .), which violates the container security path instructions. This practice can unintentionally include sensitive files or unnecessary dependencies, and it degrades layer caching.
Dockerfile#L5-L5: update toCOPYonly the specific source files needed formake install DESTDIR=./instroot-rhel9.Dockerfile#L13-L13: update toCOPYonly the specific source files needed formake install DESTDIR=./instroot-rhel8.
📍 Affects 1 file
Dockerfile#L5-L5(this comment)Dockerfile#L13-L13
🤖 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 5, Replace the broad COPY directives in both builder
stages with explicit copies of only the source files required by make install
DESTDIR=./instroot-rhel9 and make install DESTDIR=./instroot-rhel8. Update
Dockerfile lines 5-5 and 13-13 consistently, preserving each stage’s existing
build behavior while excluding sensitive and unnecessary context files.
Source: Path instructions
| RUN make install DESTDIR=./instroot-rhel8 | ||
|
|
||
| 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
Apply required container security practices to the final image.
The final stage does not comply with the following container security path instructions:
- USER non-root: The final image must specify a non-root user (e.g.,
USER 1000orUSER nonroot) and never run as root. The stage inherits the default root user and does not switch users before theENTRYPOINT. - HEALTHCHECK defined: The image must define a
HEALTHCHECKinstruction to allow runtime orchestration tools to monitor the container's health.
🤖 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 16, Update the final image stage based on FROM
registry.ci.openshift.org/ocp/5.0:base-rhel9 to add a HEALTHCHECK instruction
and set a non-root USER before ENTRYPOINT. Ensure the chosen user can execute
the entrypoint and that the container never runs as root.
Source: Path instructions
| go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect | ||
| go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect | ||
| go.opentelemetry.io/otel/metric v1.41.0 // indirect | ||
| go.opentelemetry.io/otel/sdk v1.40.0 // indirect |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if the vulnerable opentelemetry code exists in the vendor directory.
if [ -d "vendor/go.opentelemetry.io/otel/sdk" ]; then
rg -i "kenv" vendor/go.opentelemetry.io/otel/sdk || echo "kenv not found in vendored opentelemetry code."
else
echo "go.opentelemetry.io/otel/sdk is not vendored."
fiRepository: openshift/machine-config-operator
Length of output: 567
Upgrade go.opentelemetry.io/otel/sdk
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go still calls kenv without an absolute path, so go.opentelemetry.io/otel/sdk v1.40.0 remains exposed to GHSA-hfvc-g4fc-pqhx. Bump to a patched release.
🧰 Tools
🪛 OSV Scanner (2.4.0)
[HIGH] 222-222: go.opentelemetry.io/otel/sdk 1.40.0: opentelemetry-go: BSD kenv command not using absolute path enables PATH hijacking
🤖 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 `@go.mod` at line 222, Update the go.opentelemetry.io/otel/sdk dependency from
v1.40.0 to a patched release that invokes kenv using an absolute path, and
regenerate the vendor contents so
vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go reflects the upgraded
implementation.
Sources: Path instructions, Learnings, Linters/SAST tools
|
/test unit |
|
/lgtm |
|
/lgtm please! |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dkhater-redhat, proietfb The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-aws-ovn |
|
/jira refresh |
|
@proietfb: No Jira issue is referenced in the title of this pull request. 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. |
|
/test e2e-aws-ovn |
|
/retitle MCO-2244: Update MCO dependencies to Kubernetes 1.36 |
|
@proietfb: This pull request references MCO-2244 which is a valid jira issue. 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. |
|
/jira refresh |
|
@proietfb: This pull request references MCO-2244 which is a valid jira issue. 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. |
|
/test e2e-aws-ovn |
2 similar comments
|
/test e2e-aws-ovn |
|
/test e2e-aws-ovn |
|
New changes are detected. LGTM label has been removed. |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
|
/pipeline required |
|
Scheduling tests matching the |
|
/payload 5.0 nightly blocking |
|
@proietfb: trigger 14 job(s) of type blocking for the nightly release of OCP 5.0
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/f7165910-8a5b-11f1-8ed4-e4fc21fc74d8-0 |
|
/test bootstrap-unit |
|
/payload-job periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-1of3 periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-2of3 periodic-ci-openshift-machine-config-operator-release-5.0-periodics-e2e-aws-mco-disruptive-techpreview-3of3 |
|
@isabella-janssen: trigger 3 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/41d59350-8a87-11f1-9934-1cb4e03e7b80-0 |
|
/payload-job periodic-ci-openshift-release-main-ci-5.0-e2e-aws-upgrade-ovn-single-node periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-upgrade-fips periodic-ci-openshift-release-main-nightly-5.0-e2e-aws-ovn-serial-1of2 periodic-ci-openshift-release-main-ci-5.0-e2e-aws-ovn-techpreview-serial-2of3 periodic-ci-openshift-release-main-nightly-5.0-e2e-metal-ipi-ovn-ipv4 |
|
@proietfb: trigger 5 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/20333e40-8a97-11f1-82ae-5048d714fd97-0 |
|
/pipeline required |
|
Scheduling tests matching the |
|
@proietfb: 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. |
|
/pipeline required |
|
Scheduling tests matching the |
- What I did
k8s.io/kubernetesdependency to1.36.21.36.2k8s.io/cri-streamingandk8s.io/streamingnewopenshift/kubernetesdepsgithub.com/openshift/onsi-ginkgo/v2DockerfileandDockerfile.rhel7to be consistent with5.0refs- How to verify it
rg -e "1\.26\.0" go.modrg -ce "github\.com\/openshift\/kubernetes" go.mod==33rg -e "20260716191900-78acd4d422b2" go.mod -c==33- Description for the changelog
MCO-2244
Summary by CodeRabbit
Bug Fixes
%characters.Chores