Skip to content

Commit

Permalink
Disable Deployment and Replicaset enrichment by default (#62)
Browse files Browse the repository at this point in the history
Disabling AddResourceMetadataConfig.Deployment: false and
AddResourceMetadataConfig.Cronjob: false as per discussion here
#31 (comment)
  • Loading branch information
gizas authored Oct 11, 2023
1 parent 4d9e9d0 commit 285f0bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions kubernetes/metadata/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func GetDefaultResourceMetadataConfig() *AddResourceMetadataConfig {
return &AddResourceMetadataConfig{
Node: metaCfg,
Namespace: metaCfg,
Deployment: true,
CronJob: true,
Deployment: false,
CronJob: false,
}
}
14 changes: 8 additions & 6 deletions kubernetes/metadata/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,10 @@ func TestPod_Generate(t *testing.T) {
"ip": "127.0.0.5",
},
"namespace": defaultNs,
"deployment": mapstr.M{
"name": "nginx-deployment",
},
// We comment below block because add_resource_metadata.deployment: false by default
// "deployment": mapstr.M{
// "name": "nginx-deployment",
// },
"replicaset": mapstr.M{
"name": "nginx-rs",
},
Expand Down Expand Up @@ -403,9 +404,10 @@ func TestPod_Generate(t *testing.T) {
"ip": "127.0.0.5",
},
"namespace": defaultNs,
"deployment": mapstr.M{
"name": "nginx-deployment",
},
// We comment below block because add_resource_metadata.deployment: false by default
// "deployment": mapstr.M{
// "name": "nginx-deployment",
// },
"replicaset": mapstr.M{
"name": "nginx-rs",
},
Expand Down

0 comments on commit 285f0bb

Please sign in to comment.