Comments (8)
Highly interested as well!
from kustomize.
/kind support
/triage needs-information
from kustomize.
Hi @stormqueen1990 👋
I tested your suggestion and it indeed works - I guess I should have rtfm!
Our GitOps pipeline uses a common set of configs that are referenced when applications are promoted between environments. Having transformer configuration support for labels
would help ease the transition from commonLabels
(and let us utilize the sweet new functionality to ignore selectors 😀).
While a desirable feature, I understand if it is something that cannot be implemented. We can certainly make things work using labels.fields
.
Thanks!
Edit: It currently is not in the manual. Thank you for creating an issue to add it.
from kustomize.
Hi @stormqueen1990 👋
I tested your suggestion and it indeed works - I guess I should have rtfm!
Our GitOps pipeline uses a common set of configs that are referenced when applications are promoted between environments. Having transformer configuration support for
labels
would help ease the transition fromcommonLabels
(and let us utilize the sweet new functionality to ignore selectors 😀).While a desirable feature, I understand if it is something that cannot be implemented. We can certainly make things work using
labels.fields
.Thanks!
Edit: It currently is not in the manual. Thank you for creating an issue to add it.
Nice to know this addresses your use case! I added a note to record this feedback in #5436 (comment), as the deprecation of commonLabels
is being handled through that other issue.
I will be closing this issue but feel free to reopen if needed!
/close
from kustomize.
/assign @stormqueen1990
from kustomize.
Hello there, @ciaccotaco! 👋
The labels
structure in the Kustomization file can optionally take a list of fields to which you would like to apply the labels. I tested it locally and it appears to cover the use case you described in this issue, but would you please give it a try and confirm whether it works for your use case?
The configuration I tested looks similar to the following:
labels:
- includeSelectors: false # or true
includeTemplates: true # or false
pairs:
app: myapp
contact: username
department: kustomize
environment: dv
fields:
- path: spec/podTemplate/metadata/labels
create: true
kind: FlinkDeployment
- path: spec/jobManager/podTemplate/metadata/labels
create: true
kind: FlinkDeployment
- path: spec/taskManager/podTemplate/metadata/labels
create: true
kind: FlinkDeployment
resources:
- resources/flinkdeployment.yaml
Note the absence of the configurations
section in this example.
from kustomize.
/remove-kind feature
from kustomize.
@stormqueen1990: Closing this issue.
In response to this:
Hi @stormqueen1990 👋
I tested your suggestion and it indeed works - I guess I should have rtfm!
Our GitOps pipeline uses a common set of configs that are referenced when applications are promoted between environments. Having transformer configuration support for
labels
would help ease the transition fromcommonLabels
(and let us utilize the sweet new functionality to ignore selectors 😀).While a desirable feature, I understand if it is something that cannot be implemented. We can certainly make things work using
labels.fields
.Thanks!
Edit: It currently is not in the manual. Thank you for creating an issue to add it.
Nice to know this addresses your use case! I added a note to record this feedback in #5436 (comment), as the deprecation of
commonLabels
is being handled through that other issue.I will be closing this issue but feel free to reopen if needed!
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
from kustomize.
Related Issues (20)
- Bases deprecated - multiple resources in kustomization.yaml causes previous to be overwritten HOT 4
- Document the `fields` option for the `labels` built-in transformer HOT 4
- patches cause an error with $patch:delete in files with multiple patches HOT 1
- Documentation site not indexed by search engines HOT 2
- Buil fails when using components and strategic merge patch and null node HOT 2
- kustomize install from binaries with curl no longer working HOT 1
- `kustomize` should leave all ConfigMap values as quoted strings, since no other type is legal. HOT 8
- Allow Helm Chart Overlay Merges HOT 1
- When using ConfigMapGenerator merge as a resource. says "cannot merge or replace" HOT 3
- Installing through install_kustomize.sh is not working from v5.0.1 HOT 2
- Standardized behavior for `kustomize edit` HOT 1
- Define labels selector with crds HOT 1
- Kustomize doesn't pass namespace to helmCharts, resulting in inconsistent output HOT 4
- The latest `5.3.0` kustomize adds two new lines comparing with older `4.4.1` one HOT 10
- Multiple sources and string interpolation for targets in replacements. HOT 2
- Replacement inbetween HOT 1
- replacement in base kustomization missing custom nameSuffix HOT 1
- Failing to apply multiple patches using labelSelector/annotationSelector targeting the same files HOT 2
- Kustomize patches overwritten by namespace HOT 2
- Kustomize replaces null with "null" in case of repetetive component inclusion HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kustomize.