Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkg/knative/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ func (d *Deployer) Deploy(ctx context.Context, f fn.Function) (fn.DeploymentResu
return fn.DeploymentResult{}, fmt.Errorf("deployer requires either a target namespace or that the function be already deployed")
}

// Choosing an image to deploy:
// If the service has not been deployed before, but there exists a
// build image, this build image should be used for the deploy.
// TODO: test/consdier the case where it HAS been deployed, and the
// build image has been updated /since/ deployment: do we need a
// timestamp? Incrementation?
if f.Deploy.Image == "" {
f.Deploy.Image = f.Build.Image
}

// Clients
client, err := NewServingClient(namespace)
if err != nil {
Expand Down
Loading