mayadata-io / mayadata-io/d-operators

kind: Run as a controller to manage execution of tasks

Open
#9 2 comments 0 reactions 2 assignees View on GitHub

@ksatchit is already working on this.

Since Mar 15, 2020.

run suite
Dominant language
Go
Stars
10
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Problem Statement: I would like to have a simple declarative way to manage execution of various Kubernetes resources (native as well as custom).

kind: Run
spec:
  onError:
    retry:
      times: # some int value
      interval: # some timeperiod e.g. 2 secs, 1 min, etc
    abort: # if true will not retry
  tasks:
  - desc: # description of this task
    id: # some id given to this task, must be unique in this Run resource

    # state can be used to create / apply it in the cluster
    # state along with delete field can be used to delete the state from cluster
    # state can embed an entire K8s resource _(native or custom)_
    state: # map[string]interface{}

    # select one or more resources & execute assert or delete action
    # can use either `state` or `select` to execute assert or delete action
    # both state & select can not be used together
    select:

    # assert acts as an action similar to create, delete, etc
    # assert acts as a condition when used along with create, delete, etc
    # assert can be used with select to filter resource & run assertion
    assert:
    - refTask: # taskid; assert is based on this task; optional
      key: # json paths, etc. optional
      operator: # Equals, NotEquals, EqualsCount
      value: # string or int value

    replicas: # when more than one states need to be maintained/created

    delete: # optional; delete can also get triggered if state.spec is set to nil
      operator: # RandomCount, etc.
      value: # any string or int value

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.