I have a kustomization with patches:
patches:
- target:
kind: PrometheusRule
name: .*-prometheus-recording-rules
version: v1
patch: |-
- op: add
path: /metadata/namespace
value: dev1
- op: add
path: "/spec/groups/*/rules/*/labels/namespace"
value: dev1
I'm trying to create it with different namespace for every develop environment that I'm creating.
This is the error that I get kustomize build failed: add operation does not apply: doc is missing path: "/spec/groups/*/rules/*/labels/namespace": missing value
Is there any option to add patch with wildcards?