Skip to content

Commit 4e2fbc4

Browse files
committed
add namespace to deduplication tuple
helm charts can deploy to multiple namespaces at once, so compare on (namespace, name, kind, version) instead of just (name, kind, version).
1 parent a536dfc commit 4e2fbc4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

manifest/parse.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ type metadata struct {
2222
ApiVersion string `yaml:"apiVersion"`
2323
Kind string
2424
Metadata struct {
25-
Name string
25+
Namespace string
26+
Name string
2627
}
2728
}
2829

2930
func (m metadata) String() string {
30-
return fmt.Sprintf("%s, %s (%s)", m.Metadata.Name, m.Kind, m.ApiVersion)
31+
return fmt.Sprintf("%s, %s, %s (%s)", m.Metadata.Namespace, m.Metadata.Name, m.Kind, m.ApiVersion)
3132
}
3233

3334
func scanYamlSpecs(data []byte, atEOF bool) (advance int, token []byte, err error) {

0 commit comments

Comments
 (0)