flagd/flagd-proxy
renovate[bot] 83bdbb5e7e
fix(deps): update module golang.org/x/net to v0.26.0 (#1337)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| golang.org/x/net | `v0.25.0` -> `v0.26.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.25.0/v0.26.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.25.0/v0.26.0?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 becomes conflicted, 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-feature/flagd).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTMuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-20 19:10:25 +00:00
..
cmd chore: move packaging & isolate service implementations (#1234) 2024-03-05 09:52:06 -08:00
pkg/service chore: move packaging & isolate service implementations (#1234) 2024-03-05 09:52:06 -08:00
tests/loadtest chore: bump go deps to latest (#1307) 2024-05-09 10:43:46 -07:00
CHANGELOG.md chore: release main (#1301) 2024-05-10 08:15:14 -07:00
README.md feat!: support OFO v1beta1 API (#997) 2023-11-14 07:35:45 +01:00
build.Dockerfile chore(deps): update golang docker tag to v1.22 (#1201) 2024-02-13 18:31:23 +00:00
go.mod fix(deps): update module golang.org/x/net to v0.26.0 (#1337) 2024-06-20 19:10:25 +00:00
go.sum fix(deps): update module golang.org/x/net to v0.26.0 (#1337) 2024-06-20 19:10:25 +00:00
main.go feat!: proposal - rename `kube-flagd-proxy` to `flagd-proxy` (#576) 2023-03-30 11:33:23 -04: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 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 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 instance 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":"grpc://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 be receiving almost instant flag configuration change events.