Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-5430

Declarative configs for enable/disable auto-sync on Applications

XMLWordPrintable

    • Declarative configs for enable/disable auto-sync on Applications
    • False
    • Hide

      None

      Show
      None
    • False
    • Done
    • SECFLOWOTL-195 - RFEs 1.15, 1.16
    • 0% To Do, 0% In Progress, 100% Done
    • Hide
      This feature adds a boolean field named enable in Spec.SyncPolicy.Automated for explicitly enabling or disabling automatedSync. It gives users more control over the auto-sync behavior directly from the Application creation and summary panels instead of relying instead of relying solely on the presence or absence of the automated sync policy.
      Key Improvements
      New enabled checkbox added to the Application Create panel and Application Summary view:
              - Enables or disables auto-sync behavior independently from prune
      and selfHeal.
              - When true, auto-sync is enabled (default behavior).
              - When false, auto-sync is explicitly disabled even if the automated block exists.
               - Defaults to true for backward compatibility.
      Improved UX: Users now have a dedicated control to turn auto-sync on or off, instead of relying solely on the presence or absence of the automated block.
      spec:
        syncPolicy:
          automated:
            enabled: true
      NOTE: If enabled is not set, auto-sync is treated as enabled (to maintain current behavior).

      Here’s a quick YAML example showing how to configure the new enabled boolean field in an Argo CD Application resource:
      ```
      apiVersion: argoproj.io/v1alpha1
      kind: Application
      metadata:
        name: my-app
        namespace: argocd
      spec:
        project: default
        source:
          repoURL: https://github.com/my-org/my-app.git
          targetRevision: HEAD
          path: manifests
        destination:
          server: https://kubernetes.default.svc
          namespace: my-app-namespace
        syncPolicy:
          automated:
            enabled: false # 👈 This explicitly disables auto-sync
            prune: true
            selfHeal: true
            
      ```
      on the UI when creating apps
      Show
      This feature adds a boolean field named enable in Spec.SyncPolicy.Automated for explicitly enabling or disabling automatedSync. It gives users more control over the auto-sync behavior directly from the Application creation and summary panels instead of relying instead of relying solely on the presence or absence of the automated sync policy. Key Improvements New enabled checkbox added to the Application Create panel and Application Summary view:         - Enables or disables auto-sync behavior independently from prune and selfHeal.         - When true, auto-sync is enabled (default behavior).         - When false, auto-sync is explicitly disabled even if the automated block exists.          - Defaults to true for backward compatibility. Improved UX: Users now have a dedicated control to turn auto-sync on or off, instead of relying solely on the presence or absence of the automated block. spec:   syncPolicy:     automated:       enabled: true NOTE: If enabled is not set, auto-sync is treated as enabled (to maintain current behavior). Here’s a quick YAML example showing how to configure the new enabled boolean field in an Argo CD Application resource: ``` apiVersion: argoproj.io/v1alpha1 kind: Application metadata:   name: my-app   namespace: argocd spec:   project: default   source:     repoURL: https://github.com/my-org/my-app.git     targetRevision: HEAD     path: manifests   destination:     server: https://kubernetes.default.svc     namespace: my-app-namespace   syncPolicy:     automated:       enabled: false # 👈 This explicitly disables auto-sync       prune: true       selfHeal: true        ``` on the UI when creating apps

      Epic Goal

      Introduce a declarative way to enable or disable auto-sync on Applications

      Why is this important?

      The current configuration relies on absence of a field which is not declarative and creates issues in the app-of-apps pattern.

      Acceptance Criteria (Mandatory)

      • CI - MUST be running successfully with tests automated
      • Release Technical Enablement - Provide necessary release enablement details and documents.
      • A boolean field exists in Application CRD for enabling or disabling auto-sync
      • The enable/disable field should by default be set to true, to enable auto-sync by default

      Dependencies (internal and external)

      TBD

      Previous Work (Optional):

      TBD

      Open questions::

      TBD

      Done Checklist

      • Acceptance criteria are met
      • Non-functional properties of the Feature have been validated (such as performance, resource, UX, security or privacy aspects)
      • User Journey automation is delivered
      • Support and SRE teams are provided with enough skills to support the feature in production environment

              rh-ee-ansingh Anand Singh
              rh-ee-ssadeghi Siamak Sadeghianfar
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: