Skip to content

CNTRLPLANE-216: Add KubeAPIExteralName api - #5458

Merged
openshift-merge-bot[bot] merged 4 commits into
openshift:mainfrom
jparrill:HOSTEDCP-1960
Mar 29, 2025
Merged

CNTRLPLANE-216: Add KubeAPIExteralName api#5458
openshift-merge-bot[bot] merged 4 commits into
openshift:mainfrom
jparrill:HOSTEDCP-1960

Conversation

@jparrill

@jparrill jparrill commented Jan 22, 2025

Copy link
Copy Markdown
Contributor

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

openshift-ci-robot commented Jan 22, 2025

Copy link
Copy Markdown

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

Details

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.

@openshift-ci

openshift-ci Bot commented Jan 22, 2025

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 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
@openshift-ci

openshift-ci Bot commented Jan 22, 2025

Copy link
Copy Markdown
Contributor

[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

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

openshift-ci-robot commented Jan 23, 2025

Copy link
Copy Markdown

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

Details

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

openshift-ci-robot commented Jan 23, 2025

Copy link
Copy Markdown

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

Details

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
Comment thread api/hypershift/v1beta1/hostedcluster_types.go Outdated
Comment thread api/hypershift/v1beta1/hostedcluster_types.go Outdated
@enxebre

enxebre commented Jan 27, 2025

Copy link
Copy Markdown
Member

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

openshift-ci-robot commented Jan 28, 2025

Copy link
Copy Markdown

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

Details

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

Copy link
Copy Markdown
Contributor Author

/retest

@jparrill

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD 09cd64d and 2 for PR HEAD ec8a24f in total

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

Remaining retests: 0 against base HEAD a609cec and 1 for PR HEAD ec8a24f in total

@jparrill

Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

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

This new API changes the value of the KAS Custom URL to points to your desired one

Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
@csrwng

csrwng commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot

Copy link
Copy Markdown

/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
Copy Markdown

/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>
@bryan-cox

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

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

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

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

@bryan-cox

Copy link
Copy Markdown
Member

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

@openshift-ci

openshift-ci Bot commented Mar 29, 2025

Copy link
Copy Markdown
Contributor

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

Details

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
Copy Markdown
Member

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

@openshift-ci

openshift-ci Bot commented Mar 29, 2025

Copy link
Copy Markdown
Contributor

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

Details

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
Copy Markdown
Member

/test e2e-aws

@openshift-ci-robot

Copy link
Copy Markdown

/retest-required

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

@openshift-ci-robot

Copy link
Copy Markdown

/hold

Revision f0b828b was retested 3 times: holding

@jparrill

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Mar 29, 2025

Copy link
Copy Markdown
Contributor

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

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.

@jparrill

Copy link
Copy Markdown
Contributor Author

/hold cancel

@jparrill

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-4-18

@openshift-bot

Copy link
Copy Markdown

[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