Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOSTEDCP-2220: Autonode karpenter #5279

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

enxebre
Copy link
Member

@enxebre enxebre commented Dec 12, 2024

What this PR does / why we need it:
This introduces support for an autoNode feature via karpenter:

  • It introduces a self contained karpenter-operator that is built within the HO image, so its lifecycle is fully decouple from the CPO/OCP version.
  • Let the HO reconcile the karpenter-operator within the controlplane namespace
  • The karpenter operator manages karpenter deployment management side and manages CRDs, default nodeclass, and clobber "service owned" fields guest side.
  • Introduces a --auto-node flag for the CLI which also causes a new arn generation.
  • Expose autoNode with karpenter behind a feature gate within the HC API

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 12, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 12, 2024

@enxebre: This pull request references HOSTEDCP-2220 which is a valid jira issue.

In response to this:

What this PR does / why we need it:
This introduces support for an autoNode feature via karpenter:

  • It introduces a self contained karpenter-operator that is built within the HO image, so its lifecycle is fully decouple from the CPO/OCP version.
  • Let the HO reconcile the karpenter-operator within the controlplane namespace
  • The karpenter operator manages karpenter deployment management side and manages CRDs, default nodeclass, and clobber "service owned" fields guest side.
  • Introduces a --auto-node flag for the CLI which also causes a new arn generation.
  • Expose autoNode with karpenter behind a feature gate within the HC API

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit 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-ci openshift-ci bot added the area/api Indicates the PR includes changes for the API label Dec 12, 2024
Copy link
Contributor

openshift-ci bot commented Dec 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre

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

The pull request process is described here

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 area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release approved Indicates a PR has been approved by an approver from all required OWNERS files. area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels Dec 12, 2024
@enxebre
Copy link
Member Author

enxebre commented Dec 16, 2024

/test e2e-aws

r.CreateOrUpdateProvider = upsert.New(false)

// First install the CRDs so we can create a watch below.
mgr.GetClient()
Copy link
Contributor

Choose a reason for hiding this comment

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

the return value is ignored, is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

no needed, I dropped it. Thanks!

return ctrl.Result{}, err
}

if err := r.reconcileKarpenter(ctx, hcp); err != nil {
Copy link
Contributor

@muraee muraee Dec 16, 2024

Choose a reason for hiding this comment

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

I can't find the implementation of this function anywhere in the PR :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@enxebre enxebre force-pushed the autonode-karpenter branch 2 times, most recently from a93a1b2 to d5e0084 Compare December 17, 2024 09:29
@muraee
Copy link
Contributor

muraee commented Dec 17, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2024
This introduces a selfcontained controller that knows how to run karpenter management side watching a guest cluster and managing karpeneter CRDs
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2024
Copy link
Contributor

openshift-ci bot commented Dec 17, 2024

New changes are detected. LGTM label has been removed.

@enxebre enxebre added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2024
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ba6cf38 and 2 for PR HEAD 2ea0ca0 in total

@enxebre
Copy link
Member Author

enxebre commented Dec 17, 2024

/retest

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ef8596d and 1 for PR HEAD 2ea0ca0 in total

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2024
Copy link
Contributor

openshift-ci bot commented Dec 17, 2024

New changes are detected. LGTM label has been removed.

@enxebre
Copy link
Member Author

enxebre commented Dec 17, 2024

/retest

@enxebre enxebre added the lgtm Indicates that a PR is ready to be merged. label Dec 17, 2024
@enxebre
Copy link
Member Author

enxebre commented Dec 17, 2024

/override "Red Hat Konflux / hypershift-operator-main-on-pull-request"

Copy link
Contributor

openshift-ci bot commented Dec 17, 2024

@enxebre: Overrode contexts on behalf of enxebre: Red Hat Konflux / hypershift-operator-main-on-pull-request

In response to this:

/override "Red Hat Konflux / hypershift-operator-main-on-pull-request"

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.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 68f7ab0 and 2 for PR HEAD f596b35 in total

@enxebre
Copy link
Member Author

enxebre commented Dec 17, 2024

/override e2e-aks

Copy link
Contributor

openshift-ci bot commented Dec 17, 2024

@enxebre: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • e2e-aks

Only the following failed contexts/checkruns were expected:

  • ci/prow/e2e-aks
  • ci/prow/e2e-aws
  • ci/prow/e2e-aws-4-18
  • ci/prow/e2e-aws-upgrade-hypershift-operator
  • ci/prow/e2e-kubevirt-aws-ovn-reduced
  • ci/prow/images
  • ci/prow/okd-scos-e2e-aws-ovn
  • ci/prow/security
  • ci/prow/unit
  • ci/prow/verify
  • pull-ci-openshift-hypershift-main-e2e-aks
  • pull-ci-openshift-hypershift-main-e2e-aws
  • pull-ci-openshift-hypershift-main-e2e-aws-4-18
  • pull-ci-openshift-hypershift-main-e2e-aws-upgrade-hypershift-operator
  • pull-ci-openshift-hypershift-main-e2e-kubevirt-aws-ovn-reduced
  • pull-ci-openshift-hypershift-main-images
  • pull-ci-openshift-hypershift-main-okd-scos-e2e-aws-ovn
  • pull-ci-openshift-hypershift-main-security
  • pull-ci-openshift-hypershift-main-unit
  • pull-ci-openshift-hypershift-main-verify
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/override e2e-aks

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.

@enxebre
Copy link
Member Author

enxebre commented Dec 17, 2024

/override ci/prow/e2e-aks

Copy link
Contributor

openshift-ci bot commented Dec 17, 2024

@enxebre: Overrode contexts on behalf of enxebre: ci/prow/e2e-aks

In response to this:

/override ci/prow/e2e-aks

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 59e208a into openshift:main Dec 17, 2024
12 of 14 checks passed
Copy link
Contributor

openshift-ci bot commented Dec 17, 2024

@enxebre: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-override 7c0d65c link true /test e2e-aws-override
ci/prow/okd-scos-e2e-aws-ovn f596b35 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

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.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: hypershift
This PR has been included in build ose-hypershift-container-v4.19.0-202412180044.p0.g59e208a.assembly.stream.el9.
All builds following this will include this PR.

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. area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants