feat: metadata support in the kubernetes_sync#1905
feat: metadata support in the kubernetes_sync#1905Nilushiya wants to merge 7 commits intoopen-feature:mainfrom
Conversation
✅ Deploy Preview for polite-licorice-3db33c canceled.
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Kubernetes synchronization mechanism by ensuring that FeatureFlag metadata is consistently preserved. It achieves this by directly processing Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively adds metadata support for the Kubernetes sync provider by switching to unstructured objects, which prevents metadata from being dropped during marshalling. The changes also harden the sync logic by handling informer tombstones and improving watcher readiness with a buffered channel. The test suite has been significantly improved, with more robust asynchronous testing using proper context management. Overall, this is a solid enhancement. I have one suggestion to improve context handling in a test case for better consistency and correctness.
Signed-off-by: Nilushiya.K <Nilushiya.K@cloudsolutions.com.sa>
Add docs about graceful defaulting. --------- Signed-off-by: Todd Baert <todd.baert@dynatrace.com> Signed-off-by: Nilushiya.K <Nilushiya.K@cloudsolutions.com.sa>
Proposes a "rollout operator". Facilitates linear, progressive rollouts as a fundamental feature flag use case: gradually shifting traffic from one variant to another over time. See ADR for justification and full proposal. See also: - draft implementation **WITH DEMO** in flagd: open-feature#1868 - run demo with: `make build-flagd && ./demo-rollout.sh` - draft schema changes: open-feature/flagd-schemas#205  --------- Signed-off-by: Todd Baert <todd.baert@dynatrace.com> Signed-off-by: Nilushiya.K <Nilushiya.K@cloudsolutions.com.sa>
Update core/pkg/sync/kubernetes/kubernetes_sync_test.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Nilushiya Kaneshalingam <107831659+Nilushiya@users.noreply.github.com> Signed-off-by: Nilushiya.K <Nilushiya.K@cloudsolutions.com.sa>
Signed-off-by: Nilushiya.K <Nilushiya.K@cloudsolutions.com.sa>
|
Hi @toddbaert, @justinabrahms, @beeme1mr, @oxddr, @lukas-reining, @odubajDT, @thisthat, @bacherfl This PR fixes #754 (CRD definition not following the latest flagD specifications). As part of this fix, made the following changes:
The automated FOSSA license scan on this PR is reporting 2 flagged license issues, but the details are behind a 🔒 Maintainer Access Required lock, so I'm unable to view or investigate them from my end. Could a maintainer please:
Note: My changes in this PR do not introduce any new dependencies, so the flagged issues are likely pre-existing in the repo. If the license scan looks good from your side, could you please go ahead and review this PR? I believe the changes are ready for review. Happy to make any adjustments based on your feedback! Thanks. |
|
I added ignore rules for the license issues as CairoSVG is only used as dev tooling and not shipped. |
|
|
Thanks @Nilushiya ! I'll give this a look in the next couple days! |



This PR
spec.flagSpecdirectly from unstructured objects.Related Issues
Fixes # #754 (CRD definition is not following the latest flagD specifications) - in the open-feature-operator
already rased the pr for open-feature-operator CRD support for metaData - (open-feature/open-feature-operator#808 that alone is not enough, so in Flagd also want to change. This PR refers to that.
Notes
Follow-up Tasks
This change keeps the Kubernetes sync path working with metadata by treating FeatureFlag resources as unstructured objects and marshaling spec.flagSpec directly. That avoids converting into typed CRDs (which can drop unknown fields like metadata) and ensures delete tombstones are handled safely, so the synced payload now preserves any metadata the CRD allows.
How to test
cd core && GOPATH=/tmp/go GOCACHE=/tmp/go-build go test ./pkg/sync/kubernetes