Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load generic controllers based on their labels #124

Open
AmitKumarDas opened this issue Apr 8, 2020 · 0 comments
Open

load generic controllers based on their labels #124

AmitKumarDas opened this issue Apr 8, 2020 · 0 comments
Labels
config enhancement New feature or request gctl Generic Controller

Comments

@AmitKumarDas
Copy link
Owner

AmitKumarDas commented Apr 8, 2020

ProblemStatement: As a DevOps admin I run my controllers as a single binary that makes use of GenericController(s) loaded from metac config file. I want metac to load generic controllers with specific labels & ignore loading of other generic controllers.

PossibleSolution:
Use of predefined label keys such as

  • metac.openebs.io/feature-gate
    • label will be set by DevOps admin
    • label value can either be alpha, beta or release
    • If this label is not set then corresponding controller defaults to release feature-gate
  • tag.metac.openebs.io/<tag-name>
    • label will be set by DevOps admin
    • tag-name will be provided by DevOps admin
    • label value can either be enabled or disabled
kind: GenericController
metadata:
  name: my-controller
  labels:
    # if following label is missing then the GenericController 
    # will be considered as release grade
    metac.openebs.io/feature-gate: alpha # beta & release are other valid values
---
kind: GenericController
metadata:
  name: my-controller
  labels:
    metac.openebs.io/feature-gate: beta
    tag.metac.openebs.io/my-tag-2: enabled 
---
kind: GenericController
metadata:
  name: my-controller
  labels:
    metac.openebs.io/feature-gate: beta
    tag.metac.openebs.io/my-tag-1: enabled 
containers:
- name: my-metac
  image: localhost:5000/my-metac:latest
  command: ["/my-metac"]
  args:
  - --allowed-feature-gate=beta # controllers with either beta or release gate will be loaded
  - --allowed-tags=my-tag-1, my-tag-1 # controllers with these tags will be loaded
  - --logtostderr
  - --run-as-local
  - --workers-count=1 # number of workers per controller
  - --discovery-interval=40s
  - --cache-flush-interval=240s # re-sync interval
  - -v=5
@AmitKumarDas AmitKumarDas added config enhancement New feature or request gctl Generic Controller labels Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config enhancement New feature or request gctl Generic Controller
Projects
None yet
Development

No branches or pull requests

1 participant