Skip to content

Commit

Permalink
fix!: change FLAGD_GRPC_TARGET env to FLAGD_TARGET_URI
Browse files Browse the repository at this point in the history
Signed-off-by: Todd Baert <[email protected]>
  • Loading branch information
toddbaert committed Oct 29, 2024
1 parent da41a95 commit 887ccaa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions providers/flagd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ variables.
Given below are the supported configurations:

| Option name | Environment variable name | Type & Values | Default | Compatible resolver |
|-----------------------|--------------------------------|--------------------------|-----------|---------------------|
| --------------------- | ------------------------------ | ------------------------ | --------- | ------------------- |
| resolver | FLAGD_RESOLVER | String - rpc, in-process | rpc | |
| host | FLAGD_HOST | String | localhost | rpc & in-process |
| port | FLAGD_PORT | int | 8013 | rpc & in-process |
| targetUri | FLAGD_GRPC_TARGET | string | null | rpc & in-process |
| targetUri | FLAGD_TARGET_URI | string | null | rpc & in-process |
| tls | FLAGD_TLS | boolean | false | rpc & in-process |
| socketPath | FLAGD_SOCKET_PATH | String | null | rpc & in-process |
| certPath | FLAGD_SERVER_CERT_PATH | String | null | rpc & in-process |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class Config {
static final String OFFLINE_SOURCE_PATH = "FLAGD_OFFLINE_FLAG_SOURCE_PATH";
static final String KEEP_ALIVE_MS_ENV_VAR_NAME_OLD = "FLAGD_KEEP_ALIVE_TIME";
static final String KEEP_ALIVE_MS_ENV_VAR_NAME = "FLAGD_KEEP_ALIVE_TIME_MS";
static final String GRPC_TARGET_ENV_VAR_NAME = "FLAGD_GRPC_TARGET";
static final String TARGET_URI_ENV_VAR_NAME = "FLAGD_TARGET_URI";

static final String RESOLVER_RPC = "rpc";
static final String RESOLVER_IN_PROCESS = "in-process";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public class FlagdOptions {
* resolution. For more visit (https://grpc.io/docs/guides/custom-name-resolution/)
*/
@Builder.Default
private String targetUri = fallBackToEnvOrDefault(Config.GRPC_TARGET_ENV_VAR_NAME, null);
private String targetUri = fallBackToEnvOrDefault(Config.TARGET_URI_ENV_VAR_NAME, null);


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void testRpcProviderFromEnv_portConfigured_usesConfiguredPort() {
}

@Test
@SetEnvironmentVariable(key = GRPC_TARGET_ENV_VAR_NAME, value = "envoy://localhost:1234/foo.service")
@SetEnvironmentVariable(key = TARGET_URI_ENV_VAR_NAME, value = "envoy://localhost:1234/foo.service")
void testTargetOverrideFromEnv() {
FlagdOptions flagdOptions = FlagdOptions.builder().build();

Expand Down

0 comments on commit 887ccaa

Please sign in to comment.