Skip to content

Commit

Permalink
fix: target enrichment rules from scale-set to node is incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Aug 1, 2024
1 parent 08de5a8 commit d4044e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v1.0.13

- fix: target enrichment rules from scale-set to node is incorrect

## v1.0.12

- Update dependencies (go 1.22)
Expand Down
8 changes: 6 additions & 2 deletions extscalesetinstance/scale_set_instance_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,11 @@ func (d *ssiDiscovery) DescribeEnrichmentRules() []discovery_kit_api.TargetEnric
getToEnrichmentRule("com.steadybit.extension_kubernetes.kubernetes-node"),
}
for _, targetType := range config.Config.EnrichScaleSetVMDataForTargetTypes {
rules = append(rules, getScaleSetVMToXEnrichmentRule(targetType))
if targetType == "com.steadybit.extension_host.host" || targetType == "com.steadybit.extension_kubernetes.kubernetes-node" {
log.Warn().Msgf("Target type %s is already covered by default rules. Omitting.", targetType)
} else {
rules = append(rules, getScaleSetVMToXEnrichmentRule(targetType))
}
}
return rules
}
Expand All @@ -401,7 +405,7 @@ func getToEnrichmentRule(target string) discovery_kit_api.TargetEnrichmentRule {
},
},
Dest: discovery_kit_api.SourceOrDestination{
Type: "com.steadybit.extension_host.host",
Type: target,
Selector: map[string]string{
"host.hostname": "${src.azure-scale-set-instance.hostname}",
},
Expand Down

0 comments on commit d4044e4

Please sign in to comment.