This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Add labels to the containers from the function spec #19
Labels
Comments
I'll take this up |
@alexellis Sir do we also want to put the labels from the types.FunctionDeployment by default in addition to the custom ones we apply from the cli flag? |
It'd be anything that is in the struct received over HTTP |
utsavanand2
added a commit
to utsavanand2/faas-containerd
that referenced
this issue
Jan 8, 2020
This PR adds support for adding labels to OpenFaas functions ruuning on containerd with faas-cli closes alexellis#19 Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
utsavanand2
added a commit
to utsavanand2/faas-containerd
that referenced
this issue
Jan 10, 2020
This option enables to add a label to containers from the function spec. e.g., `faas-cli store deploy figlet --label has=label` Closes alexellis#19 Signed-off-by: Utsav Anand <utsavanand2@gmail.com>
@utsavanand2 I think your PR should be a little easier now that we have merged changes for #20, here's an example of the test command, right now the labels are ignored, after your PR, they should show up here. cc @carlosedp
|
@utsavanand2 I'd look here: https://godoc.org/github.com/containerd/containerd#WithContainerLabels and here: faas-containerd/handlers/deploy.go Line 86 in 4aba016
:) |
Thanks for the help @alexellis and @carlosedp !! 😄 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add labels to the containers from the function spec
Expected Behaviour
If you create a function with a label, that label should be added to the container definition, then read back later in the list endpoint.
Current Behaviour
They are ignored
Possible Solution
I'm OK if we only store the label and don't read it back for the first PR.
Update https://github.com/alexellis/faas-containerd/blob/master/handlers/update.go and https://github.com/alexellis/faas-containerd/blob/master/handlers/deploy.go
The
types.FunctionDeployment
struct already contains labels.Steps to Reproduce (for bugs)
faas-cli store deploy figlet --label has=label
faas-cli describe figlet
The above on faas-netes / K8s will show the labels, on faas-containerd it won't
The text was updated successfully, but these errors were encountered: