Skip to content

feat: enable flagd probes - #390

Merged
Kavindu-Dodan merged 3 commits into
open-feature:mainfrom
Kavindu-Dodan:feat/flagd-probes
Mar 16, 2023
Merged

Kavindu-Dodan merged 3 commits into
open-feature:mainfrom
Kavindu-Dodan:feat/flagd-probes

Conversation

@Kavindu-Dodan

@Kavindu-Dodan Kavindu-Dodan commented Mar 14, 2023 •

Copy link
Copy Markdown
Contributor

This PR

Relates to #408

Introduce flagd Liveness and Readiness probes for side-car deployed through OFO. Default is enabled (probes are enabled).

Behavior can be controlled through FlagSourceConfiguration CRD field probesEnabled .

probesEnabled: true, false

How to test

Consider the following FlagSourceConfiguration CRD configurations,

Probes enabled (default),

apiVersion: core.openfeature.dev/v1alpha3
kind: FlagSourceConfiguration
metadata:
  name: myappfs
spec:
  sources:
  - source: flags/flags
    provider: kubernetes

Probes disabled,

apiVersion: core.openfeature.dev/v1alpha3
kind: FlagSourceConfiguration
metadata:
  name: myappfs
spec:
  probesEnabled: false #probes disabled
  sources:
  - source: flags/flags
    provider: kubernetes

Alternatively, it is possible to configure the behavior from OFO Helm deployment. For this, helm value sidecarConfiguration.probesEnabled can be used. This internally maps to OFO manager env var SIDECAR_PROBES_ENABLED.

Helm value based overriding is desired if probes need to be disabled by default and be enabled by overriding through FlagSourceConfiguration CRD definition.

@Kavindu-Dodan Kavindu-Dodan changed the title enable flagd probes feat: enable flagd probes Mar 14, 2023
Signed-off-by: Kavindu Dodanduwa <[email protected]>
@Kavindu-Dodan
Kavindu-Dodan marked this pull request as ready for review March 15, 2023 16:23
@codecov

codecov Bot commented Mar 15, 2023 •

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (main@dd34801). Click here to learn what that means.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #390   +/-   ##
=======================================
  Coverage        ?   71.29%           
=======================================
  Files           ?       11           
  Lines           ?      836           
  Branches        ?        0           
=======================================
  Hits            ?      596           
  Misses          ?      213           
  Partials        ?       27           
Impacted Files Coverage Δ
...pis/core/v1alpha2/flagsourceconfiguration_types.go 100.00% <ø> (ø)
...pis/core/v1alpha3/flagsourceconfiguration_types.go 100.00% <ø> (ø)
...ore/v1alpha2/flagsourceconfiguration_conversion.go 100.00% <100.00%> (ø)
...ore/v1alpha3/flagsourceconfiguration_conversion.go 100.00% <100.00%> (ø)
webhooks/pod_webhook.go 83.93% <100.00%> (ø)
Flag Coverage Δ
component-tests 64.91% <100.00%> (?)
unit-tests 21.05% <18.18%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@beeme1mr

Copy link
Copy Markdown
Member

Hey @Kavindu-Dodan, could you please update the Artifact Hub readme with the new information?

https://github.com/open-feature/open-feature-operator/blob/main/chart/open-feature-operator/README.md#sidecar-configuration

Signed-off-by: Kavindu Dodanduwa <[email protected]>
@Kavindu-Dodan

Copy link
Copy Markdown
Contributor Author

Hey @Kavindu-Dodan, could you please update the Artifact Hub readme with the new information?

https://github.com/open-feature/open-feature-operator/blob/main/chart/open-feature-operator/README.md#sidecar-configuration

Thanks, I updated (along with formatting improvement) the readme. Also, your review helped to validate Helm configurations which I missed :)

@beeme1mr beeme1mr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a feature and documentation perspective. Nice job with the PR description by the way!

@Kavindu-Dodan
Kavindu-Dodan merged commit 41efb15 into open-feature:main Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants