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

[OCCM] add support for TLS terminated loadbalancers #1474

Merged
merged 2 commits into from
Apr 21, 2021

Conversation

hamzazafar
Copy link
Contributor

@hamzazafar hamzazafar commented Apr 9, 2021

What this PR does / why we need it:
This PR brings support for creating TLS Terminated loadbalancers. User can specify tls container ref either in cloud-config file using default-tls-container-ref option or pass tls container ref in service spec using annotation loadbalancer.openstack.org/default-tls-container-ref. Cloud provider will create a listener with protocol TERMINATED_HTTPS and a pool with protocol HTTP.

This feature is supported only for Octavia.

This PR also fixes #1294

Special notes for reviewers:
To test this feature you have to create an openstack secret container of type certificate:

$ openstack secret container get https://X.X.X.X:9311/v1/containers/3898c759-ef67-4096-8ccf-3719cef674a3
+----------------+-----------------------------------------------------------------------------------+
| Field          | Value                                                                             |
+----------------+-----------------------------------------------------------------------------------+
| Container href | https://X.X.X.X:9311/v1/containers/3898c759-ef67-4096-8ccf-3719cef674a3|
| Name           | test_lb_tls_container                                                             |
| Created        | 2021-04-09 10:21:49+00:00                                                         |
| Status         | ACTIVE                                                                            |
| Type           | certificate                                                                       |
| Certificate    | https://X.X.X.X:9311/v1/secrets/a57f4d6d-9a45-48af-9a45-fdffccd7e967    |
| Intermediates  | None                                                                              |
| Private Key    | https://X.X.X.X:9311/v1/secrets/ed002ebe-9c81-4c75-9c81-fc6cfde81c55    |
| PK Passphrase  | None                                                                              |
| Consumers      | None                                                                              |
+----------------+-----------------------------------------------------------------------------------+

You can pass the default-tls-container-ref https://X.X.X.X:9311/v1/containers/3898c759-ef67-4096-8ccf-3719cef674a3 in an annotation loadbalancer.openstack.org/default-tls-container-ref to create an external cloud loadbalancer with a TERMINATED_HTTPS listener.

Release note:

[openstack-cloud-controller-manager] Added support for creating TLS terminated loadbalancers.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 9, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @hamzazafar. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Apr 9, 2021
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 9, 2021
@hamzazafar hamzazafar changed the title add support for TLS terminated loadbalancers [OCCM] add support for TLS terminated loadbalancers Apr 9, 2021
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build failed.

@hamzazafar hamzazafar changed the title [OCCM] add support for TLS terminated loadbalancers [OCCM] WIP add support for TLS terminated loadbalancers Apr 9, 2021
@hamzazafar hamzazafar changed the title [OCCM] WIP add support for TLS terminated loadbalancers [OCCM] add support for TLS terminated loadbalancers Apr 9, 2021
@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 9, 2021

Build succeeded.

@jichenjc
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 12, 2021
@hamzazafar
Copy link
Contributor Author

/retest

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2021

Build succeeded.

@hamzazafar
Copy link
Contributor Author

Hi @lingxiankong,

Can you please review the PR.

Thanks
Hamza

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 13, 2021

Build succeeded.

@lingxiankong
Copy link
Contributor

Looks good to me, but could you please add a little bit more description about what if loadbalancer.openstack.org/x-forwarded-for and loadbalancer.openstack.org/default-tls-container-ref are both set? Which one comes first? What the Octavia listener protocol will be?

@hamzazafar
Copy link
Contributor Author

Looks good to me, but could you please add a little bit more description about what if loadbalancer.openstack.org/x-forwarded-for and loadbalancer.openstack.org/default-tls-container-ref are both set? Which one comes first? What the Octavia listener protocol will be?

I have updated the docs, please have a look. Thanks!

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build failed.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build failed.

@hamzazafar
Copy link
Contributor Author

/retest

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Apr 19, 2021

Build succeeded.

@lingxiankong
Copy link
Contributor

I've tested again, this works perfectly fine. Thanks!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 21, 2021
@jichenjc
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2021
@k8s-ci-robot k8s-ci-robot merged commit 7361943 into kubernetes:master Apr 21, 2021
powellchristoph pushed a commit to powellchristoph/cloud-provider-openstack that referenced this pull request Jan 19, 2022
* add support for TLS terminated loadbalancers

* update docs
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[occm] insert_headers always in Update Listener body
4 participants