Signed-off-by: Dan Jones <danj@replicated.com>
This commit is contained in:
Dan Jones
2022-09-05 15:54:54 +01:00
parent 63510fc89d
commit b6f8ac211e
+2 -6
View File
@@ -227,16 +227,12 @@ func AnalyzeSupportBundle(spec *troubleshootv1beta2.SupportBundleSpec, tmpDir st
return analyzeResults, nil
}
// the intention with these appends is to swap them out at a later date with more specific handlers for merging the spec fields
func ConcatSpec(target *troubleshootv1beta2.SupportBundle, source *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.SupportBundle{
func ConcatSpec(target *troubleshootv1beta2.SupportBundle, source *troubleshootv1beta2.SupportBundle) *troubleshootv1beta2.SupportBundle {
newBundle := target.DeepCopy()
for _, v := range source.Spec.Collectors {
newBundle.Spec.Collectors = append(target.Spec.Collectors,v)
newBundle.Spec.Collectors = append(target.Spec.Collectors, v)
}
for _, v := range source.Spec.AfterCollection {
newBundle.Spec.AfterCollection = append(target.Spec.AfterCollection, v)
}