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

MGMT-19500: Enable the installation of a baremetal cluster with a user-managed load balancer, where nodes are in the same subnet, and the load balancer IP is within the subnet #7096

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

danmanor
Copy link
Contributor

@danmanor danmanor commented Dec 15, 2024

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
  "load_balancer": {
    "type": "user-managed"
  }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
  baremetal:
    loadBalancer:
      type: UserManaged
    apiVIPs:
    - <load_balancer_ip>
    ingressVIPs:
    - <load_balancer_ip>

Note that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#nw-osp-configuring-external-load-balancer_ipi-install-installation-workflow

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal platform. a follow-up PR should implement this logic for vsphere as well.

Notes

  • This PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 15, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 15, 2024
@danmanor danmanor requested a review from jhernand December 15, 2024 13:05
@openshift-ci openshift-ci bot requested review from pastequo and rccrdpccl December 15, 2024 13:05
@openshift-ci openshift-ci bot added the api-review Categorizes an issue or PR as actively needing an API review. label Dec 15, 2024
Copy link

openshift-ci bot commented Dec 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danmanor

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 Dec 15, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an external load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 ...
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note that when using an external load balancer the VIPs will not be
used, but we are still requiring them, and using them to calculate the
machine CIDR. Insted we should validate that no VIPs are given, and we
should calculate the machine CIDR in some other way. That is not part of
this patch.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an external load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note that when using an external load balancer the VIPs will not be
used, but we are still requiring them, and using them to calculate the
machine CIDR. Insted we should validate that no VIPs are given, and we
should calculate the machine CIDR in some other way. That is not part of
this patch.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note - that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

Note - that this PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged
   apiVIPs:
   - <api_ip> 2
   ingressVIPs:
   - <ingress_ip> 3

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note - that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

Note - that this PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#ipi-install-establishing-communication-between-subnets_ipi-install-installation-workflow

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged
   apiVIPs:
   - <api_ip>
   ingressVIPs:
   - <ingress_ip>

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note - that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

Note - that this PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#ipi-install-establishing-communication-between-subnets_ipi-install-installation-workflow

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged
   apiVIPs:
   - <load_balancer_ip>
   ingressVIPs:
   - <load_balancer_ip>

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note - that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

Note - that this PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#ipi-install-establishing-communication-between-subnets_ipi-install-installation-workflow

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@danmanor danmanor changed the title MGMT-19500: Enable installation of baremetal / vsphere cluster with user managed load balacer and nodes are part of the same subnet WIP: MGMT-19500: Enable installation of baremetal / vsphere cluster with user managed load balacer and nodes are part of the same subnet Dec 15, 2024
@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 Dec 15, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged
   apiVIPs:
   - <load_balancer_ip>
   ingressVIPs:
   - <load_balancer_ip>

Note - that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note - that this PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#ipi-install-establishing-communication-between-subnets_ipi-install-installation-workflow

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged
   apiVIPs:
   - <load_balancer_ip>
   ingressVIPs:
   - <load_balancer_ip>

Note that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note that this PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#ipi-install-establishing-communication-between-subnets_ipi-install-installation-workflow

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 Dec 15, 2024

@danmanor: This pull request references MGMT-19500 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 task to target the "4.19.0" version, but no target version was set.

In response to this:

This patch adds support for using an user managed load balancer. It will only be available for OpenShift 4.16 or newer. To enable it the user will have to use the new load_balancer.type field of the cluster type, for example:

{
 "load_balancer": {
   "type": "user-managed"
 }
}

To preserve backwards compatibility this will be optional, and the
default value will be cluster-managed.

When the value is user-managed the following will be added to the
generated install-config.yaml file:

platform:
 baremetal:
   loadBalancer:
     type: UserManaged
   apiVIPs:
   - <load_balancer_ip>
   ingressVIPs:
   - <load_balancer_ip>

Note that when using an user managed load balancer the VIPs will be
used to specify the load balancer IP (not actually virtual).

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#nw-osp-configuring-external-load-balancer_ipi-install-installation-workflow

The database will be automatically migrated so that for existing
clusters the value of the load_balancer_type column will automatically
be set to cluster-managed.

This patch adds this support only for the baremetal and vsphere
platforms.

Note that this PR still require all hosts to be on the same subnet (same broadcast range). There is going to be a follow-up PR to enable hosts in different subnets as well.

More info can be found here - https://docs.redhat.com/en/documentation/openshift_container_platform/4.17/html/deploying_installer-provisioned_clusters_on_bare_metal/ipi-install-installation-workflow#ipi-install-establishing-communication-between-subnets_ipi-install-installation-workflow

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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.

@danmanor danmanor changed the title WIP: MGMT-19500: Enable installation of baremetal / vsphere cluster with user managed load balacer and nodes are part of the same subnet MGMT-19500: Enable installation of baremetal / vsphere cluster with user managed load balacer and nodes are part of the same subnet Dec 15, 2024
@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 Dec 15, 2024
@danmanor
Copy link
Contributor Author

/hold

@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 Dec 15, 2024
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

Attention: Patch coverage is 88.80597% with 15 lines in your changes missing coverage. Please review.

Project coverage is 67.60%. Comparing base (744bc1f) to head (60da7b3).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
internal/cluster/validations/validations.go 0.00% 6 Missing ⚠️
internal/bminventory/inventory.go 90.90% 1 Missing and 2 partials ⚠️
...oller/controllers/clusterdeployments_controller.go 84.61% 1 Missing and 1 partial ⚠️
internal/featuresupport/features_networking.go 93.33% 1 Missing and 1 partial ⚠️
internal/network/utils.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7096      +/-   ##
==========================================
- Coverage   67.86%   67.60%   -0.27%     
==========================================
  Files         291      296       +5     
  Lines       39831    40202     +371     
==========================================
+ Hits        27030    27177     +147     
- Misses      10361    10580     +219     
- Partials     2440     2445       +5     
Files with missing lines Coverage Δ
internal/cluster/validator.go 95.46% <100.00%> (+0.11%) ⬆️
internal/common/common.go 28.57% <ø> (ø)
internal/featuresupport/feature_support_level.go 96.49% <ø> (ø)
internal/featuresupport/features_misc.go 88.26% <ø> (ø)
internal/featuresupport/features_platforms.go 93.15% <100.00%> (+0.72%) ⬆️
internal/network/machine_network_cidr.go 61.35% <100.00%> (+0.76%) ⬆️
internal/provider/baremetal/installConfig.go 53.84% <100.00%> (+10.98%) ⬆️
...oller/controllers/clusterdeployments_controller.go 72.89% <84.61%> (+0.09%) ⬆️
internal/featuresupport/features_networking.go 87.07% <93.33%> (+1.66%) ⬆️
internal/network/utils.go 45.94% <0.00%> (-0.32%) ⬇️
... and 2 more

... and 11 files with indirect coverage changes

type:
x-go-custom-tag: gorm:"not null;check:load_balancer_type in ('cluster-managed', 'user-managed');default:'cluster-managed'"
description: |
Indicates if the load balancer will be managed by the cluster or by the user. This is optional and The
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this only to be used in "User Managed Networking" mode or does this somehow work in "cluster managed" networking, with the only exception being load balancer config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that's a "yes" to "This only works for UMN"

Do we verify that the networking is UMN when allowing this to be set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh no I meant this work in "cluster managed" networking, with the only exception being load balancer config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the effect of user-managed networking + user-managed LB?

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is simpler to manage this feature as part of cluster-managed-networking rather then part of user-managed-networking

@paul-maidment
Copy link
Contributor

The title of this issue contains "....with user managed load balancer and nodes are part of the same subnet".
I notice that the validation code skips any kind of validation of this when the LB is user managed.

Is there a validation performed before the installation starts to ensure that the user LB is reachable?

Copy link
Contributor

@eranco74 eranco74 left a comment

Choose a reason for hiding this comment

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

/lgtm

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

/override ci/prow/edge-e2e-oci-assisted-4-18 ci/prow/edge-e2e-oci-assisted-4-14

Copy link

openshift-ci bot commented Dec 26, 2024

@danmanor: Overrode contexts on behalf of danmanor: ci/prow/edge-e2e-oci-assisted-4-14, ci/prow/edge-e2e-oci-assisted-4-18

In response to this:

/override ci/prow/edge-e2e-oci-assisted-4-18 ci/prow/edge-e2e-oci-assisted-4-14

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.

@danmanor
Copy link
Contributor Author

/override ci/prow/edge-e2e-oci-assisted-4-14

Copy link

openshift-ci bot commented Dec 26, 2024

@danmanor: Overrode contexts on behalf of danmanor: ci/prow/edge-e2e-oci-assisted-4-14

In response to this:

/override ci/prow/edge-e2e-oci-assisted-4-14

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.

LoadBalancerTypeClusterManaged LoadBalancerType = "ClusterManaged"

// LoadBalancerTypeUserManaged is a load balancer managed outside of the cluster by the customer. When this is
// used no virtual IP addresses should be specified. Note that this is only allowed for the bare metal and
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently just baremetal (no vSphere)

@@ -126,6 +134,11 @@ func VerifyVip(hosts []*models.Host, machineNetworkCidr string, vip string, vipN
if ipIsBroadcast(vip, machineNetworkCidr) {
return models.VipVerificationFailed, errors.Errorf("%s <%s> is the broadcast address of machine-network-cidr <%s>", vipName, vip, machineNetworkCidr)
}

if !verifyVipFree {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider renameing to shouldVerifyIfVipIsFree, current name is too similar to VerifyVipFree

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree

@danmanor
Copy link
Contributor Author

/test edge-e2e-metal-assisted-kube-api-umlb-4-18 edge-e2e-metal-assisted-umlb-4-18

@danmanor
Copy link
Contributor Author

/override ci/prow/edge-e2e-ai-operator-disconnected-capi ci/prow/edge-e2e-nutanix-assisted-4-18 ci/prow/okd-scos-e2e-aws-ovn

@danmanor
Copy link
Contributor Author

/hold

@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 Dec 26, 2024
Copy link

openshift-ci bot commented Dec 26, 2024

@danmanor: Overrode contexts on behalf of danmanor: ci/prow/edge-e2e-ai-operator-disconnected-capi, ci/prow/edge-e2e-nutanix-assisted-4-18, ci/prow/okd-scos-e2e-aws-ovn

In response to this:

/override ci/prow/edge-e2e-ai-operator-disconnected-capi ci/prow/edge-e2e-nutanix-assisted-4-18 ci/prow/okd-scos-e2e-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-sigs/prow repository.

@danmanor
Copy link
Contributor Author

/override ci/prow/edge-e2e-nutanix-assisted-4-14

Copy link

openshift-ci bot commented Dec 26, 2024

@danmanor: Overrode contexts on behalf of danmanor: ci/prow/edge-e2e-nutanix-assisted-4-14

In response to this:

/override ci/prow/edge-e2e-nutanix-assisted-4-14

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.

@paul-maidment
Copy link
Contributor

/test edge-e2e-ai-operator-ztp

@paul-maidment
Copy link
Contributor

/test edge-e2e-metal-assisted-kube-api-umlb-4-18

Copy link
Contributor

@paul-maidment paul-maidment left a comment

Choose a reason for hiding this comment

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

Assuming that the user accepts responsibility for setting up their load balancer and that we do not need to verify the provided VIP then I think this works fine.

Do E2E tests currently make use of the API VIP in any way, if so then would it be worth the extra step of setting up a "user defined" load balancer for the sake of making sure everything still works when the VIP is not the one we have already set up in the test?

@danmanor
Copy link
Contributor Author

@paul-maidment I created two new tests that test this exact scenario -

  • edge-e2e-metal-assisted-kube-api-umlb-4-18
  • edge-e2e-metal-assisted-umlb-4-18

They both passed, there is a small patch I need to add to kube-api-umlb-4-18 which currently fails the conformance tests (after the installation)

@danmanor
Copy link
Contributor Author

/unhold

@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 Dec 29, 2024
@danmanor
Copy link
Contributor Author

/test edge-e2e-metal-assisted-kube-api-umlb-4-18

@paul-maidment
Copy link
Contributor

/lgtm

@danmanor
Copy link
Contributor Author

/test edge-subsystem-kubeapi-aws

Copy link

openshift-ci bot commented Dec 29, 2024

@danmanor: 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/edge-e2e-metal-assisted-kube-api-umlb-4-18 60da7b3 link false /test edge-e2e-metal-assisted-kube-api-umlb-4-18

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-merge-bot openshift-merge-bot bot merged commit 6cdfd59 into openshift:master Dec 29, 2024
27 of 28 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: ose-agent-installer-api-server
This PR has been included in build ose-agent-installer-api-server-container-v4.19.0-202412291341.p0.g6cdfd59.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
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. 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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants