Fixing out of sync warning in Argo CD - Unable to ignore the optional `preserveUnknownFields` field

24.4k views Asked by At

Argo CD shows two items from linkerd (installed by Helm) are being out of sync. The warnings are caused by the optional preserveUnknownFields: false in the spec section:

trafficsplits.split.smi-spec.io enter image description here

enter image description here

serviceprofiles.linkerd.io

enter image description here

enter image description here

But I'm not able to figure out how to ignore the difference using ignoreDifferences in the Application manifest. The /spec/preserveUnknownFields json path isn't working. Is it because the field preserveUnknownFields is not present in the left version?


apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: linkerd
  namespace: argocd
spec:
  destination:
    namespace: linkerd
    server: https://kubernetes.default.svc
  project: default
  source:
    chart: linkerd2
    repoURL: https://helm.linkerd.io/stable
    targetRevision: 2.10.1
 syncPolicy:
    automated: {}
  ignoreDifferences:
     - group: apiextensions.k8s.io/v1
       name: trafficsplits.split.smi-spec.io
       kind: CustomResourceDefinition
       jsonPointers:
         - /spec/preserveUnknownFields
     - group: apiextensions.k8s.io/v1
       name: trafficsplits.split.smi-spec.io
       kind: CustomResourceDefinition
       jsonPointers:
         - /spec/preserveUnknownFields
1

There are 1 answers

0
vikas027 On BEST ANSWER

As per documentation, I think you have to use apiextensions.k8s.io not apiextensions.k8s.io/v1.