-
Notifications
You must be signed in to change notification settings - Fork 94
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
✨ supporting cloudevents for work agent #321
✨ supporting cloudevents for work agent #321
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #321 +/- ##
==========================================
- Coverage 61.76% 61.63% -0.14%
==========================================
Files 132 133 +1
Lines 13989 14083 +94
==========================================
+ Hits 8641 8680 +39
- Misses 4583 4632 +49
- Partials 765 771 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/assign @qiujian16 |
/assign @clyang82 |
return nil | ||
} | ||
|
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.
it needs comment here. we should explain why we build like this.
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.
added
pkg/work/spoke/options.go
Outdated
) | ||
|
||
// WorkloadAgentOptions defines the flags for workload agent | ||
type WorkloadAgentOptions struct { | ||
StatusSyncInterval time.Duration | ||
AppliedManifestWorkEvictionGracePeriod time.Duration | ||
MQTTOptions *mqtt.MQTTOptions |
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.
Do we need to start webhook server if it is configured to run with mqtt option? I think we may not.
Line 62 in 8a4c834
cmd.AddCommand(webhook.NewWorkWebhook()) |
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.
this is options only for agent,the webhook-server is a sub command for work binary, we can control whether to start it outside
./work --help
Spoke Cluster Work
Available Commands:
agent Start the Work Agent
completion Generate the autocompletion script for the specified shell
help Help about any command
manager Start the Work Hub Manager
webhook-server Start the work webhook server
to use this work agent --mqtt-broker=...
How to test the MQTT protocol here? |
I'm not sure, the work client with MQTT is already tested in the api repo, but for work agent, now we don't have a server supporting this, currently, we may not be able to start the e2e test in the ocm, after the maestro server is ready, we may use it to do the e2e test in the ocm? |
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.
Do we also need to add cloudevents support to the singleton agent ? https://github.com/morvencao/OCM/tree/main/pkg/singleton/spoke
the singleton agent calls the work agent code, so this support will be also in the singleton agent |
TODO, instead of using flags. It will be better to have a config file for mqtt setup. We should only have one flag to specify driver for the work agent |
good suggestion, will implement this in this pr |
ccb00af
to
360f714
Compare
/hold |
/unhold |
0e07457
to
3e8c60f
Compare
Signed-off-by: Wei Liu <liuweixa@redhat.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, skeeey 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 |
d2324b8
into
open-cluster-management-io:main
Summary
Related issue(s)
Fixes #