Skip to content

Commit

Permalink
Merge pull request #332 from haarchri/fix/environment-patches
Browse files Browse the repository at this point in the history
fix(environment): add missing environment specific patches TO/FROM
  • Loading branch information
ulucinar authored Jan 29, 2024
2 parents c8c49ae + f22c076 commit f34335a
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 f34335a

Please sign in to comment.