mayadata-io / d-operators

Declarative patterns to write kubernetes controllers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: apply one or more resources against a group of nodes

AmitKumarDas opened this issue · comments

ProblemStatement: As a SRE admin, I want to apply resource(s) of a given Kind against a group of nodes based on node selector / labels. For example, I want to run a Pod each on Nodes N1, N2 & N3.

Draft Design

kind: Recipe
spec:
  tasks:
  - applyNodeGroup:
    nodeSelector:
      key: value
    state:
      kind: Pod
      metadata:
        name:
        namespace:
      spec:

NOTE

  • Considering running a Pod across a group of Nodes
    • When a new node gets added a new Pod should run on that Node
    • When an existing node is removed from the label selector group, corresponding Pod should be deleted
    • When no node matches the label selector group, no Pods should be created
  • Actions createNodeGroup & deleteNodeGroup may need to be implemented separately from applyNodeGroup action