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-18913: Add support for external load balancer #6865

Closed

Conversation

jhernand
Copy link
Contributor

@jhernand jhernand commented Oct 4, 2024

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

https://issues.redhat.com/browse/MGMT-18913

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

openshift-ci-robot commented Oct 4, 2024

@jhernand: This pull request references MGMT-18913 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 epic to target the "4.18.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.

List all the issues related to this PR

https://issues.redhat.com/browse/MGMT-18913

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

@jhernand jhernand marked this pull request as draft October 4, 2024 10:43
@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 4, 2024
@openshift-ci openshift-ci bot added the api-review Categorizes an issue or PR as actively needing an API review. label Oct 4, 2024
Copy link

openshift-ci bot commented Oct 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhernand

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 Oct 4, 2024
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.67%. Comparing base (0dddb7e) to head (46fa071).
Report is 30 commits behind head on master.

Current head 46fa071 differs from pull request most recent head 4664d6e

Please upload reports for the commit 4664d6e to get more accurate results.

Files with missing lines Patch % Lines
internal/featuresupport/features_platforms.go 95.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6865      +/-   ##
==========================================
+ Coverage   68.19%   68.67%   +0.48%     
==========================================
  Files         279      249      -30     
  Lines       39282    37459    -1823     
==========================================
- Hits        26788    25725    -1063     
+ Misses      10061     9432     -629     
+ Partials     2433     2302     -131     
Files with missing lines Coverage Δ
internal/featuresupport/feature_support_level.go 96.49% <ø> (ø)
internal/featuresupport/features_platforms.go 92.38% <95.00%> (-0.01%) ⬇️

... and 93 files with indirect coverage changes

@jhernand jhernand force-pushed the add_external_load_balancer_support branch 3 times, most recently from 867aafa to 49ae18e Compare October 9, 2024 16:23
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:

```json
{
  ...
  "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:

```yaml
platform:
  baremetal:
    loadBalancer:
      type: UserManaged
```

Or for _vSphere_:

```
platform:
  vsphere:
    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.

Related: https://issues.redhat.com/browse/MGMT-18913
Signed-off-by: Juan Hernandez <[email protected]>
@jhernand jhernand force-pushed the add_external_load_balancer_support branch from 49ae18e to 4664d6e Compare December 3, 2024 15:27
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 3, 2024

@jhernand: This pull request references MGMT-18913 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 epic 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

https://issues.redhat.com/browse/MGMT-18913

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

Copy link

openshift-ci bot commented Dec 5, 2024

@jhernand: 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/edge-unit-test 46fa071 link true /test edge-unit-test
ci/prow/edge-e2e-metal-assisted-mtv-4-17 49ae18e link true /test edge-e2e-metal-assisted-mtv-4-17
ci/prow/edge-e2e-metal-assisted-osc-sno-4-17 4664d6e link true /test edge-e2e-metal-assisted-osc-sno-4-17
ci/prow/edge-e2e-metal-assisted-osc-4-17 4664d6e link true /test edge-e2e-metal-assisted-osc-4-17

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.

@jhernand
Copy link
Contributor Author

Replaced by #7096.

@jhernand jhernand closed this Dec 17, 2024
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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants