Skip to content

Commit

Permalink
finish cluster name removal
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirianni committed Dec 18, 2023
1 parent a9ac344 commit b8cb6ab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ type K8sMetadataDecorator struct {

// MetadataCacheEntry is an entry in the metadata cache
type MetadataCacheEntry struct {
ClusterName string
UID string
ExpirationTime time.Time
Labels map[string]string
Expand Down Expand Up @@ -317,9 +316,6 @@ func (k *K8sMetadataDecorator) decorateEntryWithNamespaceMetadata(nsMeta Metadat
}

entry.Resource["k8s.namespace.uid"] = nsMeta.UID
if nsMeta.ClusterName != "" {
entry.Resource["k8s.cluster.name"] = nsMeta.ClusterName
}
}

func (k *K8sMetadataDecorator) decorateEntryWithPodMetadata(podMeta MetadataCacheEntry, entry *entry.Entry) {
Expand All @@ -336,9 +332,6 @@ func (k *K8sMetadataDecorator) decorateEntryWithPodMetadata(podMeta MetadataCach
}

entry.Resource["k8s.pod.uid"] = podMeta.UID
if podMeta.ClusterName != "" {
entry.Resource["k8s.cluster.name"] = podMeta.ClusterName
}

for key, value := range podMeta.AdditionalResourceValues {
if value != "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func TestK8sMetadataDecoratorCachedMetadata(t *testing.T) {
Labels: map[string]string{
"label1": "lab1",
},
ClusterName: "testcluster",
Annotations: map[string]string{
"annotation1": "ann1",
},
Expand Down

0 comments on commit b8cb6ab

Please sign in to comment.