Skip to content

Labels should be applied to deployment metadata.labels #659

Open
@brandonkal

Description

@brandonkal

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

  • What version and distriubtion of Kubernetes are you using? kubectl version

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

  • Operating System and version (e.g. Linux, Windows, MacOS): Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions