mayadata-io / mayadata-io/d-operators

recipe driven actions

Open
#2 1 comment 0 reactions 2 assignees View on GitHub

@ksatchit is already working on this.

Since Feb 25, 2020.

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

Description

Thoughts 0
  • kind Menu
    • Menu will be a K8s CR with a backing controller
    • Menu can list the Recipes that needs to be run
    • Menu can enable or disable one or more Recipe(s)
    • Menu is equivalent to test suite in testing world
    • NOTE: Menu is not necessarily tied to testing
  • kind Recipe
    • Recipe will be a K8s CR with a backing controller
    • Recipe will consist of various actions that needs to be run
    • Recipe is equivalent to test case in testing world
    • NOTE: Recipe is not necessarily tied to testing
  • Action
    • Action is not a K8s CR
    • An action can be any operation against a K8s resource
    • An action can be either of following:
      • create, apply, delete, assert, teardown, & more
    • When action is not backed by a K8s resource, we can have a jsonnet action
    • A jsonnet action can be an entire k8s controller in itself (refer MetaController)
    • NOTE: jsonnet action should solve the basic programming constructs only
    • NOTE: We should move from jsonnet action to specific K8s CustomResource eventually
  • kind RecipeItem
    • RecipeItem will be a K8s CR without a backing controller
    • RecipeItem can consist of one or more Actions
    • RecipeItem can be referred to by one or more Recipe
    • RecipeItem will not have a backing controller
  • kind RecipeValue
    • RecipeValue will be a K8s CR without a backing controller
    • RecipeValue can hold user values that can be used by jsonnet actions
    • RecipeValue can be used to store runtime values while executing jsonnet actions
    • RecipeValue can be used as a config to Recipe
  • Assumptions
    • Pure declarative approach
    • No use of templating
    • No use of smart programming syntax
    • Use jsonnet i.e. (json that can embed code) when need for syntax arises
    • Actions of a Recipe can be run in parallel or serial
    • Use additional CR(s) & their backing controllers to make Recipe(s) easy
  • Advantage:
    • Declarative intents should help in reducing the effort to build Recipes
    • No bash in yaml
    • No code in yaml
    • One can build a e2e test case in few minutes
    • One can build a install platform in few minutes
References

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.