🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Project sync windows (SyncWindow) in ArgoCD

  • Sync windows are configurable windows of time where syncs will either be blocked or allowed.
  • These are defined by a kind, which can be either allow or deny, a schedule in cron format and a duration along with one or more of either applications, namespaces and clusters.
  • Wildcards are supported.
  • These windows affect the running of both manual and automated syncs but allow an override for manual syncs which is useful if you are only interested in preventing automated syncs or if you need to temporarily override a window to perform a sync.

The windows work in the following way.

  • If there are no windows matching an application then all syncs are allowed.
  • If there are any allow windows matching an application then syncs will only be allowed when there is an active allow windows.
  • If there are any deny windows matching an application then all syncs will be denied when the deny windows are active.
  • If there is an active matching allow and an active matching deny then syncs will be denied as deny windows override allow windows.

The UI and the CLI will both display the state of the sync windows. The UI has a panel which will display different colours depending on the state. The colours are as follows. Red: sync denied, Orange: manual allowed and Green: sync allowed.

How to apply Sync Windows

$ argocd proj windows add devopsschool \
    --kind allow \
    --schedule "0 22 * * *" \
    --duration 1h \
    --applications "*"

Alternatively, they can be created directly in the AppProject manifest:

apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
  name: default
spec:
  syncWindows:
  - kind: allow
    schedule: '10 1 * * *'
    duration: 1h
    applications:
    - '*-prod'
    manualSync: true
  - kind: deny
    schedule: '0 22 * * *'
    duration: 1h
    namespaces:
    - default
   - kind: allow
     schedule: '0 23 * * *'
     duration: 1h
     clusters:
     - in-cluster
     - cluster1

To allow manual syncs using the CLI, UI or directly in the AppProject manifest:
$ argocd proj windows enable-manual-sync PROJECT ID

To disable
$ argocd proj windows disable-manual-sync PROJECT ID

Windows can be listed using the CLI or viewed in the UI:
$ argocd proj windows list PROJECT
Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x