Skip to content

Commit

Permalink
fix(environment): add missing environment specific patches TO/FROM
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Haar <[email protected]>
  • Loading branch information
haarchri committed Jan 23, 2024
1 parent ed4e0de commit f22c076
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/migration/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit f22c076

Please sign in to comment.