Skip to content

AUTOSCALE-644: Release chores 5.0 for Karpenter#18

Merged
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
maxcao13:5.0-release-chores
Jul 23, 2026
Merged

AUTOSCALE-644: Release chores 5.0 for Karpenter#18
openshift-merge-bot[bot] merged 2 commits into
openshift:mainfrom
maxcao13:5.0-release-chores

Conversation

@maxcao13

@maxcao13 maxcao13 commented Jul 23, 2026

Copy link
Copy Markdown
Member

First, had to create a new script update-vendor.sh similar to the other scripts that we maintain in our other autoscaling repos.

Next:

Used these commands in this order (or some configuration of these commands). Note the steps here for the 5.1 rebase cycle.

sed -i 's/1\.25/1.26/' .ci-operator.yaml Dockerfile
sed -i 's/^go 1\.25/^go 1.26/' go.mod
sed -i 's/release-4\.22/release-5.0/; s/\(kube_release="v\)[0-9.]*/\10.36.0/' hack/update-vendor.sh
./hack/update-vendor.sh

# check latest tool versions and replace if applicable
# controller-gen
curl -sL "https://proxy.golang.org/sigs.k8s.io/controller-tools/@latest" | jq -r .Version
# golangci-lint
curl -sL "https://proxy.golang.org/github.com/golangci/golangci-lint/v2/@latest" | jq -r .Version
# yq
curl -sL "https://proxy.golang.org/github.com/mikefarah/yq/v4/@latest" | jq -r .Version
# helm
curl -sL "https://api.github.com/repos/helm/helm/releases/latest" | jq -r .tag_name


sed -i 's/4\.22/5.0/g' Dockerfile .ci-operator.yaml hack/manifest-diff-upstream.sh
make manifest-diff-sync

make verify

Note that this requires our karpenter forks to finish their rebase cycle since we need to sync crds and rbac. And they are finished for 5.0 (thanks Ayush!)

Summary by CodeRabbit

  • New Features

    • Added EC2 node configuration options for connection tracking, CPU virtualization, network interfaces, and placement groups.
    • Added capacity reservation interruptibility status information.
    • Expanded Kubernetes resource validation and list-handling behavior.
  • Bug Fixes

    • Corrected permissions so required resources can be listed reliably.
  • Chores

    • Updated development, validation, and Kubernetes tooling to newer versions.
    • Refreshed dependency versions and vendored components.

maxcao13 added 2 commits July 22, 2026 19:53
Adds a script which can be used during rebase chores to update go deps and vendor.
It can also be used to update the to the latest karpenter fork go deps.
This requires the karpenter/aws/azure forks to be updated before this repo.

Signed-off-by: Max Cao <macao@redhat.com>
Signed-off-by: Max Cao <macao@redhat.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 23, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 23, 2026

Copy link
Copy Markdown

@maxcao13: This pull request references AUTOSCALE-644 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

First, had to create a new script update-vendor.sh similar to the other scripts that we maintain in our other autoscaling repos.

Next:

Used these commands in this order (or some configuration of these commands). Note the steps here for the 5.1 rebase cycle.

sed -i 's/1\.25/1.26/' .ci-operator.yaml Dockerfile
sed -i 's/^go 1\.25/^go 1.26/' go.mod
sed -i 's/release-4\.22/release-5.0/; s/\(kube_release="v\)[0-9.]*/\10.36.0/' hack/update-vendor.sh
./hack/update-vendor.sh

# check latest tool versions and replace if applicable
# controller-gen
curl -sL "https://proxy.golang.org/sigs.k8s.io/controller-tools/@latest" | jq -r .Version
# golangci-lint
curl -sL "https://proxy.golang.org/github.com/golangci/golangci-lint/v2/@latest" | jq -r .Version
# yq
curl -sL "https://proxy.golang.org/github.com/mikefarah/yq/v4/@latest" | jq -r .Version
# helm
curl -sL "https://api.github.com/repos/helm/helm/releases/latest" | jq -r .tag_name


sed -i 's/4\.22/5.0/g' Dockerfile .ci-operator.yaml hack/manifest-diff-upstream.sh
make manifest-diff-sync

make verify

Note that this requires our karpenter forks to finish their rebase cycle since we need to sync crds and rbac. And they are finished for 5.0 (thanks Ayush!)

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.

@openshift-ci
openshift-ci Bot requested review from jkyros and joelsmith July 23, 2026 03:04
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maxcao13

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Walkthrough

Updated development tool pins and Go dependencies, refreshed Karpenter CRD schemas with new fields and Kubernetes typing metadata, and corrected two RBAC verb entries.

Changes

Karpenter dependency and manifest refresh

Layer / File(s) Summary
Dependency and tooling updates
hack/update-vendor.sh, go.mod, Makefile
Adds automated vendor updates and bumps Go module, fork replacement, and local tool versions.
EC2NodeClass schema
install/00_autoscaling.openshift.io_karpenters.yaml, pkg/assets/crds/karpenter.k8s.aws_ec2nodeclasses.yaml
Adds connection tracking, nested virtualization, network interface, placement group, and capacity reservation schema fields.
Karpenter CRD schema metadata
pkg/assets/crds/karpenter.sh_nodeclaims.yaml, pkg/assets/crds/karpenter.sh_nodeoverlays.yaml, pkg/assets/crds/karpenter.sh_nodepools.yaml
Updates validations, list/map typing, label allowlists, descriptions, and generator annotations.
RBAC manifest corrections
install/04_rbac.yaml, pkg/assets/karpenter/clusterrole-core.yaml
Corrects list entries in two ClusterRole verb lists.

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


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error Vendored Ginkgo adds fmt.Println in BuildRunCommand/WatchCommand, invoked from main via RunAndExit, so the CLI now writes to stdout. Move the warning to stderr or GinkgoWriter (or remove it) so the main process stays JSON-only on stdout.
✅ 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 PR's release chores for Karpenter 5.0.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 *_test.go files changed, and the non-vendor diff contains no Ginkgo spec titles.
Test Structure And Quality ✅ Passed The PR only changes tooling, manifests, vendor, and scripts; no *_test.go files or Ginkgo test code were modified, so this check is not applicable.
Microshift Test Compatibility ✅ Passed No new or modified Ginkgo e2e tests outside vendor; the diff only updates deps/manifests/scripts, so there’s no MicroShift-unsafe test code here.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new or modified Ginkgo e2e tests appear in the diff; changes are dependency, manifest, and shell-script updates only.
Topology-Aware Scheduling Compatibility ✅ Passed Changed files are CRDs/RBAC and a vendor script; no pod specs, affinity, nodeSelector, topology spread, or replica-derivation logic was added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Diff only touches release scripts/manifests/vendor; no new Ginkgo e2e specs or test/e2e paths were added.
No-Weak-Crypto ✅ Passed PASS: Added diff lines contain no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB or secret-compare patterns; update-vendor.sh only updates dependencies.
Container-Privileges ✅ Passed Patch only updates versions, vendor, CRDs, and RBAC; diff grep found no privileged/hostPID/hostNetwork/hostIPC/SYS_ADMIN/allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed No added logs expose secrets/PII/internal hostnames; changed output lines are benign install/status echoes only.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
go.mod

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

install/00_autoscaling.openshift.io_karpenters.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

install/04_rbac.yaml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 5 others
🔧 golangci-lint (2.12.2)

level=error msg="Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: go: inconsistent vendoring in :\n\tgithub.com/aws/aws-sdk-go-v2/config@v1.32.31: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/aws/aws-sdk-go-v2/service/ec2@v1.317.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/aws/karpenter-provider-aws@v1.13.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/onsi/ginkgo/v2@v2.32.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/onsi/gomega@v1.42.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/openshift/api@v0.0.0-20260722154127-581cfdf71986: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com

... [truncated 11641 characters] ...

/karpenter@v1.13.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tsigs.k8s.io/randfill@v1.0.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tsigs.k8s.io/structured-merge-diff/v6@v6.4.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tsigs.k8s.io/yaml@v1.6.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt\n\tgithub.com/aws/karpenter-provider-aws: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\tsigs.k8s.io/karpenter: is replaced in go.mod, but not marked as replaced in vendor/modules.txt\n\n\tTo ignore the vendor directory, use -mod=readonly or -mod=mod.\n\tTo sync the vendor directory, run:\n\t\tgo mod vendor\n"


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: 3

🤖 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 `@hack/update-vendor.sh`:
- Around line 1-2: Add strict error handling immediately after the shebang in
update-vendor.sh, before any dependency or vendor mutations, so a failed go get
or other command terminates the script instead of continuing with stale
dependencies.
- Around line 8-10: Update the kube_release value in hack/update-vendor.sh to
match the v0.36.2 Kubernetes module versions pinned in go.mod, while leaving
kube_components unchanged.
- Around line 47-48: Update the Karpenter replacements in the go mod edit
command within update-vendor.sh to use immutable commit SHA revisions instead of
`@main` for both fork modules. Keep the existing OpenShift fork paths unchanged
and pin each replacement to its intended commit.
🪄 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 hack/update-vendor.sh
Comment on lines +1 to +2
#!/bin/bash

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Fail fast when dependency updates fail.

Without set -e, a failed go get is followed by updated_mods[...] = 1, so the script can skip the failed module and still vendor stale dependencies. Add strict error handling before any mutating command.

Proposed fix
 #!/bin/bash
+set -euo pipefail
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#!/bin/bash
#!/bin/bash
set -euo pipefail
🤖 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 `@hack/update-vendor.sh` around lines 1 - 2, Add strict error handling
immediately after the shebang in update-vendor.sh, before any dependency or
vendor mutations, so a failed go get or other command terminates the script
instead of continuing with stale dependencies.

Comment thread hack/update-vendor.sh
Comment on lines +8 to +10
kube_release="v0.36.0"
# these components k8s.io/<item> are versioned for each k8s release
kube_components="api apimachinery client-go"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- hack/update-vendor.sh ---\n'
cat -n hack/update-vendor.sh | sed -n '1,220p'

printf '\n--- go.mod ---\n'
cat -n go.mod | sed -n '1,120p'

Repository: openshift/karpenter-operator

Length of output: 257


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the exact references to kube_release and the k8s module versions.
rg -n 'kube_release|k8s.io/(api|apimachinery|client-go)|v0\.36\.[0-9]+' hack/update-vendor.sh go.mod

Repository: openshift/karpenter-operator

Length of output: 744


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== hack/update-vendor.sh ==='
sed -n '1,220p' hack/update-vendor.sh | nl -ba

echo
echo '=== go.mod k8s module lines ==='
grep -nE 'k8s.io/(api|apimachinery|client-go)' go.mod

Repository: openshift/karpenter-operator

Length of output: 236


Keep kube_release in sync with go.mod. hack/update-vendor.sh hard-codes k8s.io/api, k8s.io/apimachinery, and k8s.io/client-go to v0.36.0, while go.mod already pins them at v0.36.2, so rerunning the script would downgrade those modules.

🤖 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 `@hack/update-vendor.sh` around lines 8 - 10, Update the kube_release value in
hack/update-vendor.sh to match the v0.36.2 Kubernetes module versions pinned in
go.mod, while leaving kube_components unchanged.

Comment thread hack/update-vendor.sh
@alaxkar

alaxkar commented Jul 23, 2026

Copy link
Copy Markdown

/lgtm
thank you max, really appreciate your help.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 23, 2026
@alaxkar

alaxkar commented Jul 23, 2026

Copy link
Copy Markdown

/test e2e-aws

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

@maxcao13: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@alaxkar

alaxkar commented Jul 23, 2026

Copy link
Copy Markdown

/verified by e2e tests

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 23, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@alaxkar: This PR has been marked as verified by e2e tests.

Details

In response to this:

/verified by e2e tests

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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 79a93d5 into openshift:main Jul 23, 2026
6 checks passed
@maxcao13
maxcao13 deleted the 5.0-release-chores branch July 23, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants