-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Only watch metadata for ReplicaSets in K8s #41100
Conversation
a789817
to
99a610d
Compare
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
Not sure what the lint failure is about, or why it only happens on Windows. |
99a610d
to
ed19c44
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.
The changelog has some incorrect extra entries.
We should also address all the linter issues reported in this PR.
According to our team policy, we fix linter issues in the files we touch.
ed19c44
to
b78ec48
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
I've dropped the metricbeat changes from this PR for now. There's some kind of subtle problem with them that I'm still debugging. |
cd8a9cf
to
fd27cca
Compare
This pull request is now in conflicts. Could you fix it? 🙏
|
fd27cca
to
301fe55
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 🙂
301fe55
to
c313f0c
Compare
@gizas @tetianakravchenko @MichaelKatsoulis @constanca-m Can we get your eyes on this as codeowner? |
* Bump github.com/elastic/elastic-agent-autodiscover to v0.9.0 * Only watch metadata for ReplicaSets in k8s autodiscovery * Only watch metadata for ReplicaSets in add_kubernetes_metadata processor * Fix linter warnings * Merge changelog entries (cherry picked from commit ee780d2) # Conflicts: # NOTICE.txt # go.mod # go.sum # libbeat/autodiscover/providers/kubernetes/pod.go # libbeat/processors/add_kubernetes_metadata/kubernetes.go
* Bump github.com/elastic/elastic-agent-autodiscover to v0.9.0 * Only watch metadata for ReplicaSets in k8s autodiscovery * Only watch metadata for ReplicaSets in add_kubernetes_metadata processor * Fix linter warnings * Merge changelog entries (cherry picked from commit ee780d2)
* Bump github.com/elastic/elastic-agent-autodiscover to v0.9.0 * Only watch metadata for ReplicaSets in k8s autodiscovery * Only watch metadata for ReplicaSets in add_kubernetes_metadata processor * Fix linter warnings * Merge changelog entries (cherry picked from commit ee780d2) # Conflicts: # NOTICE.txt # go.mod # go.sum # libbeat/autodiscover/providers/kubernetes/pod.go # libbeat/processors/add_kubernetes_metadata/kubernetes.go
* Bump github.com/elastic/elastic-agent-autodiscover to v0.9.0 * Only watch metadata for ReplicaSets in k8s autodiscovery * Only watch metadata for ReplicaSets in add_kubernetes_metadata processor * Fix linter warnings * Merge changelog entries (cherry picked from commit ee780d2) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
* Bump github.com/elastic/elastic-agent-autodiscover to v0.9.0 * Only watch metadata for ReplicaSets in k8s autodiscovery * Only watch metadata for ReplicaSets in add_kubernetes_metadata processor * Fix linter warnings * Merge changelog entries (cherry picked from commit ee780d2) # Conflicts: # NOTICE.txt # go.mod # go.sum # libbeat/autodiscover/providers/kubernetes/pod.go # libbeat/processors/add_kubernetes_metadata/kubernetes.go Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
Proposed commit message
Use metadata watchers for ReplicaSets in components that need them. The only data we need from ReplicaSets are their name and OwnerReferences, which are used to connect Pods to Deployments and DaemonSets.
This PR makes the change in:
add_kubernetes_metadata
processorFor more details see elastic/elastic-agent#5623.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
You need a full K8s cluster, unfortunately. I've tested it using the default elastic-agent standalone manifest, by building a custom container image and loading it into a local kind cluster.
Related issues