github.com/argoproj/argo-events@v1.9.1/docs/eventsources/calendar-catch-up.md (about)

     1  # Calender EventSource Catch Up
     2  
     3  Catch-up feature allow Calender eventsources to execute the missed schedules
     4  from last run.
     5  
     6  ## Enable Catch-up for Calendar EventSource
     7  
     8  User can configure catch up on each events in eventsource.
     9  
    10  ```yaml
    11  apiVersion: argoproj.io/v1alpha1
    12  kind: EventSource
    13  metadata:
    14    name: calendar
    15  spec:
    16    template:
    17      serviceAccountName: configmap-sa # assign a service account with read, write permissions on configmaps
    18    calendar:
    19      example-with-catch-up:
    20        # Catchup the missed events from last Event timestamp. last event will be persisted in configmap.
    21        schedule: "* * * * *"
    22        persistence:
    23          catchup:
    24            enabled: true # Check missed schedules from last persisted event time on every start
    25            maxDuration: 5m # maximum amount of duration go back for the catch-up
    26          configMap: # Configmap for persist the last successful event timestamp
    27            createIfNotExist: true
    28            name: test-configmap
    29  ```
    30  
    31  Last calender event persisted in configured configmap. Same configmap can be
    32  used by multiple events configuration.
    33  
    34  ```yaml
    35  data:
    36    calendar.example-with-catch-up:
    37      '{"eventTime":"2020-10-19 22:50:00.0003192 +0000 UTC m=+683.567066901"}'
    38  ```
    39  
    40  ### Service Account
    41  
    42  To make Calendar EventSource catch-up work, a Service Account with proper RBAC
    43  settings needs to be provided.
    44  
    45  If the configMap is not existing, and `createIfNotExist: true` is set, a Service
    46  Account bound with following `Role` is required.
    47  
    48  ```yaml
    49  apiVersion: rbac.authorization.k8s.io/v1
    50  kind: Role
    51  metadata:
    52    name: example-configmap-access-role
    53  rules:
    54    - apiGroups:
    55        - ""
    56      resources:
    57        - configmaps
    58      verbs:
    59        - get
    60        - create
    61        - update
    62  ```
    63  
    64  If the configmap is already existing, `create` can be removed from the `verbs`
    65  list.
    66  
    67  ## Disable the catchup
    68  
    69  Set `false` to catchup-->enabled element
    70  
    71  ```yaml
    72  catchup:
    73    enabled: false
    74  ```