github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/aagent/watchers/machineswatcher/manager/machine.yaml (about)

     1  name: machine_manager
     2  version: 0.0.2
     3  initial_state: INITIAL
     4  
     5  # States
     6  #
     7  #   INITIAL     - Initial KV poll
     8  #   MANAGE      - Manages machines, poll data
     9  #   MAINTENANCE - Nothing happens
    10  
    11  transitions:
    12    - name: enter_maintenance
    13      from: [ MANAGE ]
    14      destination: MAINTENANCE
    15  
    16    - name: resume
    17      from: [ MAINTENANCE ]
    18      destination: MANAGE
    19  
    20    - name: to_manage
    21      from: [ INITIAL ]
    22      destination: MANAGE
    23  
    24  watchers:
    25    - name: initial_specification
    26      type: kv
    27      interval: 1m
    28      state_match: [ INITIAL ]
    29      success_transition: to_manage
    30      properties:
    31        bucket: MACHINES
    32        key: spec
    33        mode: poll
    34        bucket_prefix: false
    35        on_successful_get: true
    36  
    37    - name: specification
    38      type: kv
    39      interval: 5m
    40      state_match: [ MANAGE ]
    41      properties:
    42        bucket: MACHINES
    43        key: spec
    44        mode: poll
    45        bucket_prefix: false
    46  
    47    - name: manage_machines
    48      state_match: [ MANAGE ]
    49      type: machines
    50      interval: 6m
    51      properties:
    52        data_item: spec
    53        purge_unknown: true
    54        machine_manage_interval: 5m