Skip to content

CNTRLPLANE-216: Add KubeAPIExteralName api #5458

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

Merged
merged 4 commits into from
Mar 29, 2025

Conversation

jparrill
Copy link
Contributor

@jparrill jparrill commented Jan 22, 2025

This new API autogenerate a new kubeconfig based on a desired url and managed by HCP.

What this PR does / why we need it:
The current implementation of HCP to define the KAS address is using the ServicePublishingType, where you can define a hostname and that, will customize the API and API-INT interfaces where all the kubeconfigs (excepts the ones pointing to local) are pointing to. This makes the customization rigid and customers are asking for more flexibility.

This PR adds a new API which creates a new Kubeconfig (certificate based) pointing to the desired address. With this new API you can:

  • Modify the address day-1 and day-2 without affectation of the DataPlane (No rollout expected)
  • Generation of a new Kubeconfig based on certificates (managed by HCP)
  • The HC and HCP are in sync about this new Kubeconfig and reported in the status as customKubeconfig
  • The target of this new API are the scenarios of Public and PublicAndPrivate

⚠️ IMPORTANT! The external DNSs URL where you plan to point to and you will specify it in this new API, should be properly configured in order to makes this work.

Which issue(s) this PR 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 22, 2025
@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 Jan 22, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 22, 2025

@jparrill: This pull request references HOSTEDCP-1960 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:

This new API changes the value of the Kubeconfig External URL to points to your desired one

What this PR does / why we need it:
HostedControlPlanes does not follows the separation of API and API-INT as OCP Standalone does. This PR includes a new API called KubeAPIExteralName which takes the desired name for the external KubeAPI Server name.

To have in mind:

  • This can be changed day-0 or day-2
  • This will not cause a nodepool rollout
  • This will generate a new Kubeconfig called apiext-admin-kubeconfig
  • This Kubeconfig should be bubbled up into HC namespace too

Which issue(s) this PR 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.

Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

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 do-not-merge/needs-area 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 and removed do-not-merge/needs-area labels Jan 22, 2025
Copy link
Contributor

openshift-ci bot commented Jan 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jparrill

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/documentation Indicates the PR includes changes for documentation approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 22, 2025
@openshift-ci openshift-ci bot added the area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release label Jan 22, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 23, 2025

@jparrill: This pull request references HOSTEDCP-1960 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:

This new API changes the value of the Kubeconfig External URL to points to your desired one

What this PR does / why we need it:
HostedControlPlanes does not follows the separation of API and API-INT as OCP Standalone does. This PR includes a new API called KubeAPIExteralName which takes the desired name for the external KubeAPI Server name.

To have in mind:

  • This can be changed day-0 or day-2
  • This will not cause a nodepool rollout
  • This will generate a new Kubeconfig called apiext-admin-kubeconfig
  • This Kubeconfig is bubbled up into HC namespace too

Which issue(s) this PR 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-robot
Copy link

openshift-ci-robot commented Jan 23, 2025

@jparrill: This pull request references HOSTEDCP-1960 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:

This new API changes the value of the Kubeconfig External URL to points to your desired one

What this PR does / why we need it:
HostedControlPlanes does not follows the separation of API and API-INT as OCP Standalone does. This PR includes a new API called KubeAPIExteralName which takes the desired name for the external KubeAPI Server name.

To have in mind:

  • This can be changed day-1 or day-2
  • This will not cause a nodepool rollout
  • This will generate a new Kubeconfig called apiext-admin-kubeconfig
  • This Kubeconfig is bubbled up into HC namespace too

Which issue(s) this PR 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.

@jparrill jparrill force-pushed the HOSTEDCP-1960 branch 2 times, most recently from 5152979 to 0ecdf6a Compare January 24, 2025 17:37
@enxebre
Copy link
Member

enxebre commented Jan 27, 2025

HostedControlPlanes does not follows the separation of API and API-INT

Can we elaborate on this? Which topologies is this use case targeting: privateAndPublic, private, public?
For privateAndPublic we do have decouple internal and external urls routing to kas, so what's this solving?
Seems the PR is effectively implementing a kubeconfig autogeneration using a passed through URL, let's make sure that's clearly stated in the PR desc and API docs, also let's clarify how this is planned to be consumed and that consumption solves the driving rfe.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 28, 2025

@jparrill: This pull request references HOSTEDCP-1960 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:

This new API autogenerate a new kubeconfig based on a desired url and managed by HCP.

What this PR does / why we need it:
The current implementation of HCP to define the KAS address is using the ServicePublishingType, where you can define a hostname and that, will customize the API and API-INT interfaces where all the kubeconfigs (excepts the ones pointing to local) are pointing to. This makes the customization rigid and customers are asking for more flexibility.

This PR adds a new API which creates a new Kubeconfig (certificate based) pointing to the desired address. With this new API you can:

  • Modify the address day-1 and day-2 without affectation of the DataPlane (No rollout expected)
  • Generation of a new Kubeconfig based on certificates (managed by HCP)
  • The HC and HCP are in sync about this new Kubeconfig and reported in the status as customKubeconfig
  • The target of this new API are the scenarios of Public and PublicAndPrivate

⚠️ IMPORTANT! The external DNSs URL where you plan to point to and you will specify it in this new API, should be properly configured in order to makes this work.

Which issue(s) this PR 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.

@jparrill jparrill marked this pull request as ready for review January 29, 2025 09:19
@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 Jan 29, 2025
@jparrill jparrill requested a review from enxebre January 29, 2025 09:19
@openshift-ci openshift-ci bot requested a review from isco-rodriguez January 29, 2025 09:19
@jparrill jparrill force-pushed the HOSTEDCP-1960 branch 2 times, most recently from f68c435 to 1fd6696 Compare January 29, 2025 11:10
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2025
@csrwng
Copy link
Contributor

csrwng commented Mar 28, 2025

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ab40031 and 2 for PR HEAD b90437b in total

1 similar comment
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD ab40031 and 2 for PR HEAD b90437b in total

Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2025
@bryan-cox
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 5fc4d99 and 2 for PR HEAD f0b828b in total

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD f484dd0 and 1 for PR HEAD f0b828b in total

@bryan-cox
Copy link
Member

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main"

Copy link
Contributor

openshift-ci bot commented Mar 29, 2025

@bryan-cox: Overrode contexts on behalf of bryan-cox: Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main

In response to this:

/override "Red Hat Konflux / hypershift-operator-main-enterprise-contract / hypershift-operator-main"

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.

@bryan-cox
Copy link
Member

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

Copy link
Contributor

openshift-ci bot commented Mar 29, 2025

@bryan-cox: Overrode contexts on behalf of bryan-cox: 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.

@bryan-cox
Copy link
Member

/test e2e-aws

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD eafea57 and 0 for PR HEAD f0b828b in total

@openshift-ci-robot
Copy link

/hold

Revision f0b828b was retested 3 times: holding

@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 Mar 29, 2025
@jparrill
Copy link
Contributor Author

/retest

Copy link
Contributor

openshift-ci bot commented Mar 29, 2025

@jparrill: The following test 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-techpreview e4a1e49 link false /test e2e-aws-techpreview

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.

@jparrill
Copy link
Contributor Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 29, 2025
@jparrill
Copy link
Contributor Author

/test e2e-aws-4-18

@openshift-merge-bot openshift-merge-bot bot merged commit 712c702 into openshift:main Mar 29, 2025
16 of 18 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: hypershift
This PR has been included in build ose-hypershift-container-v4.19.0-202503300014.p0.g712c702.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 area/testing Indicates the PR includes changes for e2e testing 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. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants