## This PR
**Background**
This is an attempt to move services and wiring logic to their end usage.
For example, having `runtime` package in the core module did not provide
any advantage. This package was only used by `flagd` and contained the
logic that binds configurations to service implementations.
Similarly, `flagd-proxy` exposed `sync` service, and having that inside
the core module seemed out of place.
**What's changed**
I have moved `runtime` package to `flagd` & specific service
implementations (flag evaluation and sync service) to their end usage.
**Why ?**
I considered this to be a pre-requisite for
https://github.com/open-feature/flagd/issues/1230. If I attempted to add
another `sync` implementation to the current core module, it would have
made the whole packaging confusing (ex:- we have two sync proto
implementations, which do not serve the same purpose. One for
flagd-proxy and the other for flagd).
After this refactoring, I could add the flagd's sync service, where it
serve buf connect and I can locate that within flagd.
Besides, we still have a core module with all the sharables.
Consider the current packaging in the below diagram,

* nore - core sync is for flag data sync listeners such as files, K8s
...
Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Remove deprecated flags in flagd and flagd-proxy. Slight clean up of the
code by removing `getPortValueOrDefault`. Setting the default value in
the definition of the flag accomplishes the same thing.
Signed-off-by: Craig Pastro <craig.pastro@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
This PR refactors the core package by restructuring the components
responsible for managing the subscriptions, as well as the creation of
sync sources. The following changes have been made:
- Renamed `sync-store` package to `subscriptions`. This has been done to
avoid confusion because we already have a `sync`, and a `store`.
package. Within the package, the `SyncStore`. has been renamed to
`subscriptions.Manager`, which should reflect its responsibility in a
better way. Also, the `syncHandler` has been renamed to `multiplexer`,
as this one is responsible for sending updates of a certain target to
all subscribers - `syncHandler` was a bit too generic in my opinion.
- Moved the `GetSyncSourceFromURI` method to a new package,
`sync/builder`, to remove the responsibility of building concrete sync
sources from the subscription manager
- Moved the logic of retrieving the K8s client config to the sync
builder. Previously, this was done in the `runtime` package by calling
the respective methods for the config retrieval provided by the
`sync/kubernetes` package and then handing that config back to the
initialization of the `K8sSync`. Note: This step can potentially be done
in a separate PR, if so desired.
---------
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->
## This PR
<!-- add the description of the PR here -->
- decouples the sync store from sync server startup, allowing for
alternative sync store implementations to be introduced
### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->
### Notes
<!-- any additional notes for this PR -->
### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->
### How to test
<!-- if applicable, add testing instructions under this section -->
---------
Signed-off-by: James Milligan <james@omnant.co.uk>
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->
## This PR
<!-- add the description of the PR here -->
- renames package `kube-flagd-proxy` to `flagd-proxy`
- updates all references of `kube-flagd-proxy` to `flagd-proxy`
### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->
https://github.com/open-feature/open-feature-operator/pull/412#discussion_r1151133259
### Notes
<!-- any additional notes for this PR -->
### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->
### How to test
<!-- if applicable, add testing instructions under this section -->
---------
Signed-off-by: James Milligan <james@omnant.co.uk>