Skip to content

Commit 6ea6290

Browse files
authored
[chore][k8sattributes] Remove unused Name field of Association struct (#44547)
Follow up from #43939 (comment). The `Association.Name` field is not used anymore and can be removed. Note: It's inside the `internal/kube` pkg hence it's not a breaking change. Signed-off-by: ChrsMark <[email protected]>
1 parent adacec4 commit 6ea6290

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

processor/k8sattributesprocessor/internal/kube/client_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ func TestPodCreate(t *testing.T) {
371371
func TestPodAddOutOfSync(t *testing.T) {
372372
c, _ := newTestClient(t)
373373
c.Associations = append(c.Associations, Association{
374-
Name: "name",
375374
Sources: []AssociationSource{
376375
{
377376
From: ResourceSource,

processor/k8sattributesprocessor/internal/kube/kube.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,6 @@ type Associations struct {
399399

400400
// Association represents one association rule
401401
type Association struct {
402-
Name string
403402
Sources []AssociationSource
404403
}
405404

processor/k8sattributesprocessor/processor_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,6 @@ func TestIPSourceWithPodAssociation(t *testing.T) {
629629
m.kubernetesProcessorOperation(func(kp *kubernetesprocessor) {
630630
kp.podAssociations = []kube.Association{
631631
{
632-
Name: "k8s.pod.ip",
633632
Sources: []kube.AssociationSource{
634633
{
635634
From: "resource_attribute",
@@ -638,7 +637,6 @@ func TestIPSourceWithPodAssociation(t *testing.T) {
638637
},
639638
},
640639
{
641-
Name: "k8s.pod.ip",
642640
Sources: []kube.AssociationSource{
643641
{
644642
From: "resource_attribute",
@@ -647,7 +645,6 @@ func TestIPSourceWithPodAssociation(t *testing.T) {
647645
},
648646
},
649647
{
650-
Name: "k8s.pod.ip",
651648
Sources: []kube.AssociationSource{
652649
{
653650
From: "resource_attribute",
@@ -1085,7 +1082,6 @@ func TestProcessorAddContainerAttributes(t *testing.T) {
10851082
op: func(kp *kubernetesprocessor) {
10861083
kp.podAssociations = []kube.Association{
10871084
{
1088-
Name: "k8s.pod.uid",
10891085
Sources: []kube.AssociationSource{
10901086
{
10911087
From: "resource_attribute",
@@ -1126,7 +1122,6 @@ func TestProcessorAddContainerAttributes(t *testing.T) {
11261122
op: func(kp *kubernetesprocessor) {
11271123
kp.podAssociations = []kube.Association{
11281124
{
1129-
Name: "k8s.pod.uid",
11301125
Sources: []kube.AssociationSource{
11311126
{
11321127
From: "resource_attribute",
@@ -1164,7 +1159,6 @@ func TestProcessorAddContainerAttributes(t *testing.T) {
11641159
op: func(kp *kubernetesprocessor) {
11651160
kp.podAssociations = []kube.Association{
11661161
{
1167-
Name: "k8s.pod.uid",
11681162
Sources: []kube.AssociationSource{
11691163
{
11701164
From: "resource_attribute",
@@ -1214,7 +1208,6 @@ func TestProcessorAddContainerAttributes(t *testing.T) {
12141208
op: func(kp *kubernetesprocessor) {
12151209
kp.podAssociations = []kube.Association{
12161210
{
1217-
Name: "k8s.pod.uid",
12181211
Sources: []kube.AssociationSource{
12191212
{
12201213
From: "resource_attribute",
@@ -1387,7 +1380,6 @@ func TestProcessorAddContainerAttributes(t *testing.T) {
13871380
op: func(kp *kubernetesprocessor) {
13881381
kp.podAssociations = []kube.Association{
13891382
{
1390-
Name: "k8s.pod.uid",
13911383
Sources: []kube.AssociationSource{
13921384
{
13931385
From: "resource_attribute",
@@ -1423,7 +1415,6 @@ func TestProcessorAddContainerAttributes(t *testing.T) {
14231415
op: func(kp *kubernetesprocessor) {
14241416
kp.podAssociations = []kube.Association{
14251417
{
1426-
Name: "k8s.pod.uid",
14271418
Sources: []kube.AssociationSource{
14281419
{
14291420
From: "resource_attribute",
@@ -1506,7 +1497,6 @@ func TestProcessorPicksUpPassthroughPodIp(t *testing.T) {
15061497
m.kubernetesProcessorOperation(func(kp *kubernetesprocessor) {
15071498
kp.podAssociations = []kube.Association{
15081499
{
1509-
Name: "k8s.pod.ip",
15101500
Sources: []kube.AssociationSource{
15111501
{
15121502
From: "resource_attribute",

0 commit comments

Comments
 (0)