Is it possible to replace this
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: elastic-operator
labels:
argocd.application.type: "system"
spec:
ignoreDifferences:
- group: admissionregistration.k8s.io
kind: ValidatingWebhookConfiguration
jsonPointers:
- /webhooks/0/clientConfig/caBundle
- group: admissionregistration.k8s.io
kind: ValidatingWebhookConfiguration
jsonPointers:
- /webhooks/1/clientConfig/caBundle
- group: admissionregistration.k8s.io
kind: ValidatingWebhookConfiguration
jsonPointers:
- /webhooks/2/clientConfig/caBundle
For something that uses a "wildcard" instead? The following is a "non-working" example of what I'm looking for:
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: elastic-operator
labels:
argocd.application.type: "system"
spec:
ignoreDifferences:
- group: admissionregistration.k8s.io
kind: ValidatingWebhookConfiguration
jsonPointers:
- /webhooks/[*]/clientConfig/caBundle
I wasn't able to find anything in their doc that said that this is possible nor the opposite. i.e.https://argoproj.github.io/argo-cd/user-guide/diffing/ It seems that "json-patch" is being used but reading some of the RFCs, I was not able to find anything about wildcards either.
Thank you!
Just in case someone else faces this. The answer is no, json patch does not allow to use that expression. Luckly, newer versions of argocd enable the usage of json path (!=patch) by the new "jqPathExpressions":
data:
resource.customizations: |
admissionregistration.k8s.io/MutatingWebhookConfiguration:
ignoreDifferences: |
jqPathExpressions:
- '.webhooks[]?.clientConfig.caBundle'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With