Skip to content

Commit

Permalink
Fix apache#557: fix generated images
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro authored and valdar committed May 21, 2019
1 parent 3b70783 commit a22eb93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/controller/integrationcontext/initialize.go
Expand Up @@ -57,6 +57,12 @@ func (action *initializeAction) Handle(ctx context.Context, ictx *v1alpha1.Integ
return err
}

// Updating the whole integration context as it may have changed
action.L.Info("Updating IntegrationContext")
if err := action.client.Update(ctx, target); err != nil {
return err
}

if target.Spec.Image == "" {
// by default the context should be build
target.Status.Phase = v1alpha1.IntegrationContextPhaseBuildSubmitted
Expand All @@ -76,6 +82,5 @@ func (action *initializeAction) Handle(ctx context.Context, ictx *v1alpha1.Integ
target.Status.Digest = dgst

action.L.Info("IntegrationContext state transition", "phase", target.Status.Phase)

return action.client.Status().Update(ctx, target)
}
2 changes: 2 additions & 0 deletions pkg/platform/images/images.go
Expand Up @@ -39,6 +39,8 @@ var StandardDependencies = map[string]bool{
"camel:core": true,
"runtime:jvm": true,
"runtime:yaml": true,
"mvn:org.apache.camel.k:camel-k-adapter-camel-2:" + defaults.RuntimeVersion: true,
"camel:camel-netty4-http": true,
}

// LookupPredefinedImage is used to find a suitable predefined image if available
Expand Down

0 comments on commit a22eb93

Please sign in to comment.