openfaas / faas-netes

Serverless Functions For Kubernetes
https://www.openfaas.com
MIT License
2.12k stars 473 forks source link

Labels should be applied to deployment metadata.labels #659

Open brandonkal opened 4 years ago

brandonkal commented 4 years ago

Expected Behaviour

The function controller should copy its spec.labels to the deployment's and service's metadata.labels. Right now it is only copied into spec.template.metadata.labels.

This will help associate the deployment with the Function CR for deployment tools like kapp.

Current Behaviour

spec.labels are only applied to created Pods. This is counter-intuitive.

I can make a PR.

Context

I use kapp to deploy objects to kubernetes. kapp uses labels to track associated resources. Because the Function controller does not apply the desired labels to its children, it

Your Environment

v1.18.3+k3s1 (and it is spelled distribution)

alexellis commented 3 years ago

@brandonkal do you still need this?