mayadata-io / d-operators

Declarative patterns to write kubernetes controllers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: add common labels to all resources that get created or applied via Recipe

AmitKumarDas opened this issue · comments

ProblemStatement: As a SRE admin, I want to apply common labels across all resources that either get created or applied as Recipe tasks.

Design Draft

kind: Recipe
metadata:
  labels:
    label.recipe.dope.mayadata.io/my-app: common-val
    label.recipe.dope.mayadata.io/my-app-2: common-val-2
spec:
  tasks:
  - create:
    state:
      kind: Pod
      metadata:
      spec:
  - apply:
    state:
      kind: Pod
      metadata:
      spec:
  • Above recipe when applied should create Pods with following labels:
labels:
  my-app: common-val
  my-app2: common-val2

NOTE:

  • Similar enhancements may be done to apply common annotations & finalizers