kubeslice / worker-operator

Kubeslice Worker Operator Opensource Repository: The KubeSlice Worker Operator is a Kubernetes operator that manages the lifecycle of KubeSlice worker clusters.
Apache License 2.0
58 stars 19 forks source link

Add feature flag support #293

Closed Rahul-D78 closed 9 months ago

Rahul-D78 commented 10 months ago

Feature flags, also known as feature toggles, are a critical feature for managing feature releases and controlling the activation or deactivation of specific functionalities. This feature will provide greater flexibility, control, and safety in our deployment and release processes.

Implementation Options:

There are multiple ways to implement feature flags such as:

opts := zap.Options{
  Development: true,
}
opts.BindFlags(flag.CommandLine)

// combine both flagsets and parse them
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
features.OperatorFeatureGate.AddFlag(pflag.CommandLine)
pflag.Parse()

This way, the feature flags can be configured runtime via flags in managers deployment manifest.

 containers:
  - command:
    - /manager
    args:
    - --leader-elect
    - --feature-gates=FeatureName=true
    - --feature-gates=FeatureName=false
Rahul-D78 commented 9 months ago

Not required