open-feature / open-feature-operator

A Kubernetes feature flag operator
https://openfeature.dev
Apache License 2.0
164 stars 33 forks source link

FlagD interval field #617

Closed udsprasad closed 1 month ago

udsprasad commented 2 months ago

Hi Team,

we got a requirement where we need to modify the polling frequency from flagD to featureflag by using http provider. When we investigated in flagD documentation(https://flagd.dev/reference/sync-configuration/#source-configuration), we find the interval feild to modify the frequency as show in below screenshot.

image

does Openfeature operator supports interval field to configure the flagD? So, that I can configure the interval based on our requirement.

Kavindu-Dodan commented 2 months ago

@udsprasad thank you for bringing this up.

I checked the implementation and unfortunately we have not yet updated the Operator to support the Interval parameter [1].

The current default configuration is to use 5-second delay between http syncs.

[1] - https://github.com/open-feature/open-feature-operator/blob/apis/v0.2.39/apis/core/v1beta1/featureflagsource_types.go#L114-L141

dabump commented 2 months ago

@Kavindu-Dodan - I want to help adding it in. First is adding into the Source struct for API (https://github.com/open-feature/open-feature-operator/pull/619)

And then once API built / tagged, can add it into the injector mapping..seems simple? Not too sure of the building sequence, so hopefully i'm approaching this correctly

Kavindu-Dodan commented 2 months ago

@dabump great, thanks for the contribution 👍

Yeah, the order is correct. First API change, release of the API and then you can release the Operator updated with the API.

Kavindu-Dodan commented 2 months ago

@dabump we released the new API with interval support - https://github.com/open-feature/open-feature-operator/releases/tag/apis%2Fv0.2.40

You should be able to continue with the next step of adding this to Operator.

dabump commented 2 months ago

Thank you @Kavindu-Dodan - I've added the second PR to address the injector mapping. Hopefully all correctly done. Let me know if there is anything missing / needs to be added that I missed

Here is the PR: https://github.com/open-feature/open-feature-operator/pull/621

Again, thanks for the awesome work you guys been doing!

Kavindu-Dodan commented 1 month ago

Fixed by https://github.com/open-feature/open-feature-operator/pull/621