Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Make dispatch solo compact with funky knative #635

Closed
wants to merge 4 commits into from

Conversation

pzmrzy
Copy link
Contributor

@pzmrzy pzmrzy commented Sep 29, 2018

No description provided.

@@ -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)
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

@tenczar
Copy link
Contributor

tenczar commented Oct 1, 2018

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 SECRETS=secret_name_1, secret_name_2, etc. Then each secret value should be another variable labeled d_secret_{secret name}, e.g d_secret_secret_name_1, d_secret_secret_name_2

@berndtj
Copy link
Contributor

berndtj commented Oct 3, 2018

Also, this would be a GREAT opportunity to add e2e tests for solo (hopefully unmodified from the current e2e tests).

@pzmrzy
Copy link
Contributor Author

pzmrzy commented Oct 3, 2018

Do you think we can remove all the code not related to dispatch-solo?

@berndtj
Copy link
Contributor

berndtj commented Oct 5, 2018

I'm ok with cleaning up dead code for dispatch-solo, as long as we put it on a separate "solo" branch.

pzmrzy and others added 3 commits October 12, 2018 10:22
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants