You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since ConfigMapList does not contain a name, its not working in target,
but it reports error as , `: must specify the target name
How to do patching in ConfigMapList?
Also for the patch.yaml file,I have used "?" here in this example..but I am not sure what to use to replace it..because it is around 100 different configmaps under items.Should I use wildcard * ?
The text was updated successfully, but these errors were encountered:
I have the exact same question/problem. I need to add an annotation to every item in a list, and the annotation should be different for every environment.
*List resources will be parsed to a list of resources in kustomize instead of a single resource. So there is no ConfigMapList in kustomize but a list of ConfigMap. In target.kind you should use ConfigMap.
JSON patch requires the path except last item does exist. If you want to add a label /metadata/labels/testlabel, /metadata/labels must exist.
If you just want to add labels, you can use LabelTransformer and custom fieldSpec to add labels to a list. doc
I have a yaml file like below.This yaml file needs to be patched with a new label under each configmap.
I want to insert labels under every configmap in this configmaplist as below,
I tried to do this using Kustomize by following https://kubectl.docs.kubernetes.io/pages/app_customization/customizing_arbitrary_fields.html. But its not working.
Here is my file,
overlays/kustomization.yaml
Since ConfigMapList does not contain a name, its not working in target,
but it reports error as , `: must specify the target name
How to do patching in ConfigMapList?
Also for the patch.yaml file,I have used "?" here in this example..but I am not sure what to use to replace it..because it is around 100 different configmaps under items.Should I use wildcard * ?
The text was updated successfully, but these errors were encountered: