Skip to content

AUTOSCALE-827: add KarpenterOperator feature gate#2898

Open
maxcao13 wants to merge 1 commit into
openshift:masterfrom
maxcao13:fg-karpenter-operator
Open

AUTOSCALE-827: add KarpenterOperator feature gate#2898
maxcao13 wants to merge 1 commit into
openshift:masterfrom
maxcao13:fg-karpenter-operator

Conversation

@maxcao13

Copy link
Copy Markdown
Member

Adds the KarpenterOperator feature gate to OpenShift.

It will start in DevPreviewNoUpgrade, and follow the promotion process detailed in the enhancement PR. It will be enable-able in both selfmanaged(standalone), and HCP.

Refer to openshift/enhancements#2007 for details.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 22, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 22, 2026

Copy link
Copy Markdown

@maxcao13: This pull request references AUTOSCALE-827 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:

Adds the KarpenterOperator feature gate to OpenShift.

It will start in DevPreviewNoUpgrade, and follow the promotion process detailed in the enhancement PR. It will be enable-able in both selfmanaged(standalone), and HCP.

Refer to openshift/enhancements#2007 for 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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented Jun 22, 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 added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 22, 2026
@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Hello @maxcao13! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 22, 2026
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 62fee296-98cd-45d0-a162-bfc525b30f7a

📥 Commits

Reviewing files that changed from the base of the PR and between 3653554 and 85e98ef.

📒 Files selected for processing (10)
  • features.md
  • features/features.go
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-Default.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml
✅ Files skipped from review due to trivial changes (5)
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-Hypershift-OKD.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-TechPreviewNoUpgrade.yaml
  • payload-manifests/featuregates/featureGate-4-10-SelfManagedHA-DevPreviewNoUpgrade.yaml
  • features.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • features/features.go

📝 Walkthrough

Walkthrough

A new exported feature gate, FeatureGateKarpenterOperator, is added to features/features.go. It is constructed via newFeatureGate("KarpenterOperator"), annotated with a jira report component, contact person, product lifecycle scope, and an enhancement PR link, then enabled exclusively for inDevPreviewNoUpgrade() and finalized with mustRegister(). The gate is documented in features.md. Eight payload manifest files are updated to configure the gate across Hypershift and SelfManagedHA deployment topologies: the gate is enabled in DevPreviewNoUpgrade release sets and disabled in Default, OKD, and TechPreviewNoUpgrade release sets for both topologies.

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding the KarpenterOperator feature gate to OpenShift.
Description check ✅ Passed The description directly relates to the changeset, explaining what the feature gate does, its initial state, deployment scope, and referencing the enhancement PR for details.
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 This PR does not add or modify any Ginkgo tests; it only adds a feature gate definition and updates manifests. The check is not applicable.
Test Structure And Quality ✅ Passed PR adds KarpenterOperator feature gate. The test file added (okd_featureset_parity_test.go) uses Go's standard testing package (*testing.T), not Ginkgo, so the Ginkgo-specific quality check does no...
Microshift Test Compatibility ✅ Passed PR adds no new Ginkgo e2e tests; changes are limited to feature gate definitions, documentation, and YAML configuration files. MicroShift test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No Ginkgo e2e tests are added in this PR. The changes are limited to feature gate definitions, documentation, and configuration files - the check does not apply.
Topology-Aware Scheduling Compatibility ✅ Passed This PR only registers a feature gate flag in code and configuration files. It contains no deployment manifests, operator code, controllers, or pod scheduling constraints that would require topolog...
Ote Binary Stdout Contract ✅ Passed The PR only adds feature gate definitions and configuration files. No stdout writes (fmt.Print, klog, log.Print) appear in process-level code; the new KarpenterOperator gate is declared in a packag...
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests were added in this PR. Changes are limited to feature gate definition (features/features.go), documentation (features.md), and configuration manifests (payload-manifests YAML fi...
No-Weak-Crypto ✅ Passed No weak cryptography usage found. PR only adds KarpenterOperator feature gate configuration and documentation with no cryptographic code.
Container-Privileges ✅ Passed PR modifies feature gate configuration and Go source code only. No container manifests or Kubernetes workload specs with privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscal...
No-Sensitive-Data-In-Logs ✅ Passed No logging statements exposing sensitive data found. PR only adds feature gate metadata and configuration without any log output containing passwords, tokens, keys, PII, or other sensitive informat...

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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.

🔧 golangci-lint (2.12.2)

Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented
The command is terminated due to an error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented


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

@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign everettraven 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

@maxcao13 maxcao13 marked this pull request as ready for review June 22, 2026 19:45
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 22, 2026
@openshift-ci openshift-ci Bot requested review from JoelSpeed and everettraven June 22, 2026 19:46
Adds the KarpenterOperator feature gate to OpenShift.
Refer to openshift/enhancements#2007 for details.

Signed-off-by: Max Cao <macao@redhat.com>
@maxcao13 maxcao13 force-pushed the fg-karpenter-operator branch from 3653554 to 85e98ef Compare June 22, 2026 20:43
@openshift-ci openshift-ci Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 22, 2026
@openshift-ci

openshift-ci Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

@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.

@enxebre

enxebre commented Jun 23, 2026

Copy link
Copy Markdown
Member

It will be enable-able in both selfmanaged(standalone), and HCP.

what are you expecting to be the effect of enabling this in HCP? HCP management side decisions for karpenter can not be tied to the management cluster. E.g. many management clusters are not even OpenShift

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants