flagd/flagd-proxy
renovate[bot] c07ffba554
chore(deps): update module github.com/open-feature/flagd/core to v0.11.8 (#1685)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/open-feature/flagd/core](https://redirect.github.com/open-feature/flagd)
| `v0.11.6` -> `v0.11.8` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fopen-feature%2fflagd%2fcore/v0.11.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fopen-feature%2fflagd%2fcore/v0.11.6/v0.11.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/open-feature/flagd).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsicmVub3ZhdGUiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-16 06:38:56 +00:00
..
cmd fix: Skip flagd banner when non-console logger in use (#1516) 2025-01-17 09:54:50 -05:00
pkg/service feat: add sync_context to SyncFlags (#1642) 2025-07-03 15:36:07 -04:00
tests/loadtest chore(deps): update dependency go to v1.24.1 (#1559) 2025-03-25 14:55:03 -04:00
CHANGELOG.md chore: release main (#1684) 2025-07-15 14:55:40 -04:00
README.md docs(flagd-proxy): removed invalid grpc prefix from uri config 2024-08-02 10:58:00 -04:00
build.Dockerfile chore(deps): update golang docker tag to v1.24 (#1561) 2025-02-13 03:39:57 +00:00
go.mod chore(deps): update module github.com/open-feature/flagd/core to v0.11.8 (#1685) 2025-07-16 06:38:56 +00:00
go.sum chore(deps): update module github.com/open-feature/flagd/core to v0.11.8 (#1685) 2025-07-16 06:38:56 +00:00
main.go fix: Skip flagd banner when non-console logger in use (#1516) 2025-01-17 09:54:50 -05:00

README.md

Kube Flagd Proxy

experimental

The kube flagd proxy acts as a pub sub for deployed flagd sidecar containers to subscribe to change events in FeatureFlag CRs.

On request, the flagd-proxy will spawn a goroutine to watch the CR using the `core` package Kubernetes sync. Each further request for the same resource will add a new stream to the broadcast list. Once all streams have been closed and there are no longer any listeners for a given resource, the sync will be closed.

The flagd-proxy API follows the flagd grpc spec, found in the buf schema registry, as such the existing grpc sync can be used to subscribe to the CR changes.

Deployment

The proxy can be deployed to any namespace, provided that the associated service account has been added to the flagd-kubernetes-sync cluster role binding. A sample deployment can be found in /config/deployments/flagd-proxy requiring the namespace flagd-proxy to be deployed.

kubectl create namespace flagd-proxy
kubectl apply -f ./config/deployments/flagd-proxy

Once the flagd-proxy has been deployed, any flagd instances subscribe to flag changes using the grpc sync, providing the target resource uri using the selector configuration field.

apiVersion: v1
kind: Pod
metadata:
  name: flagd
spec:
  containers:
  - name: flagd
    image: ghcr.io/open-feature/flagd:latest
    ports:
    - containerPort: 8013
    args:
    - start
    - --sources
    - '[{"uri":"flagd-proxy-svc.flagd-proxy.svc.cluster.local:8015","provider":"grpc","selector":"core.openfeature.dev/NAMESPACE/NAME"}]'
    - --debug
---
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlag
metadata:
  name: end-to-end
spec:
  flagSpec:
    flags:
      color:
        state: ENABLED
        variants:
          red: CC0000
          green: 00CC00
          blue: 0000CC
          yellow: yellow
        defaultVariant: yellow

Once deployed, the client flagd instance will receive almost instant flag configuration change events.