-
Notifications
You must be signed in to change notification settings - Fork 763
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
fix: refactoring to remove pubsub flags to improve experience #3339
Conversation
Signed-off-by: Jaydip Gabani <[email protected]>
Signed-off-by: Jaydip Gabani <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3339 +/- ##
==========================================
- Coverage 54.49% 46.72% -7.77%
==========================================
Files 134 218 +84
Lines 12329 14798 +2469
==========================================
+ Hits 6719 6915 +196
- Misses 5116 7079 +1963
- Partials 494 804 +310
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I'm confused as to how this improves UX. If a customer doesn't specify the flags, won't they get the default values, which is an equivalent effort on the users part? If a user is using a custom queue value/name how would they be able to continue to do so with this change? Are there any backwards compatibility concerns removing flags from the command line and Helm chart? |
Also, we probably want to ensure pubsub can still be disabled for those who do not want to use it. |
Sorry, that last comment was off-topic... you mistakenly removed |
@@ -212,8 +212,6 @@ controllerManager: | |||
# - ipBlock: | |||
# cidr: 0.0.0.0/0 | |||
audit: | |||
enablePubsub: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you removed the wrong value here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yip! I will update that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea
Instead of using flags to define global connection and channel - ensure that |
Signed-off-by: Jaydip Gabani <[email protected]>
Signed-off-by: Jaydip Gabani <[email protected]>
@@ -125,6 +126,9 @@ Dapr: https://dapr.io/ | |||
- name: go-sub | |||
image: fake-subscriber:latest | |||
imagePullPolicy: Never | |||
env: | |||
- name: AUDIT_CHANNEL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is consuming this env var? it looks like it is no longer being used and got removed here: https://github.com/open-policy-agent/gatekeeper/pull/3339/files#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52L228
The concern here is by removing flags, it will definitely break in-place upgrade if users are using this alpha feature. are we ok with doing that for an alpha feature? @maxsmythe Separately, you should add some details in the docs for how users can use |
@@ -19,16 +20,19 @@ func NewSystem() *System { | |||
return &System{} | |||
} | |||
|
|||
func (s *System) Publish(_ context.Context, connection string, topic string, msg interface{}) error { | |||
func (s *System) Publish(ctx context.Context, msg interface{}) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we still looking at supporting multiple queues simultaneously? Possibly specifying which connection/topic gets pushed to as part of a constraint's enforcement action?
Example: send violation X to security queue, violation Y to ops queue?
If so, Publish()
will need to support something more fine-grained than "broadcast everywhere"
@@ -21,19 +24,22 @@ type Dapr struct { | |||
|
|||
// Name of the pubsub component | |||
pubSubComponent string | |||
|
|||
// Topic where the messages would be published for the connection | |||
topic string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What part of the connection/channel config should be specify-able by downstream users (e.g. constraint authors) and what should be owned by the author of the constraint objects?
We should think about the personas who would be interacting with these knobs. Are the people setting up the infra always the same people writing the policy?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
What this PR does / why we need it:
--audit-connection
and--audit-channel
flags to reduce configuration complexityWhich issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):Fixes #
Special notes for your reviewer: