Skip to content

[FEATURE] Support Health and Readiness Probes in flagd #408

Closed

Description

@beeme1mr

Overview

In production environments, feature flags may be considered a mission critical service that must be available. It's important for flagd to expose a means for Kubernetes to know when the container is ready to perform flag evaluation. Also, needs to be aware if flagd is in an unhealth state so that it can take corrective measures. These settings should be configurable so that a Kubernetes cluster administrator can decide various error conditions should be handled.

Requirements

  • Conduct research on the pros and cons of adding health and readiness probes.
  • Add health and readiness probes to flagd to monitor the state of the services.
  • Update the OpenFeature Operator to automatically configure the health and readiness checks.
  • Document the new behavior and configuration options in the OFO documentation.

Resources

Activity

  1. converted this from a draft issue on Feb 13, 2023
  2. thisthat commented on Feb 18, 2023

    @thisthat
    Member

    I had a look into this topic. We can re-use the HTTP server created for serving Prom metrics for the probes. This simplifies the implementation. Mind that K8s has a basic behavior regarding health probes: when it fails, it restarts the POD. Hence, we should not add any fancy configuration for this.
    For the ready probe, I propose splitting the current ISync interface into two functions: Init(Context) and Sync(Context, chan). This would also make a cleaner implementation for providers such as gRPC.

  3. moved this from Todo to In Progress in ☁ Cloud Nativeon Feb 24, 2023
  4. moved this from In Progress to Needs review in ☁ Cloud Nativeon Mar 15, 2023
  5. Kavindu-Dodan commented on Mar 15, 2023

    @Kavindu-Dodan
    Contributor

    PR [1] completes all requirements, except for the configurability

    Provide configuration options in the OpenFeature Operator to customize the probes.

    Current reconfigurability is on enable/disable behavior (default is enabled). Further, probes will have a initialDelaySeconds set to 5 seconds. Other configurations will be set to default values [2].

    In my view, current implementation is sufficient for the requirements we have right now.

    [1] - open-feature/open-feature-operator#390
    [2] - https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes

  6. moved this from Needs review to Done in ☁ Cloud Nativeon Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions