Skip to content

Commit b5e478d

Browse files
committed
add pod, service, node annotations to object meta in informer
Signed-off-by: Alex Price <[email protected]>
1 parent 488ecc5 commit b5e478d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pkg/pipeline/transform/kubernetes/informers/informers.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,9 @@ func (k *Informers) initNodeInformer(informerFactory inf.SharedInformerFactory,
234234

235235
return &model.ResourceMetaData{
236236
ObjectMeta: metav1.ObjectMeta{
237-
Name: node.Name,
238-
Labels: node.Labels,
237+
Name: node.Name,
238+
Labels: node.Labels,
239+
Annotations: node.Annotations,
239240
},
240241
Kind: model.KindNode,
241242
OwnerName: node.Name,
@@ -294,6 +295,7 @@ func (k *Informers) initPodInformer(informerFactory inf.SharedInformerFactory, c
294295
Name: pod.Name,
295296
Namespace: pod.Namespace,
296297
Labels: pod.Labels,
298+
Annotations: pod.Annotations,
297299
OwnerReferences: pod.OwnerReferences,
298300
},
299301
Kind: model.KindPod,
@@ -335,9 +337,10 @@ func (k *Informers) initServiceInformer(informerFactory inf.SharedInformerFactor
335337
}
336338
return &model.ResourceMetaData{
337339
ObjectMeta: metav1.ObjectMeta{
338-
Name: svc.Name,
339-
Namespace: svc.Namespace,
340-
Labels: svc.Labels,
340+
Name: svc.Name,
341+
Namespace: svc.Namespace,
342+
Labels: svc.Labels,
343+
Annotations: svc.Annotations,
341344
},
342345
Kind: model.KindService,
343346
OwnerName: svc.Name,

0 commit comments

Comments
 (0)