-
Notifications
You must be signed in to change notification settings - Fork 58
Make dispatch solo compact with funky knative #635
Conversation
pkg/functions/docker/driver.go
Outdated
@@ -248,7 +248,7 @@ func (d *Driver) findActiveContainer(ctx context.Context, functionID, functionRe | |||
// GetRunnable creates runnable representation of the function | |||
func (d *Driver) GetRunnable(e *functions.FunctionExecution) functions.Runnable { | |||
return func(ctx functions.Context, in interface{}) (interface{}, error) { | |||
bytesIn, _ := json.Marshal(functions.Message{Context: ctx, Payload: in}) | |||
bytesIn, _ := json.Marshal(in) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's this simple. How are secrets passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then how about modify funky, to remove non-necessary field before call python image?
@tenczar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Knative Funky was modified to read the secrets from environment variables. This means that a function gets secrets passed to it at creation time. When a function is invoked, funky reads the secrets from the environment variables and adds them to the context that is passed to the language server.
Berndt is correct that this PR does not completely handle all of the changes necessary to make Dispatch Solo work with the Knative Funky. Function creation needs to be modified to set the secrets as environment variables. These variables need to take the form of |
Also, this would be a GREAT opportunity to add e2e tests for solo (hopefully unmodified from the current e2e tests). |
Do you think we can remove all the code not related to dispatch-solo? |
I'm ok with cleaning up dead code for dispatch-solo, as long as we put it on a separate "solo" branch. |
* Create apply.go * Add apply command in cmd.go, implement applyFunction * Implement applySecret * Implement applyAPI, applyDriver, applyDriverType * Implement applySubscription, applyApplication, applyBaseImage * Implememnt applyImage, applyPolicy, applyServiceAccount, ApplyOrganization * go fmt, TODO apply file by URL, wait create.go * Modify install.go to install docker-registry correctly * Add copyright in apply.go * Remove redundant else
Signed-off-by: Motonori Shindo <motonori@shin.do>
No description provided.