#1199·Reloader

[ENHANCE] Sync Windows annotation

Author: BreeeCreated Aug 5, 2026Updated Aug 5, 2026
Labelskind/enhancement

Is your feature request related to a problem? Please describe.

  • When using GitOps tools like argocd you sometimes have applications with sync windows, e.g. only sync in the night from 21:00-22:00, see ArgoCD syncwindows
  • Stakater currently just restarts the deployments whenever it sees changes. (modulo the pause operator, but thats not helpful here)

Describe the solution you'd like Add a new annotation reloader.stakater.com/sync-windows:

yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: app
  namespace: hk-test
spec:
  replicas: 2
  selector:
    matchLabels:
      app: app
  template:
    metadata:
      labels:
        app: app
      annotations:
        # Reloader restarts this Deployment as soon as app-secret changes.
        secret.reloader.stakater.com/reload: "app-secret"
        reloader.stakater.com/sync-windows: |
          - kind: allow
            schedule: "0 2 * * *"
            duration: 1h
            timeZone: Europe/Berlin
          - kind: deny
            schedule: "0 22 * * *"
            duration: 2h
    spec:
      containers:
        - name: app
          image: nginx:1.29
          envFrom:
            - secretRef:
                name: app-secret

Describe alternatives you've considered

  • Building my own operator for gitops/declarative restarting (i.e. using crds with selectors and syncpolicies)
  • Using a cheap K8S cronjob that patches deployments if the argocd sync window is active / commits an annotation to git