From f22c0762f4dfcfa8b3941441f5079f6850c42bf8 Mon Sep 17 00:00:00 2001 From: Christopher Haar Date: Tue, 23 Jan 2024 11:44:04 +0100 Subject: [PATCH] fix(environment): add missing environment specific patches TO/FROM Signed-off-by: Christopher Haar --- pkg/migration/converter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/migration/converter.go b/pkg/migration/converter.go index d137e21f..beb71296 100644 --- a/pkg/migration/converter.go +++ b/pkg/migration/converter.go @@ -268,7 +268,7 @@ func ConvertComposedTemplatePatchesMap(sourceTemplate xpv1.ComposedTemplate, con var patchesToAdd []xpv1.Patch for _, p := range sourceTemplate.Patches { switch p.Type { //nolint:exhaustive - case xpv1.PatchTypeFromCompositeFieldPath, xpv1.PatchTypeCombineFromComposite, "": + case xpv1.PatchTypeFromCompositeFieldPath, xpv1.PatchTypeCombineFromComposite, xpv1.PatchTypeFromEnvironmentFieldPath, xpv1.PatchTypeCombineFromEnvironment, "": { if p.ToFieldPath != nil { if to, ok := conversionMap[*p.ToFieldPath]; ok { @@ -283,7 +283,7 @@ func ConvertComposedTemplatePatchesMap(sourceTemplate xpv1.ComposedTemplate, con } } } - case xpv1.PatchTypeToCompositeFieldPath, xpv1.PatchTypeCombineToComposite: + case xpv1.PatchTypeToCompositeFieldPath, xpv1.PatchTypeCombineToComposite, xpv1.PatchTypeToEnvironmentFieldPath, xpv1.PatchTypeCombineToEnvironment: { if p.FromFieldPath != nil { if to, ok := conversionMap[*p.FromFieldPath]; ok {