Skip to content

Commit

Permalink
Disable DD integrations in container orchestrator (#6443)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpgrailsdev committed May 9, 2023
1 parent c29780c commit 567c016
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import jakarta.inject.Named;
import jakarta.inject.Singleton;
import java.nio.file.Path;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -84,7 +85,8 @@ public ContainerOrchestratorConfig kubernetesContainerOrchestratorConfig(
@Value("${airbyte.data.plane.service-account.credentials-path}") final String dataPlaneServiceAccountCredentialsPath,
@Value("${airbyte.container.orchestrator.data-plane-creds.secret-mount-path}") final String containerOrchestratorDataPlaneCredsSecretMountPath,
@Value("${airbyte.container.orchestrator.data-plane-creds.secret-name}") final String containerOrchestratorDataPlaneCredsSecretName,
@Value("${airbyte.acceptance.test.enabled}") final boolean isInTestMode) {
@Value("${airbyte.acceptance.test.enabled}") final boolean isInTestMode,
@Value("${datadog.orchestrator.disabled.integrations}") final String disabledIntegrations) {
final var kubernetesClient = new DefaultKubernetesClient();

final DocumentStoreClient documentStoreClient = StateClients.create(
Expand All @@ -108,6 +110,11 @@ public ContainerOrchestratorConfig kubernetesContainerOrchestratorConfig(
environmentVariables.put(DATA_PLANE_SERVICE_ACCOUNT_CREDENTIALS_PATH_ENV_VAR, dataPlaneServiceAccountCredentialsPath);
environmentVariables.put(DATA_PLANE_SERVICE_ACCOUNT_EMAIL_ENV_VAR, dataPlaneServiceAccountEmail);

// Disable DD agent integrations based on the configuration
if (StringUtils.isNotEmpty(disabledIntegrations)) {
Arrays.asList(disabledIntegrations.split(",")).forEach(e -> environmentVariables.put(e.trim(), Boolean.FALSE.toString()));
}

final Configs configs = new EnvConfigs();
environmentVariables.put(EnvConfigs.FEATURE_FLAG_CLIENT, configs.getFeatureFlagClient());
environmentVariables.put(EnvConfigs.LAUNCHDARKLY_KEY, configs.getLaunchDarklyKey());
Expand Down
3 changes: 3 additions & 0 deletions airbyte-workers/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ datadog:
agent:
host: ${DD_AGENT_HOST:}
port: ${DD_DOGSTATSD_PORT:}
orchestrator:
disabled:
integrations: ${DD_ORCHESTRATOR_DISABLED_INTEGRATIONS:DD_INTEGRATION_GRPC_ENABLED,DD_INTEGRATION_GRPC_CLIENT_ENABLED,DD_INTEGRATION_GRPC_SERVER_ENABLED,DD_INTEGRATION_NETTY_ENABLED,DD_INTEGRATION_GOOGLE_HTTP_CLIENT_ENABLED}

docker:
network: ${DOCKER_NETWORK:host}
Expand Down

0 comments on commit 567c016

Please sign in to comment.