Skip to content

Commit 51e8456

Browse files
authoredFeb 13, 2024
Updating NewPod updater with autodiscover 0.6.7 version (#4226)
* updating NewPod updater with autodiscover 0.6.7 version
1 parent 983dc2a commit 51e8456

File tree

5 files changed

+45
-11
lines changed

5 files changed

+45
-11
lines changed
 

‎NOTICE.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -722,11 +722,11 @@ these terms.
722722

723723
--------------------------------------------------------------------------------
724724
Dependency : github.com/elastic/elastic-agent-autodiscover
725-
Version: v0.6.6
725+
Version: v0.6.7
726726
Licence type (autodetected): Apache-2.0
727727
--------------------------------------------------------------------------------
728728

729-
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-autodiscover@v0.6.6/LICENSE:
729+
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-autodiscover@v0.6.7/LICENSE:
730730

731731
Apache License
732732
Version 2.0, January 2004
@@ -17664,11 +17664,11 @@ Contents of probable licence file $GOMODCACHE/github.com/google/gofuzz@v1.2.0/LI
1766417664

1766517665
--------------------------------------------------------------------------------
1766617666
Dependency : github.com/google/licenseclassifier
17667-
Version: v0.0.0-20200402202327-879cb1424de0
17667+
Version: v0.0.0-20221004142553-c1ed8fcf4bab
1766817668
Licence type (autodetected): Apache-2.0
1766917669
--------------------------------------------------------------------------------
1767017670

17671-
Contents of probable licence file $GOMODCACHE/github.com/google/licenseclassifier@v0.0.0-20200402202327-879cb1424de0/LICENSE:
17671+
Contents of probable licence file $GOMODCACHE/github.com/google/licenseclassifier@v0.0.0-20221004142553-c1ed8fcf4bab/LICENSE:
1767217672

1767317673

1767417674
Apache License
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Make more selective the Pod autodiscovery upon node and namespace update events
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
description: Update the PodUpdater fucntion with additonal checks before actually triggering Pod watcher restarts
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: elastic-agent
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
pr: https://github.com/elastic/elastic-agent/pull/4226
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
issue: https://github.com/elastic/beats/issues/37338

‎go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/docker/go-units v0.5.0
1313
github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5
1414
github.com/elastic/e2e-testing v1.1.0
15-
github.com/elastic/elastic-agent-autodiscover v0.6.6
15+
github.com/elastic/elastic-agent-autodiscover v0.6.7
1616
github.com/elastic/elastic-agent-client/v7 v7.8.0
1717
github.com/elastic/elastic-agent-libs v0.7.5
1818
github.com/elastic/elastic-agent-system-metrics v0.9.1
@@ -134,7 +134,7 @@ require (
134134
github.com/golang/snappy v0.0.4 // indirect
135135
github.com/google/gnostic v0.6.9 // indirect
136136
github.com/google/gofuzz v1.2.0 // indirect
137-
github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0 // indirect
137+
github.com/google/licenseclassifier v0.0.0-20221004142553-c1ed8fcf4bab // indirect
138138
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
139139
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
140140
github.com/hashicorp/errwrap v1.1.0 // indirect

‎go.sum

+5-3
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn
796796
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
797797
github.com/elastic/e2e-testing v1.1.0 h1:Y+K215EWkf3ojAWmBK2JrxH/rITjkKM1zR8mnwIpvLw=
798798
github.com/elastic/e2e-testing v1.1.0/go.mod h1:8q2d8dmwavJXISowwaoreHFBnbR/uK4qanfRGhC/W9A=
799-
github.com/elastic/elastic-agent-autodiscover v0.6.6 h1:P1y0dDpbhJc7Uw/xe85irPEad4Vljygc+y4iSxtqW7A=
800-
github.com/elastic/elastic-agent-autodiscover v0.6.6/go.mod h1:chulyCAyZb/njMHgzkhC/yWnt8v/Y6eCRUhmFVnsA5o=
799+
github.com/elastic/elastic-agent-autodiscover v0.6.7 h1:+KVjltN0rPsBrU8b156gV4lOTBgG/vt0efFCFARrf3g=
800+
github.com/elastic/elastic-agent-autodiscover v0.6.7/go.mod h1:hFeFqneS2r4jD0/QzGkrNk0YVdN0JGh7lCWdsH7zcI4=
801801
github.com/elastic/elastic-agent-client/v7 v7.8.0 h1:GHFzDJIWpdgI0qDk5EcqbQJGvwTsl2E2vQK3/xe+MYQ=
802802
github.com/elastic/elastic-agent-client/v7 v7.8.0/go.mod h1:ihtjqJzYiIltlRhNruaSSc0ogxIhqPD5hOMKq16cI1s=
803803
github.com/elastic/elastic-agent-libs v0.7.5 h1:4UMqB3BREvhwecYTs/L23oQp1hs/XUkcunPlmTZn5yg=
@@ -1075,8 +1075,10 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
10751075
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
10761076
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
10771077
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
1078-
github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0 h1:OggOMmdI0JLwg1FkOKH9S7fVHF0oEm8PX6S8kAdpOps=
10791078
github.com/google/licenseclassifier v0.0.0-20200402202327-879cb1424de0/go.mod h1:qsqn2hxC+vURpyBRygGUuinTO42MFRLcsmQ/P8v94+M=
1079+
github.com/google/licenseclassifier v0.0.0-20221004142553-c1ed8fcf4bab h1:okY7fFoWybMbxiHkaqStN4mxSrPfYmTZl5Zh32Z5FjY=
1080+
github.com/google/licenseclassifier v0.0.0-20221004142553-c1ed8fcf4bab/go.mod h1:jkYIPv59uiw+1MxTWlqQEKebsUDV1DCXQtBBn5lVzf4=
1081+
github.com/google/licenseclassifier/v2 v2.0.0-alpha.1/go.mod h1:YAgBGGTeNDMU+WfIgaFvjZe4rudym4f6nIn8ZH5X+VM=
10801082
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
10811083
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
10821084
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=

‎internal/pkg/composable/providers/kubernetes/pod.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ func NewPodEventer(
138138
watcher.AddEventHandler(p)
139139

140140
if nodeWatcher != nil && metaConf.Node.Enabled() {
141-
updater := kubernetes.NewNodePodUpdater(p.unlockedUpdate, watcher.Store(), &p.crossUpdate)
141+
updater := kubernetes.NewNodePodUpdater(p.unlockedUpdate, watcher.Store(), p.nodeWatcher, &p.crossUpdate)
142142
nodeWatcher.AddEventHandler(updater)
143143
}
144144

145145
if namespaceWatcher != nil && metaConf.Namespace.Enabled() {
146-
updater := kubernetes.NewNamespacePodUpdater(p.unlockedUpdate, watcher.Store(), &p.crossUpdate)
146+
updater := kubernetes.NewNamespacePodUpdater(p.unlockedUpdate, watcher.Store(), p.namespaceWatcher, &p.crossUpdate)
147147
namespaceWatcher.AddEventHandler(updater)
148148
}
149149

0 commit comments

Comments
 (0)