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

feat: enable flagd probes #390

Merged
merged 3 commits into from
Mar 16, 2023

Conversation

Kavindu-Dodan
Copy link
Contributor

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

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 <kavindudodanduwa@gmail.com>
@codecov
Copy link

codecov bot commented Mar 15, 2023

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
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 <kavindudodanduwa@gmail.com>
@Kavindu-Dodan
Copy link
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 :)

Copy link
Member

@beeme1mr beeme1mr left a comment

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