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

OCPBUGS-15331,OCPBUGS-16049: Enable AdvertiseAddress dual stack and IPv6 support and added the changes to be included in the certificates #2779

Merged
merged 1 commit into from Aug 12, 2023

Conversation

jparrill
Copy link
Contributor

@jparrill jparrill commented Jul 7, 2023

Changes:

  • Now IPv6 and Dual Stack scenarios are covered in self-hosted environments.
  • KAS PKI modified to include IPv4/6 addresses into the certificate
  • Proxy still support only single stack scenarios, using the first ServiceCIDR as a AdvertiseAddress or InternalAPIAddress, but IPv4 and IPv6 could be used in any case (this is temporary meanwhile the Issue mentioned down bellow is open).

Which issue(s) this PR fixes :
Fixes #OCPBUGS-15331
Fixes #OCPBUGS-16049

Caveats:

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 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 Jul 7, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 7, 2023

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-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Jul 7, 2023
@openshift-ci-robot
Copy link

@jparrill: This pull request references Jira Issue OCPBUGS-15331, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (jiezhao@redhat.com), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR involve the some changes:

  • Added a new API endpoint under APIServerNetworking spec, this new endpoint avoids to break the API retrocompatibility with older versions and enables the capability to hold more than one Ip in the AdvertiseAddress in KAS.

  • Now IPv6 and Dual Stack scenarios are covered in self-hosted environments.

  • PKI and Proxy still support only single stack scenarios, using the first ServiceCIDR as a AdvertiseAddress or InternalAPIAddress, but IPv4 and IPv6 could be used in any case.

What this PR does / why we need it:

Which issue(s) this PR fixes :
Fixes #OCPBUGS-15331

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 kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label Jul 7, 2023
@jparrill jparrill changed the title OCPBUGS-15331: Enables AdvertiseAddress dual stack and IPv6 support OCPBUGS-15331: Enable AdvertiseAddress dual stack and IPv6 support Jul 7, 2023
@openshift-ci openshift-ci bot added area/ci-tooling Indicates the PR includes changes for CI or tooling 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 and removed do-not-merge/needs-area labels Jul 7, 2023
@netlify
Copy link

netlify bot commented Jul 7, 2023

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit 30fedd3
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/64d5e744e30f9d0008a787ea
😎 Deploy Preview https://deploy-preview-2779--hypershift-docs.netlify.app/reference/api
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jparrill jparrill force-pushed the bug/OCPBUGS-15331 branch 2 times, most recently from c5a0d20 to 5a46cc4 Compare July 11, 2023 11:54
@openshift-ci-robot
Copy link

@jparrill: This pull request references Jira Issue OCPBUGS-15331, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (jiezhao@redhat.com), skipping review request.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Changes:

  • Added a new API endpoint under APIServerNetworking spec, this new endpoint avoids to break the API retrocompatibility with older versions and enables the capability to hold more than one Ip in the AdvertiseAddress in KAS.

  • Now IPv6 and Dual Stack scenarios are covered in self-hosted environments.

  • PKI and Proxy still support only single stack scenarios, using the first ServiceCIDR as a AdvertiseAddress or InternalAPIAddress, but IPv4 and IPv6 could be used in any case.

Which issue(s) this PR fixes :
Fixes #OCPBUGS-15331

Caveats:

  • DualStack apiserver support kubernetes/enhancements#2438 - This issue prevents the KAS to support dual stack and the AdvertiseAddress even being an slice, it only supports only one element (if more provided it will take the last one as the AdvertiseAddress)

  • I've added an API endpoint in Beta supporting multiple AdvertiseAddresses and also added support for the controllers and utilities, so we only need to delete this break code in order to make that work, we also need to fix the unit tests, covering the new behaviour.

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 kubernetes/test-infra repository.

@jparrill jparrill marked this pull request as ready for review July 12, 2023 06:47
@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 Jul 12, 2023
support/util/util.go Outdated Show resolved Hide resolved
support/util/networking.go Outdated Show resolved Hide resolved
@jparrill jparrill force-pushed the bug/OCPBUGS-15331 branch 2 times, most recently from 82c2ee9 to 95c480e Compare July 12, 2023 11:07
@jparrill jparrill marked this pull request as draft July 12, 2023 11:15
@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 Jul 12, 2023
@jparrill
Copy link
Contributor Author

/test e2e-kubevirt-aws-ovn

Copy link
Contributor

@csrwng csrwng left a comment

Choose a reason for hiding this comment

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

Some comments, thx!

api/v1beta1/hostedcluster_types.go Outdated Show resolved Hide resolved
api/v1beta1/hostedcluster_types.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 10, 2023
@openshift-ci-robot
Copy link

@jparrill: This pull request references Jira Issue OCPBUGS-15331, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira (jiezhao@redhat.com), skipping review request.

This pull request references Jira Issue OCPBUGS-16049, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @LiangquanLi930

In response to this:

Changes:

  • Now IPv6 and Dual Stack scenarios are covered in self-hosted environments.
  • KAS PKI modified to include IPv4/6 addresses into the certificate
  • Proxy still support only single stack scenarios, using the first ServiceCIDR as a AdvertiseAddress or InternalAPIAddress, but IPv4 and IPv6 could be used in any case (this is temporary meanwhile the Issue mentioned down bellow is open).

Which issue(s) this PR fixes :
Fixes #OCPBUGS-15331
Fixes #OCPBUGS-16049

Caveats:

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 kubernetes/test-infra repository.

Copy link
Contributor

@csrwng csrwng left a comment

Choose a reason for hiding this comment

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

Thank you Juan, some additional comments

support/util/networking.go Outdated Show resolved Hide resolved
api/v1beta1/hostedcluster_types.go Outdated Show resolved Hide resolved
support/util/networking.go Outdated Show resolved Hide resolved
support/util/networking.go Outdated Show resolved Hide resolved
support/util/networking.go Outdated Show resolved Hide resolved
hypershift-operator/controllers/nodepool/haproxy.go Outdated Show resolved Hide resolved
support/util/networking_test.go Outdated Show resolved Hide resolved
support/util/types.go Outdated Show resolved Hide resolved
ip := ipNet.IP
if ip.To4() != nil {
// IPv4
ip[net.IPv4len-1]++
Copy link
Contributor

Choose a reason for hiding this comment

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

both the ipv4 and ipv6 cases seem to be doing the same thing, so ip[len(ip)-1]++ should work for both, I don't think there's a need to differentiate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I do that this is the result in the unitTests:

FirstUsableIP() = 2000::, want 2000::1

Copy link
Contributor

Choose a reason for hiding this comment

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

I tested ip[len(ip)-1]++ for all cases and it passes for me

support/util/util.go Outdated Show resolved Hide resolved
@jparrill
Copy link
Contributor Author

/test e2e-aws

…IPv6 support and fixes KAS certs

Changes included for OCPBUGS-15331:

- Now IPv6 and Dual Stack scenarios are covered in self-hosted
  environments.

- PKI and Proxy still support only single stack scenarios, using the
  first ServiceCIDR as a AdvertiseAddress or InternalAPIAddress, but
  IPv4 and IPv6 could be used in any case.

Changes included for OCPBUGS-16049:

- KAS Certificates now includes the proper SAN for dual stack scenarios

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

csrwng commented Aug 11, 2023

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng, 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2023
@imain
Copy link
Contributor

imain commented Aug 11, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 11, 2023
@jparrill
Copy link
Contributor Author

/retest-required

@csrwng
Copy link
Contributor

csrwng commented Aug 11, 2023

/override ci/prow/e2e-kubevirt-aws-ovn

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 11, 2023

@csrwng: Overrode contexts on behalf of csrwng: ci/prow/e2e-kubevirt-aws-ovn

In response to this:

/override ci/prow/e2e-kubevirt-aws-ovn

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/test-infra repository.

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD cb96cd6 and 2 for PR HEAD 2a70e7e in total

@jparrill
Copy link
Contributor Author

/test e2e-aws

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 12, 2023

@jparrill: 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-ibmcloud-roks 2a70e7e link false /test e2e-ibmcloud-roks
ci/prow/e2e-ibmcloud-iks 2a70e7e link false /test e2e-ibmcloud-iks

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit dce6f51 into openshift:main Aug 12, 2023
13 of 15 checks passed
@openshift-ci-robot
Copy link

@jparrill: Jira Issue OCPBUGS-15331: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-15331 has been moved to the MODIFIED state.

Jira Issue OCPBUGS-16049: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-16049 has been moved to the MODIFIED state.

In response to this:

Changes:

  • Now IPv6 and Dual Stack scenarios are covered in self-hosted environments.
  • KAS PKI modified to include IPv4/6 addresses into the certificate
  • Proxy still support only single stack scenarios, using the first ServiceCIDR as a AdvertiseAddress or InternalAPIAddress, but IPv4 and IPv6 could be used in any case (this is temporary meanwhile the Issue mentioned down bellow is open).

Which issue(s) this PR fixes :
Fixes #OCPBUGS-15331
Fixes #OCPBUGS-16049

Caveats:

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 kubernetes/test-infra repository.

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.14.0-0.nightly-2023-09-11-201102

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.14.0-0.nightly-2023-09-12-024050

@openshift-merge-robot
Copy link
Contributor

Fix included in accepted release 4.14.0-0.nightly-2023-09-15-101929

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/ci-tooling Indicates the PR includes changes for CI or tooling 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/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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.

None yet

8 participants