Skip to content

[AWS] Add LB Type in the infrastructure cluster object via install-config yaml#6478

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
gcs278:nlb-field
Oct 15, 2022
Merged

[AWS] Add LB Type in the infrastructure cluster object via install-config yaml#6478
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
gcs278:nlb-field

Conversation

@gcs278
Copy link

@gcs278 gcs278 commented Oct 11, 2022

Note: PR cloned from #6074 so I could modify. This is @miheer's commit.

In the ingress config cluster object we need to add api for AwsLBType which will store and persist the information of the desired LB type mentioned by the installer config API so that the ingress operator will refer the LB type from this object whenever someone accidentally deletes the ingress controller.

Currently, the default LB type i.e CLB/ELB gets set if you delete the ingress controller object even when the desired the LB type for default ingress controller
was set to NLB as ingress operator does not have a way to check the LB type as we don't store it.
This commit adds LB Type for AWS mentioned in the install-config.yaml in the infrastructure cluster object.

data/data/install.openshift.io_installconfigs.yaml A generated new field called lbType will be available to add load balancer type in the install-config.yaml for AWS
pkg/asset/manifests/ingress.go The ingress cluster object will be patched with this lbType provided by user so that we have the information related to the lbType persistent which can be referred by ingress operator when the default ingress controller is deleted.
pkg/asset/manifests/ingress_test.go Unit test to test setting of lbType in the ingress cluster object's spec and status as per the value specified in the install-config.yaml
pkg/explain/printer_test.go A new field to test called lbType which will be available to add the load balancer type in the install-config.yaml for AWS
pkg/types/aws/platform.go A new field called lbType will be available to add the load balancer type in the install-config.yaml for AWS

Enhacement proposal - openshift/enhancements#1148
OpenShift API - openshift/api#1209

Jira ticket - https://issues.redhat.com/browse/NE-942

@gcs278
Copy link
Author

gcs278 commented Oct 11, 2022

/assign r4f4

@gcs278
Copy link
Author

gcs278 commented Oct 11, 2022

I just removed the vendoring and openshift/api bump as the openshift/api version in master (20221004120407-c46852673d03) has our required changes for LB Type.

Copy link
Contributor

Choose a reason for hiding this comment

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

Classic will be created

Is there any blocker to use NLB as default?

Copy link
Author

Choose a reason for hiding this comment

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

Yup - it's documented here Shall we use NLB for default ingress controller ?
Specifically, we have this BZ https://bugzilla.redhat.com/show_bug.cgi?id=2023681 to figure out before going default.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: this line should be in the installer imports block.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@r4f4
Copy link
Contributor

r4f4 commented Oct 11, 2022

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 11, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: r4f4

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2022
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Some double spaces in the description fileld.

Copy link
Author

Choose a reason for hiding this comment

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

Hmm I see that, but I think this is generated from https://github.com/openshift/installer/pull/6478/files#diff-7941d8da46384fc43b6eeae7d5c3319065b16940457822346c9ccb08cbcf47b4R66, which uses a hanging indent and a bulleted list.

Should I remove the hanging indent and extra spaces from there?

Copy link
Contributor

Choose a reason for hiding this comment

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

I propose we do that as a follow-up.

@sadasu
Copy link
Contributor

sadasu commented Oct 11, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2022
In the ingress config cluster object we need to add api for AWS LBType which will store and persist the information of the desired LB type mentioned by the installer config API so that the ingress operator will refer the LB type from this object whenever someone accidentally deletes the ingress controller.
Currently, the default LB type i.e CLB/ELB gets set if you delete the ingress controller object even when the desired the LB type for default ingress controller
was set to NLB as ingress operator does not have a way to check the LB type as we don't store it.
This commit adds LB Type for AWS mentioned in the install-config.yaml in the ingress cluster object.

`data/data/install.openshift.io_installconfigs.yaml`  A generated new field called lbType will be available to add load balancer type in the install-config.yaml for AWS
`pkg/asset/manifests/ingress.go`  The ingress cluster object will be patched with this lbType provided by user so that we have the information related to the lbType persistent which can be referred by ingress operator  when the default ingress controller is deleted.
`pkg/asset/manifests/ingress_test.go` Unit test to test setting of lbType in the ingress cluster object's spec and status as per the value specified in the install-config.yaml
`pkg/explain/printer_test.go` A new field to test called lbType which will be available to add the load balancer type in the install-config.yaml for AWS
`pkg/types/aws/platform.go` A new field called lbType will be available to add the load balancer type in the install-config.yaml for AWS

Enhacement proposal - openshift/enhancements#1148
OpenShift API - openshift/api#1209

Fixes Jira ticket - https://issues.redhat.com/browse/NE-942

Modified-by: Grant Spence <gspence@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 11, 2022
@gcs278
Copy link
Author

gcs278 commented Oct 11, 2022

@sadasu Just modified the commit message to include my name in Modified-by for tracking purposes.

@miheer
Copy link
Contributor

miheer commented Oct 12, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 12, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD f957eda and 2 for PR HEAD 5d12adc in total

@gcs278
Copy link
Author

gcs278 commented Oct 12, 2022

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 6561f45 and 1 for PR HEAD 5d12adc in total

@r4f4
Copy link
Contributor

r4f4 commented Oct 13, 2022

/override ci/prow/e2e-vsphere-ovn

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 13, 2022

@r4f4: Overrode contexts on behalf of r4f4: ci/prow/e2e-vsphere-ovn

Details

In response to this:

/override ci/prow/e2e-vsphere-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.

@r4f4
Copy link
Contributor

r4f4 commented Oct 13, 2022

/test e2e-vsphere-ovn

@miheer
Copy link
Contributor

miheer commented Oct 14, 2022

@r4f4 @sadasu @jhixson74 @mtulio @patrickdillon can we get this merged ASAP. We want this to get merged by today. This is a critical epic after having discussed with the PM and stakeholders.

@r4f4
Copy link
Contributor

r4f4 commented Oct 14, 2022

/test e2e-vsphere-ovn

@r4f4
Copy link
Contributor

r4f4 commented Oct 14, 2022

/override ci/prow/e2e-vsphere-ovn

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2022

@r4f4: Overrode contexts on behalf of r4f4: ci/prow/e2e-vsphere-ovn

Details

In response to this:

/override ci/prow/e2e-vsphere-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.

@r4f4
Copy link
Contributor

r4f4 commented Oct 14, 2022

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 14, 2022
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD d3614ba and 2 for PR HEAD 5d12adc in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD ca97cf4 and 1 for PR HEAD 5d12adc in total

@r4f4
Copy link
Contributor

r4f4 commented Oct 14, 2022

/skip

@r4f4
Copy link
Contributor

r4f4 commented Oct 14, 2022

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2022

@r4f4: Overrode contexts on behalf of r4f4: ci/prow/e2e-aws-ovn, ci/prow/e2e-azure-ovn

Details

In response to this:

/override ci/prow/e2e-aws-ovn ci/prow/e2e-azure-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.

@r4f4
Copy link
Contributor

r4f4 commented Oct 14, 2022

/skip

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD c5d7528 and 0 for PR HEAD 5d12adc in total

@openshift-ci-robot
Copy link
Contributor

/hold

Revision 5d12adc was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 15, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2022

@gcs278: 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-libvirt 5d12adc link false /test e2e-libvirt
ci/prow/e2e-openstack 5d12adc link false /test e2e-openstack
ci/prow/okd-scos-e2e-aws-upgrade 5d12adc link false /test okd-scos-e2e-aws-upgrade
ci/prow/e2e-ibmcloud-ovn 5d12adc link false /test e2e-ibmcloud-ovn
ci/prow/e2e-aws-ovn-proxy 5d12adc link false /test e2e-aws-ovn-proxy

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

@r4f4
Copy link
Contributor

r4f4 commented Oct 15, 2022

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2022

@r4f4: Overrode contexts on behalf of r4f4: ci/prow/e2e-aws-ovn, ci/prow/e2e-vsphere-ovn

Details

In response to this:

/override ci/prow/e2e-aws-ovn ci/prow/e2e-vsphere-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.

@r4f4
Copy link
Contributor

r4f4 commented Oct 15, 2022

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 15, 2022
@openshift-merge-robot openshift-merge-robot merged commit 85c8d56 into openshift:master Oct 15, 2022
@Miciah
Copy link
Contributor

Miciah commented Oct 16, 2022

In the cluster-ingress-02-config.yml manifest in the artifacts/e2e-aws-ovn/ipi-install-install/artifacts/log-bundle-20221014201405.tar artifact from https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/batch/pull-ci-openshift-installer-master-e2e-aws-ovn/1580992330503032832, I see the following:

  loadBalancer:
    platform:
      aws: {}
      type: AWS

Whereas loadBalancer, platform, and aws are optional fields, the type subfield of the aws field is required:
https://github.com/openshift/api/blob/622889ac07cf3dd8787679af0d3176bf292b3185/config/v1/types_ingress.go#L144
Could that be causing the installer to fail to create the ingress.config.openshift.io/cluster object?

@Miciah
Copy link
Contributor

Miciah commented Oct 16, 2022

Yup, cluster-bootstrap-e0554618cff8.log from the same artifacts shows the following:

"cluster-ingress-02-config.yml": failed to create ingresses.v1.config.openshift.io/cluster -n : Ingress.config.openshift.io "cluster" is invalid: spec.loadBalancer.platform.aws.type: Required value

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. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants