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-2249: Reconcile karpenter user-data secret programmatically instead of creating a mock nodePool #5439

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

muraee
Copy link
Contributor

@muraee muraee commented Jan 20, 2025

What this PR does / why we need it:

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 Jan 20, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 20, 2025

@muraee: This pull request references HOSTEDCP-2249 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 "4.19.0" version, but no target version was set.

In response to this:

What this PR does / why we need it:

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.

@muraee muraee changed the title HOSTEDCP-2249: Karpenter userdata HOSTEDCP-2249: Reconcile karpenter user-data secret programmatically instead of creating a mock nodePool Jan 20, 2025
@openshift-ci openshift-ci bot requested review from hasueki and sjenning January 20, 2025 14:03
@openshift-ci openshift-ci bot added area/cli Indicates the PR includes changes for CLI area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release labels Jan 20, 2025
Copy link
Contributor

openshift-ci bot commented Jan 20, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: muraee

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Jan 20, 2025
@enxebre
Copy link
Member

enxebre commented Jan 21, 2025

/hold
on #5404

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 21, 2025
return err
}

haproxy := haproxy.HAProxy{
Copy link
Member

Choose a reason for hiding this comment

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

Not for this PR but we need to follow up to hide the haproxy generation behind the Config logic.

Then the rest of this logic could be encapsulated within a func token() as in the nodepool_controller if we have a common reconciler interface which implements the methods to get the image

Copy link
Member

@enxebre enxebre Jan 21, 2025

Choose a reason for hiding this comment

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

can we have this logic now to be a unit tested function which validates the expected userData is generated with their current contractual expectations, i.e. hyperv1.NodePoolLabel and hypershift.openshift.io/ami?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added a unit test

@@ -1832,6 +1826,10 @@ func (r *HostedClusterReconciler) reconcile(ctx context.Context, req ctrl.Reques
}
}

if err := r.reconcileKarpenterOperator(ctx, createOrUpdate, hcluster, hcp, r.HypershiftOperatorImage, controlPlaneOperatorImage); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

why are we moving this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just moved it to the end, just to make sure an error here doesn't block the HC from progressing.

@muraee muraee force-pushed the karpenter-userdata branch from 3664cff to 2ef2ab8 Compare January 22, 2025 10:04
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 22, 2025
@muraee muraee force-pushed the karpenter-userdata branch from 2ef2ab8 to df6576a Compare January 22, 2025 10:07
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 22, 2025
Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

@muraee: 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-4-18 2ef2ab8 link true /test e2e-aws-4-18
ci/prow/e2e-aws 2ef2ab8 link true /test e2e-aws
ci/prow/verify 2ef2ab8 link true /test verify
ci/prow/security 2ef2ab8 link true /test security
ci/prow/images 2ef2ab8 link true /test images
ci/prow/e2e-aws-upgrade-hypershift-operator 2ef2ab8 link true /test e2e-aws-upgrade-hypershift-operator
ci/prow/e2e-aks 2ef2ab8 link true /test e2e-aks
ci/prow/unit 2ef2ab8 link true /test unit
ci/prow/e2e-aks-4-18 2ef2ab8 link true /test e2e-aks-4-18
ci/prow/e2e-kubevirt-aws-ovn-reduced 2ef2ab8 link true /test e2e-kubevirt-aws-ovn-reduced

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.

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/cli Indicates the PR includes changes for CLI area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants