Skip to content

Empty Label Selector does not get propegated to crossplaneΒ #21

@avarei

Description

@avarei

What happened?

when setting an empty labelSelector

extraResources:
  - kind: EnvironmentConfig
    into: envConfs
    apiVersion: apiextensions.crossplane.io/v1alpha1
    type: Selector
    selector:
      maxMatch: 2
      minMatch: 1
      matchLabels: []

does not propagete an empty labelSelector to crossplane. instead omitting it altogether.

empty LabelSelectors imply they should match everything.
from api docs:

A selector to restrict the list of returned objects by their labels. Defaults to everything.

How can we reproduce it?

replace

matchLabels:
  - key: type
    type: Value
    value: cluster

with

matchLabels: []

in example/composition.yaml

What environment did it happen in?

Function version: v0.0.3
Crossplane 1.16.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions