Skip to content

feat: support ignoreDifferences in per-app configuration #794

Description

@sauagarwa

Problem

When a Validated Pattern includes an ArgoCD-managed application that contains an OpenShift BuildConfig, the build controller mutates /status and /spec/triggers after ArgoCD applies the resource. This causes the Application to show OutOfSync permanently — ArgoCD sees drift it can't reconcile.

ArgoCD's standard fix is spec.ignoreDifferences on the Application CR:

spec:
  ignoreDifferences:
    - group: build.openshift.io
      kind: BuildConfig
      jsonPointers:
        - /status
        - /spec/triggers

However, the patterns operator generates Application CRs from values-*.yaml and does not pass through ignoreDifferences from the app configuration.

Current Workaround

Patching the Application CR directly:

oc patch application my-app -n vp-gitops --type merge -p '{
  "spec": {
    "ignoreDifferences": [{
      "group": "build.openshift.io",
      "kind": "BuildConfig",
      "jsonPointers": ["/status", "/spec/triggers"]
    }]
  }
}'

This works immediately but is overwritten when the patterns operator reconciles the Application.

Proposed Solution

Support ignoreDifferences in the per-app configuration in values-*.yaml:

clusterGroup:
  applications:
    my-app:
      name: my-app
      namespace: my-namespace
      path: charts/my-chart
      ignoreDifferences:
        - group: build.openshift.io
          kind: BuildConfig
          jsonPointers:
            - /status
            - /spec/triggers

The patterns operator would include this field when generating the Application CR.

Use Case

The Secure Agent Workspace pattern includes a golden image build pipeline using OpenShift BuildConfig. The BuildConfig is ArgoCD-managed so it's created automatically on fresh installs, but the build controller's mutations cause permanent OutOfSync status.

This affects any pattern that uses BuildConfig, ImageStream, or other resources with controller-managed status fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions