Commit Graph

15 Commits

Author SHA1 Message Date
lea konvalinka e8fd680860
feat: Add toggle for disabling getMetadata request (#1693)
<!-- 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 -->

- adds a toggle `disable-sync-metadata` for the Sync Service to disable
or enable the deprecated `getMetadata` request

### Related Issues
[#1688 [FEATURE] Temporary Context Enrichment
toggle](https://github.com/open-feature/flagd/issues/1688)

---------

Signed-off-by: Konvalinka <lea.konvalinka@dynatrace.com>
2025-07-28 15:33:31 +02:00
alexandraoberaigner b70fa06b66
feat: add server-side deadline to sync service (#1638)
<!-- 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 -->

- adds server side deadline for sync and event streams configurable via
cmd argument `--stream-deadline`

### Related Issues

#1582

### Notes
<!-- any additional notes for this PR -->


### How to test

1. Run flagd with `--stream-deadline 3s` // 3s can be replaced with any
duration the deadline should have
2. Test Event Stream deadline: run `grpcurl -v --proto
schemas/protobuf/flagd/evaluation/v1/evaluation.proto -plaintext
localhost:8013 flagd.evaluation.v1.Service/EventStream` or similar
depending on your flagd settings to check if the deadline exceeded is
returned after the specified duration
3. Test Sync Service Stream deadline: run `grpcurl -v --proto
schemas/protobuf/flagd/sync/v1/sync.proto -plaintext localhost:8015
flagd.sync.v1.FlagSyncService/SyncFlags` or similar depending on your
flagd settings to check if the deadline exceeded is returned after the
specified duration

Signed-off-by: alexandra.oberaigner <alexandra.oberaigner@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
2025-06-13 15:50:48 -04:00
Rahul Baradol ba348152b6
feat: updating context using headers (#1641)
<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->

Able to update context map using headers present in 
- OFREP requests
- Connect Requests (via Flag Evaluator V2 service)

### Related Issues
Fixes #1583 

### Notes
Context values passed via headers is high priority

If same context key is updated via
- Headers
- Request Body
- Static Config

_Context via Headers will be considered_

### Usage 
```
flagd start --port 8013 --uri file:./samples/example_flags.flagd.json -H Header=contextKey
```
or
```
flagd start --port 8013 --uri file:./samples/example_flags.flagd.json --context-from-header Header=contextKey
```

---------

Signed-off-by: Rahul Baradol <rahul.baradol.14@gmail.com>
2025-06-13 10:02:35 -04:00
alexandraoberaigner e2203a13ca
fix: add support for unix socket connection in sync service (#1518) (#1560)
## This PR
adds support for unix sockets in sync service

### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->

Fixes #1518

### How to test
start flagd with the new option `-e /tmp/socketpath` and try to connect
with an in-process provider to the same socket path & request a flag

---------

Signed-off-by: Alexandra Oberaigner <alexandra.oberaigner@dynatrace.com>
Signed-off-by: alexandraoberaigner <82218944+alexandraoberaigner@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
2025-02-24 22:51:39 -05:00
Aleksei 7ca092e478
feat: add context-value flag (#1448)
- add the `--context-value` command line flag to pass arbitrary key
value pairs to the evaluation context

Signed-off-by: Aleksei Muratov <muratoff.alexey@gmail.com>
2024-12-05 11:05:46 -05:00
Matthew Wilson 5c39cfe30a
feat: support azure blob sync (#1428)
## This PR

- adds support for Azure Blob Storage sync

Signed-off-by: Matthew Wilson <54033231+wilson-matthew@users.noreply.github.com>
2024-10-23 16:15:31 -04:00
Kevin Schoonover 8737f53444
feat: add mTLS support to otel exporter (#1389)
## This PR

The OpenTelemetry collectors in my production environment are configured
to use TLS for uploading metrics / traces so this PR aims to

- add the ability to use mTLS + self-signed certificates when exporting
to the opentelemetry collector

This is the 'quick and dirty' approach so wanted to make an initial PR
to make sure the high level implementation is the approach you're
looking for.

### Follow-up Tasks
- [ ] update the documentation when this approach is approved

### How to test
I am struggling to figure out how to test this with self signed
certificates to give a specific set of commands you can run because the
TLS connection is never successful (assuming this is because of my
commands)
```bash
openssl req -x509 -newkey rsa:4096 -keyout ca.key.pem -out ca.cert.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost"

openssl req -x509 -newkey rsa:4096 -keyout client.key.pem -out client.cert.pem -CA ca.cert.pem -CAkey ca.key.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost" -addext "subjectAltName = IP:127.0.0.1"
openssl req -x509 -newkey rsa:4096 -keyout server.key.pem -out server.cert.pem -CA ca.cert.pem -CAkey ca.key.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=localhost" -addext "subjectAltName = IP:127.0.0.1"
```


; however, when I pull certificates from my production environment to
test this works

---------

Signed-off-by: Kevin Schoonover <me@kschoon.me>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2024-09-23 08:16:42 -04:00
Kavindu Dodanduwa 9d12fc2070
feat: OFREP support for flagd (#1247)
## This PR

Fixes #1245 and introduce OFREP support for flagd

OFREP service runs on 8016 by default and can simply use curl for flag
evaluations,

```shell
curl -X POST 'http://localhost:8016/ofrep/v1/evaluate/flags/myBoolFlag'
```

NOTE - This PR touch several files as I had to migrate from
`github.com/golang/mock/gomock` to `go.uber.org/mock/gomock`. This is
because https://github.com/golang/mock is no longer maintained.

---------

Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
Co-authored-by: Florian Bacher <florian.bacher@dynatrace.com>
2024-03-27 10:03:01 -07:00
Kavindu Dodanduwa 7afdc0cda4
feat: serve sync.proto on port 8015 (#1237)
## This PR

Introduce flag sync capability to flagd as discussed at [1] and fixes
https://github.com/open-feature/flagd/issues/1230 .

**What's changed ?**

The change included with this PR introduces the gRPC sync contract [2].
This allows flagd to expose its store to in-process provider which
consumes gRPC flag stream.


![image](https://github.com/open-feature/flagd/assets/8186721/871ed21f-612a-46d4-95b6-6459d43cb077)

**How to use ?**

flagd will start sync service on port `8015`. You can alter the default
sync port by providing desired port to the startup flag `syncPort`
(`--sync-port=8686`)

**Implementation details**

- Sync service startup is delayed to allow configured flag sources to
complete their initial loading (dealy is 5 seconds)
- Sync request's `selector` can be used to specify the specific flag
source. If unset, all flags will be sent
- A new stream response will be created whenever there are updates from
flag sources


[1] - https://github.com/open-feature/flagd/discussions/1153 
[2] -
https://github.com/open-feature/flagd-schemas/blob/main/protobuf/flagd/sync/v1/sync.proto

---------

Signed-off-by: Kavindu Dodanduwa <kavindudodanduwa@gmail.com>
Signed-off-by: Kavindu Dodanduwa <Kavindu-Dodan@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
2024-03-12 07:54:47 -07:00
Best Olunusi b9d30e0a52
fix: use correct link in sources flag helper text in start cmd (#1126)
Signed-off-by: Best Olunusi <olunusibest@gmail.com>
2024-01-05 14:21:23 -05:00
Craig Pastro 49f6fe5679
chore!: remove deprecated flags (#1075)
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>
2023-12-15 11:39:44 -05:00
Craig Pastro 5635e38703
refactor: Rename metrics-port to management-port (#1012)
Signed-off-by: Craig Pastro <craig.pastro@gmail.com>
2023-11-16 15:08:57 -05:00
odubajDT bb6f5bf0fc
feat!: support OFO v1beta1 API (#997)
BREAKING CHANGE: OFO APIs were updated to version v1beta1, since they are more stable now. Resources of the alpha versions are no longer supported in flagd or flagd-proxy.
2023-11-14 07:35:45 +01:00
Michael Beemer 0bade57400
docs: fixed typos and linting issues (#957)
## This PR

- reworked to autogenerated docs to resolve a relative path issue
- fixed invalid links
- fixed various typos

### How to test

Run `make run-web-docs` and look at the squeaky clean output.

---------

Signed-off-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-10-06 10:43:39 -04:00
Todd Baert 27b3193821
chore: docs rework (#927)
Total web-docs overhaul:

- puts a helpful intro at the start, with a demo on the next page
- adds an "architecture" page which discusses in-process vs rpc
- adds a deployment page with mentions how to install/run
- adds a "reference" section which includes:
  - specs
  - protos (in the form of autogenerated markdown for easy navigation)
  - autogenerated CLI docs
- adds FAQ

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2023-09-27 13:46:39 -04:00