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

Enable tls #893

Merged
merged 9 commits into from
Aug 30, 2022
Merged

Enable tls #893

merged 9 commits into from
Aug 30, 2022

Conversation

gabo1208
Copy link
Contributor

@gabo1208 gabo1208 commented Aug 17, 2022

Changes

  • 🎁 Enable Tls for RabbitMQ Broker for known CA authorities
  • 🎁 Enable Tls for RabbitMQ Source for known CA authorities
  • 🎁 Now the cluster port is configurable on the rabbitmq cluster secret on the port param (if you are not using the RabbitMQ Topology Operator)
  • 🧹 Minor refactor to rabbit service helper

/kind enhancement

Fixes #818 #566

Release Note

- 🎁 Enable Tls for RabbitMQ Broker for known CA authorities
- 🎁 Enable Tls for RabbitMQ Source for known CA authorities
- 🎁 RabbitMQ Cluster connection port is configurable on the rabbitmq cluster secret on the `port` param (if you are not using the RabbitMQ Topology Operator)

Docs

@knative-prow
Copy link

knative-prow bot commented Aug 17, 2022

@gabo1208: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

In response to this:

Changes

/kind

Fixes #

Release Note


Docs


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.

@knative-prow knative-prow bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 17, 2022
@codecov
Copy link

codecov bot commented Aug 17, 2022

Codecov Report

Merging #893 (00a9960) into main (70ee1c8) will increase coverage by 0.53%.
The diff coverage is 68.00%.

@@            Coverage Diff             @@
##             main     #893      +/-   ##
==========================================
+ Coverage   71.11%   71.64%   +0.53%     
==========================================
  Files          43       43              
  Lines        2970     2984      +14     
==========================================
+ Hits         2112     2138      +26     
+ Misses        779      766      -13     
- Partials       79       80       +1     
Impacted Files Coverage Δ
pkg/apis/duck/v1beta1/rabbit.go 0.00% <ø> (ø)
pkg/rabbit/service.go 18.59% <52.94%> (+11.13%) ⬆️
pkg/adapter/adapter.go 59.49% <100.00%> (-2.86%) ⬇️
pkg/rabbit/setup.go 84.15% <100.00%> (+1.00%) ⬆️
pkg/reconciler/source/resources/receive_adapter.go 95.38% <0.00%> (-0.04%) ⬇️
pkg/dispatcher/dispatcher.go 42.96% <0.00%> (+0.31%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@gab-satchi gab-satchi left a comment

Choose a reason for hiding this comment

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

Just did a quick pass. There are a few things that stand out:

  • I don't think we should have a flag to say "ssl". When it's a RabbitMQCluster, we could get the tls config from that reference. So the ssl field is only useful for the Secret reference. It might be okay to do what messaging-topology-operator does which is just rely on the uri to have an http or https.
  • I see us switching the protocol based on the ssl flag, but not doing loading any of the system certs which may be required for self-sigend certs.
  • self-signed certs process would need to be documented (can be punted to followup)
  • This would be a feature to add some e2e tests for

docs/source/README.md Outdated Show resolved Hide resolved
@gabo1208
Copy link
Contributor Author

gabo1208 commented Aug 17, 2022

Just did a quick pass. There are a few things that stand out:

  • I don't think we should have a flag to say "ssl". When it's a RabbitMQCluster, we could get the tls config from that reference. So the ssl field is only useful for the Secret reference. It might be okay to do what messaging-topology-operator does which is just rely on the uri to have an http or https.
  • I see us switching the protocol based on the ssl flag, but not doing loading any of the system certs which may be required for self-sigend certs.
  • self-signed certs process would need to be documented (can be punted to followup)
  • This would be a feature to add some e2e tests for

For the ssl regard I was thinking if the rabbitmq is exposed on a https endpoint but is not using amqps is better to have something explicit (or that can be easily setup as it is a string flag) the rest of the comments are on point and yes I'd like to left those for a follow up pr

@gab-satchi
Copy link
Contributor

If the self-signed bits aren't in then we should remove those from the release notes and the "Fixes". You'd need to add the ca certs when making the amqp call so it can be trusted.

Copy link
Contributor

@gab-satchi gab-satchi left a comment

Choose a reason for hiding this comment

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

Just some minor docs readability things. If you can remove the self-signed bits from the description, this is good to go

config/broker/300-rabbitmqbrokerconfig.yaml Outdated Show resolved Hide resolved
config/source/300-rabbitmqsource.yaml Outdated Show resolved Hide resolved
docs/source/README.md Outdated Show resolved Hide resolved
@gab-satchi
Copy link
Contributor

I think we should test the RabbitMQURL function. It feels more like a util anyways

@gabo1208
Copy link
Contributor Author

maybe test the rabbitmqurl method in a following pr?

Copy link
Contributor

@gab-satchi gab-satchi left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 23, 2022
@gabo1208
Copy link
Contributor Author

/override codecov/patch

@knative-prow
Copy link

knative-prow bot commented Aug 25, 2022

@gabo1208: gabo1208 unauthorized: /override is restricted to Repo administrators.

In response to this:

/override codecov/patch

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.

@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2022
@knative-extensions knative-extensions deleted a comment from knative-prow bot Aug 30, 2022
Copy link
Contributor

@gab-satchi gab-satchi left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2022
@knative-prow
Copy link

knative-prow bot commented Aug 30, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gab-satchi, gabo1208

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:
  • OWNERS [gab-satchi,gabo1208]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@dprotaso
Copy link
Contributor

/override codecov/patch

@knative-prow
Copy link

knative-prow bot commented Aug 30, 2022

@dprotaso: Overrode contexts on behalf of dprotaso: codecov/patch

In response to this:

/override codecov/patch

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.

@knative-prow knative-prow bot merged commit c7afde8 into knative-extensions:main Aug 30, 2022
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. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RabbitMQ Port not configurable
3 participants