-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for labels in func.yaml #373
Conversation
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.
Looking good, minor nit: do we want to validate the specified labels in the func.yaml
or do we want to keep the validation on the actual deployment process via Knative?
Documentation is missing for this field.
|
What kind of validation are you thinking of? |
For us, I suppose the |
Just a check that the input value is a valid k8s label, as per: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set But that's just a question, if we don't do the check it will fail during the deployment anyway. |
I just want to give users way how to remove a label, because the current solution allows only adding/updating labels, not removing (they would have to undeploy and deploy the function again in order to get rid of labels that were specified before). I am not sure that the flag is the best solution, but what else do we have? 🤷♂️ |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lance, lkingland The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I've updated this so that it's integrated with the interactive prompt that Zbynek recently introduced, and I have added tests. I think it should be ready for review. PTAL |
why is |
OK - one more time @lkingland @zroubalik and @matejvasek - sorry this has been so long in the making. I think finally it's good for a final review. |
/lgtm |
@lance a recent PR fixes the Makefile such that |
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.
Lookin good, just a minor nit
This change adds support for setting labels on deployed functions. It uses the interactive CLI prompt introduced by Zbynek to add, remove and list labels applied on a deployed function. Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
/lgtm |
This change adds support for setting labels on deployed functions via
func.yaml
. The CLI will assume thatfunc.yaml
is the definitive source of information about what labels should exist on the deployed Service, and each deploy ensures that the labels in the deployed Service and what's infunc.yaml
are in sync.Fixes: #261
Signed-off-by: Lance Ball lball@redhat.com