-
Notifications
You must be signed in to change notification settings - Fork 30
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: structured the featureflagconfiguration CRD #207
Conversation
Converted to draft to ensure it's merged at the same time as the flagd component. Ready for review |
950e4a9
to
2af8cc7
Compare
I think this is a big improvement, even if just for the syntax support in editors, but for a lot of other reasons. I will look at this and the referenced PR today. |
Codecov Report
@@ Coverage Diff @@
## main #207 +/- ##
=======================================
Coverage 53.16% 53.16%
=======================================
Files 3 3
Lines 363 363
=======================================
Hits 193 193
Misses 156 156
Partials 14 14
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
f27ab14
to
2cbf4b5
Compare
config/crd/bases/core.openfeature.dev_featureflagconfigurations.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, worked as expected with the workload from the docs: https://raw.githubusercontent.com/open-feature/playground/main/config/k8s/end-to-end.yaml
I'm going to preemptively approve this but I think @beeme1mr is correct that you might need to add $evaluators
to the schema.... Probably just as a schemaless object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ambition to structure the JSON is good but trying to support two version of an API inside a single resource is chaotic. I advise you rework this to v1alphav2
it also means we will need either an upgrade path or a second reconcile loop for that API version.
I also wanted to add that, given we're in an alpha state in terms of Semver, it probably makes sense to make this a breaking change and to not try and support two versions of the API at all. I'd recommend modifying the CRD objectively and not worry about using an |
Thanks for the feedback, I agree that my initial approach was unwise. I've been working on incrementing the version of the CRD in the correct manor, it's not far from completion. |
e1cca45
to
2cc22cb
Compare
Please make sure to update examples and the readme with the new CRD version. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/open-feature/open-feature-operator/pull/207/files#r1018167259
Tested locally... besides this, things seem to be working.
14b9132
to
f81ffa4
Compare
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
…r to allow backwards compatibility Signed-off-by: Skye Gill <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
…ion webhook to v1alpha1 Signed-off-by: Skye Gill <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
…nfiguration CRD Signed-off-by: Skye Gill <gill.skye95@gmail.com>
Signed-off-by: Skye Gill <gill.skye95@gmail.com>
…nd-to-end.yaml. Signed-off-by: Skye Gill <gill.skye95@gmail.com>
f81ffa4
to
e2f73e0
Compare
This PR
Introduces v1alpha2 version of the FeatureFlagConfiguration custom resource definition.
In this version the FeatureFlagSpec field is structured (aside from
variants
andtargeting
, these fields are unstructured objects due to the structure/types being loose), whereas in v1alpha1 the FeatureFlagSpec is a string of json.This is backwards compatible and makes use of the conversion webhook to effectively convert and store any v1alpha2 CRDs as v1alpha1.
Related Issues
Fixes #72
Notes
Follow-up Tasks
How to test