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
[workloadmeta] componentize logic #19707
Conversation
56f225f
to
f8bbcef
Compare
8a285eb
to
efc5a4c
Compare
9f22c9a
to
cfad53f
Compare
4d838a3
to
50c450c
Compare
f5cd32a
to
3121e52
Compare
[workloadmeta] fix lint
ab81d7a
to
d3255d7
Compare
34d6317
to
b4f98d6
Compare
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.
LGTM
| } else { | ||
| catalog = workloadmeta.NodeAgent | ||
| } | ||
| catalog := workloadmeta.NodeAgent |
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.
Is it expected catalog is never set to workloadmeta.ClusterAgent?
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.
Yes, for dogstatsd I think this is expected.
| components := &DogstatsdComponents{ | ||
| DogstatsdServer: server, | ||
| WorkloadMeta: wmeta, | ||
| WorkloadMeta: w, |
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.
Ideally WorkloadMeta type could be optional.Option[workloadmeta.Component].
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.
To avoid running the CI again and hold back the train after the freeze, I'll do this in a follow-up. But that makes sense, I can make that change.
What does this PR do?
Moves
pkg/workloadmetatocomp/core/workloadmeta.Motivation
Componentize workloadmeta as a pre-requisite for the
taggerandauto-discoverycomponents.Additional Notes
Still some global state that should be eventually addressed.
Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
Reviewer's Checklist
Triagemilestone is set.major_changelabel if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.changelog/no-changeloglabel has been applied.qa/skip-qalabel is not applied.team/..label has been applied, indicating the team(s) that should QA this change.need-change/operatorandneed-change/helmlabels have been applied.k8s/<min-version>label, indicating the lowest Kubernetes version compatible with this feature.