Skip to content

Move ingress & filter TLS secret names into constants#7081

Merged
knative-prow[bot] merged 3 commits intoknative:mainfrom
creydr:move-tls-secret-name-into-constant
Jul 7, 2023
Merged

Move ingress & filter TLS secret names into constants#7081
knative-prow[bot] merged 3 commits intoknative:mainfrom
creydr:move-tls-secret-name-into-constant

Conversation

@creydr
Copy link
Member

@creydr creydr commented Jul 7, 2023

Follow up on #6986 (comment):

Moved the tls secret names for mt-broker-ingress & mt-broker-filter into constants

@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 7, 2023
@knative-prow knative-prow bot requested review from aslom and lberk July 7, 2023 08:03
@creydr
Copy link
Member Author

creydr commented Jul 7, 2023

/assign @pierDipi

@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage: 33.33% and project coverage change: -0.01 ⚠️

Comparison is base (1e96c78) 78.31% compared to head (377be6a) 78.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7081      +/-   ##
==========================================
- Coverage   78.31%   78.31%   -0.01%     
==========================================
  Files         250      250              
  Lines       13291    13290       -1     
==========================================
- Hits        10409    10408       -1     
  Misses       2351     2351              
  Partials      531      531              
Impacted Files Coverage Δ
pkg/broker/filter/server_manager.go 0.00% <0.00%> (ø)
pkg/broker/ingress/server_manager.go 0.00% <0.00%> (ø)
pkg/reconciler/broker/broker.go 77.27% <33.33%> (-0.08%) ⬇️
pkg/reconciler/broker/trigger/trigger.go 82.71% <33.33%> (ø)
pkg/reconciler/broker/controller.go 87.83% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

"k8s.io/apimachinery/pkg/types"
"knative.dev/eventing/pkg/eventingtls"
"knative.dev/eventing/pkg/kncloudevents"
"knative.dev/eventing/pkg/reconciler/broker"
Copy link
Member

Choose a reason for hiding this comment

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

This import has the side effect of starting a whole bunch of informers

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh. So better keeping it in the pkg/broker|filter package then I guess

Copy link
Member

@pierDipi pierDipi Jul 7, 2023

Choose a reason for hiding this comment

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

Doesn't that have the same side effect?

For example, broker/filter package might need an informer that the controller doesn't need which would waste resources or require additional permissions (like Eventype informer is not needed on the controller but needed on the broker ingress)

Copy link
Member

Choose a reason for hiding this comment

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

Even if it's not needed or it works fine right now, it seems we're creating code coupling that is not really necessary and might break in the future, the secret name can be considered a contract (which it is even today) because changing the secret name is not as simple as changing the constant (we need at least to change the cert manager resources but also migration, etc would be necessary)

@creydr creydr force-pushed the move-tls-secret-name-into-constant branch from b0ba922 to 377be6a Compare July 7, 2023 10:32
@creydr creydr requested a review from pierDipi July 7, 2023 11:32
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
@knative-prow
Copy link

knative-prow bot commented Jul 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: creydr, pierDipi

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

@knative-prow knative-prow bot merged commit afcf60b into knative:main Jul 7, 2023
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/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.

2 participants