Define labels selector with crds #5564
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
Eschewed features
What would you like to have added?
When we use CRDs in our
base
, if we add some labels selectors in our kustomizationoverlay
, withincludeSelectors: true
, this labels is not reported to the CRDs selector.For example :
base/test/podmonitor.yaml
:overlays/test/kustomization.yaml
:If we build this, my
app.kubernetes.io/name: myname
label is not put in PodMonitorspec/selector/matchLabels
, we need to find a way to configure Kustomize that this is a selector.The documentation about transformerconfig use
commonLabels
to achieve this, butcommonLabels
is deprecated, and I have not find the same things withlabels
.An another way to achieve that is to add
fields
block in all our overlay like this :But this way is to tedious.
Why is this needed?
We must find a way to configure Kustomize to use
labels selector
with CRDs.Can you accomplish the motivating task without this feature, and if so, how?
Use of
fields
inoverlay
is to tediousWhat other solutions have you considered?
Like in description :
commonLabels
: but is it deprecatedfields
in all ouroverlays
: but is it tediousAnything else we should know?
No response
Feature ownership
The text was updated successfully, but these errors were encountered: