Skip to content

Commit

Permalink
[cleanup] move common envvars to v2alpha1 envvars (#1562)
Browse files Browse the repository at this point in the history
* [cleanup] move common envvars to v2alpha1 envvars

* move a few more envvars
  • Loading branch information
celenechang authored Dec 16, 2024
1 parent 13a6022 commit 756ed08
Show file tree
Hide file tree
Showing 100 changed files with 938 additions and 692 deletions.
187 changes: 0 additions & 187 deletions api/datadoghq/common/envvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,193 +5,6 @@

package common

// TODO move most of these out of common

// Datadog env var names
const (
DatadogHost = "DATADOG_HOST"
DDAdmissionControllerAgentSidecarEnabled = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_ENABLED"
DDAdmissionControllerAgentSidecarClusterAgentEnabled = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_CLUSTER_AGENT_ENABLED"
DDAdmissionControllerAgentSidecarProvider = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_PROVIDER"
DDAdmissionControllerAgentSidecarRegistry = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_CONTAINER_REGISTRY"
DDAdmissionControllerAgentSidecarImageName = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_IMAGE_NAME"
DDAdmissionControllerAgentSidecarImageTag = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_IMAGE_TAG"
DDAdmissionControllerAgentSidecarSelectors = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_SELECTORS"
DDAdmissionControllerAgentSidecarProfiles = "DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_PROFILES"
DDAdmissionControllerEnabled = "DD_ADMISSION_CONTROLLER_ENABLED"
DDAdmissionControllerValidationEnabled = "DD_ADMISSION_CONTROLLER_VALIDATION_ENABLED"
DDAdmissionControllerMutationEnabled = "DD_ADMISSION_CONTROLLER_MUTATION_ENABLED"
DDAdmissionControllerInjectConfig = "DD_ADMISSION_CONTROLLER_INJECT_CONFIG_ENABLED"
DDAdmissionControllerInjectConfigMode = "DD_ADMISSION_CONTROLLER_INJECT_CONFIG_MODE"
DDAdmissionControllerInjectTags = "DD_ADMISSION_CONTROLLER_INJECT_TAGS_ENABLED"
DDAdmissionControllerLocalServiceName = "DD_ADMISSION_CONTROLLER_INJECT_CONFIG_LOCAL_SERVICE_NAME"
DDAdmissionControllerMutateUnlabelled = "DD_ADMISSION_CONTROLLER_MUTATE_UNLABELLED"
DDAdmissionControllerServiceName = "DD_ADMISSION_CONTROLLER_SERVICE_NAME"
DDAdmissionControllerFailurePolicy = "DD_ADMISSION_CONTROLLER_FAILURE_POLICY"
DDAdmissionControllerWebhookName = "DD_ADMISSION_CONTROLLER_WEBHOOK_NAME"
DDAdmissionControllerRegistryName = "DD_ADMISSION_CONTROLLER_CONTAINER_REGISTRY"
DDAdmissionControllerCWSInstrumentationEnabled = "DD_ADMISSION_CONTROLLER_CWS_INSTRUMENTATION_ENABLED"
DDAdmissionControllerCWSInstrumentationMode = "DD_ADMISSION_CONTROLLER_CWS_INSTRUMENTATION_MODE"
DDAdmissionControllerAppsecEnabled = "DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_APPSEC_ENABLED"
DDAdmissionControllerAppsecSCAEnabled = "DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_APPSEC_SCA_ENABLED"
DDAdmissionControllerIASTEnabled = "DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_IAST_ENABLED"
DDAPIKey = "DD_API_KEY"
DDAPMEnabled = "DD_APM_ENABLED"
DDAPMInstrumentationInstallTime = "DD_INSTRUMENTATION_INSTALL_TIME"
DDAPMInstrumentationInstallId = "DD_INSTRUMENTATION_INSTALL_ID"
DDAPMInstrumentationInstallType = "DD_INSTRUMENTATION_INSTALL_TYPE"
DDAPMNonLocalTraffic = "DD_APM_NON_LOCAL_TRAFFIC"
DDAPMReceiverPort = "DD_APM_RECEIVER_PORT"
DDAPMReceiverSocket = "DD_APM_RECEIVER_SOCKET"
DDAPMInstrumentationEnabled = "DD_APM_INSTRUMENTATION_ENABLED"
DDAPMInstrumentationEnabledNamespaces = "DD_APM_INSTRUMENTATION_ENABLED_NAMESPACES"
DDAPMInstrumentationDisabledNamespaces = "DD_APM_INSTRUMENTATION_DISABLED_NAMESPACES"
DDAPMInstrumentationLibVersions = "DD_APM_INSTRUMENTATION_LIB_VERSIONS"
DDAppKey = "DD_APP_KEY"
DDAuthTokenFilePath = "DD_AUTH_TOKEN_FILE_PATH"
DDChecksTagCardinality = "DD_CHECKS_TAG_CARDINALITY"
DDClcRunnerEnabled = "DD_CLC_RUNNER_ENABLED"
DDClcRunnerHost = "DD_CLC_RUNNER_HOST"
DDClcRunnerID = "DD_CLC_RUNNER_ID"
DDClusterAgentAuthToken = "DD_CLUSTER_AGENT_AUTH_TOKEN"
DDClusterAgentEnabled = "DD_CLUSTER_AGENT_ENABLED"
DDClusterAgentKubeServiceName = "DD_CLUSTER_AGENT_KUBERNETES_SERVICE_NAME"
DDClusterAgentServiceAccountName = "DD_CLUSTER_AGENT_SERVICE_ACCOUNT_NAME"
DDClusterAgentTokenName = "DD_CLUSTER_AGENT_TOKEN_NAME"
DDClusterChecksEnabled = "DD_CLUSTER_CHECKS_ENABLED"
DDClusterName = "DD_CLUSTER_NAME"
DDCollectKubernetesEvents = "DD_COLLECT_KUBERNETES_EVENTS"
DDComplianceConfigCheckInterval = "DD_COMPLIANCE_CONFIG_CHECK_INTERVAL"
DDComplianceConfigDir = "DD_COMPLIANCE_CONFIG_DIR"
DDComplianceConfigEnabled = "DD_COMPLIANCE_CONFIG_ENABLED"
DDComplianceHostBenchmarksEnabled = "DD_COMPLIANCE_HOST_BENCHMARKS_ENABLED"
DDContainerCollectionEnabled = "DD_PROCESS_CONFIG_CONTAINER_COLLECTION_ENABLED"
DDCriSocketPath = "DD_CRI_SOCKET_PATH"
DDddURL = "DD_DD_URL"
DDURL = "DD_URL"
DDDogstatsdEnabled = "DD_USE_DOGSTATSD"
DDDogstatsdMapperProfiles = "DD_DOGSTATSD_MAPPER_PROFILES"
DDDogstatsdNonLocalTraffic = "DD_DOGSTATSD_NON_LOCAL_TRAFFIC"
DDDogstatsdOriginDetection = "DD_DOGSTATSD_ORIGIN_DETECTION"
DDDogstatsdOriginDetectionClient = "DD_DOGSTATSD_ORIGIN_DETECTION_CLIENT"
DDDogstatsdTagCardinality = "DD_DOGSTATSD_TAG_CARDINALITY"
DDDogstatsdPort = "DD_DOGSTATSD_PORT"
DDDogstatsdSocket = "DD_DOGSTATSD_SOCKET"
DDEnableMetadataCollection = "DD_ENABLE_METADATA_COLLECTION"
DDEnableOOMKillEnvVar = "DD_SYSTEM_PROBE_CONFIG_ENABLE_OOM_KILL"
DDEnableTCPQueueLengthEnvVar = "DD_SYSTEM_PROBE_CONFIG_ENABLE_TCP_QUEUE_LENGTH"
DDEnableEBPFCheckEnvVar = "DD_EBPF_CHECK_ENABLED"
DDExternalMetricsProviderAPIKey = "DD_EXTERNAL_METRICS_PROVIDER_API_KEY"
DDExternalMetricsProviderAppKey = "DD_EXTERNAL_METRICS_PROVIDER_APP_KEY"
DDExternalMetricsProviderEndpoint = "DD_EXTERNAL_METRICS_PROVIDER_ENDPOINT"
DDExternalMetricsProviderEnabled = "DD_EXTERNAL_METRICS_PROVIDER_ENABLED"
DDExternalMetricsProviderPort = "DD_EXTERNAL_METRICS_PROVIDER_PORT"
DDExternalMetricsProviderUseDatadogMetric = "DD_EXTERNAL_METRICS_PROVIDER_USE_DATADOGMETRIC_CRD"
DDExternalMetricsProviderWPAController = "DD_EXTERNAL_METRICS_PROVIDER_WPA_CONTROLLER"
DDAutoscalingWorkloadEnabled = "DD_AUTOSCALING_WORKLOAD_ENABLED"
DDExtraConfigProviders = "DD_EXTRA_CONFIG_PROVIDERS"
DDExtraListeners = "DD_EXTRA_LISTENERS"
DDFIPSEnabled = "DD_FIPS_ENABLED"
DDFIPSPortRangeStart = "DD_FIPS_PORT_RANGE_START"
DDFIPSUseHTTPS = "DD_FIPS_HTTPS"
DDFIPSLocalAddress = "DD_FIPS_LOCAL_ADDRESS"
DDHealthPort = "DD_HEALTH_PORT"
DDHostname = "DD_HOSTNAME"
DDHostRootEnvVar = "HOST_ROOT"
DDIgnoreAutoConf = "DD_IGNORE_AUTOCONF"
DDKubeletCAPath = "DD_KUBELET_CLIENT_CA"
DDKubeletHost = "DD_KUBERNETES_KUBELET_HOST"
DDKubeletTLSVerify = "DD_KUBELET_TLS_VERIFY"
DDKubeResourcesNamespace = "DD_KUBE_RESOURCES_NAMESPACE"
DDKubeStateMetricsCoreConfigMap = "DD_KUBE_STATE_METRICS_CORE_CONFIGMAP_NAME"
DDKubeStateMetricsCoreEnabled = "DD_KUBE_STATE_METRICS_CORE_ENABLED"
DDLanguageDetectionEnabled = "DD_LANGUAGE_DETECTION_ENABLED"
DDLeaderElection = "DD_LEADER_ELECTION"
DDLeaderLeaseName = "DD_LEADER_LEASE_NAME"
DDLogLevel = "DD_LOG_LEVEL"
DDLogsConfigContainerCollectAll = "DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL"
DDLogsConfigOpenFilesLimit = "DD_LOGS_CONFIG_OPEN_FILES_LIMIT"
DDLogsContainerCollectUsingFiles = "DD_LOGS_CONFIG_K8S_CONTAINER_USE_FILE"
DDLogsEnabled = "DD_LOGS_ENABLED"
DDNamespaceLabelsAsTags = "DD_KUBERNETES_NAMESPACE_LABELS_AS_TAGS"
DDNamespaceAnnotationsAsTags = "DD_KUBERNETES_NAMESPACE_ANNOTATIONS_AS_TAGS"
DDNodeLabelsAsTags = "DD_KUBERNETES_NODE_LABELS_AS_TAGS"
DDKubernetesResourcesLabelsAsTags = "DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS"
DDKubernetesResourcesAnnotationsAsTags = "DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS"
DDOrchestratorExplorerEnabled = "DD_ORCHESTRATOR_EXPLORER_ENABLED"
DDOrchestratorExplorerExtraTags = "DD_ORCHESTRATOR_EXPLORER_EXTRA_TAGS"
DDOrchestratorExplorerDDUrl = "DD_ORCHESTRATOR_EXPLORER_ORCHESTRATOR_DD_URL"
DDOrchestratorExplorerAdditionalEndpoints = "DD_ORCHESTRATOR_ADDITIONAL_ENDPOINTS"
DDOrchestratorExplorerContainerScrubbingEnabled = "DD_ORCHESTRATOR_EXPLORER_CONTAINER_SCRUBBING_ENABLED"
DDOriginDetectionUnified = "DD_ORIGIN_DETECTION_UNIFIED"
DDPodAnnotationsAsTags = "DD_KUBERNETES_POD_ANNOTATIONS_AS_TAGS"
DDPodLabelsAsTags = "DD_KUBERNETES_POD_LABELS_AS_TAGS"
DDPodName = "DD_POD_NAME"
DDPPMReceiverSocket = "DD_APM_RECEIVER_SOCKET"
DDProcessCollectionEnabled = "DD_PROCESS_CONFIG_PROCESS_COLLECTION_ENABLED"
DDProcessConfigScrubArgs = "DD_PROCESS_CONFIG_SCRUB_ARGS"
DDProcessConfigStripArgs = "DD_PROCESS_CONFIG_STRIP_PROC_ARGUMENTS"
DDProcessDiscoveryEnabled = "DD_PROCESS_CONFIG_PROCESS_DISCOVERY_ENABLED"
DDProcessConfigRunInCoreAgent = "DD_PROCESS_CONFIG_RUN_IN_CORE_AGENT_ENABLED"
DDPrometheusScrapeChecks = "DD_PROMETHEUS_SCRAPE_CHECKS"
DDPrometheusScrapeEnabled = "DD_PROMETHEUS_SCRAPE_ENABLED"
DDPrometheusScrapeServiceEndpoints = "DD_PROMETHEUS_SCRAPE_SERVICE_ENDPOINTS"
DDPrometheusScrapeVersion = "DD_PROMETHEUS_SCRAPE_VERSION"
DDRemoteConfigurationEnabled = "DD_REMOTE_CONFIGURATION_ENABLED"
DDRuntimeSecurityConfigEnabled = "DD_RUNTIME_SECURITY_CONFIG_ENABLED"
DDRuntimeSecurityConfigPoliciesDir = "DD_RUNTIME_SECURITY_CONFIG_POLICIES_DIR"
DDRuntimeSecurityConfigRemoteTaggerEnabled = "DD_RUNTIME_SECURITY_CONFIG_REMOTE_TAGGER"
DDRuntimeSecurityConfigSocket = "DD_RUNTIME_SECURITY_CONFIG_SOCKET"
DDRuntimeSecurityConfigSyscallMonitorEnabled = "DD_RUNTIME_SECURITY_CONFIG_SYSCALL_MONITOR_ENABLED"
DDRuntimeSecurityConfigNetworkEnabled = "DD_RUNTIME_SECURITY_CONFIG_NETWORK_ENABLED"
DDRuntimeSecurityConfigActivityDumpEnabled = "DD_RUNTIME_SECURITY_CONFIG_ACTIVITY_DUMP_ENABLED"
DDRuntimeSecurityConfigRemoteConfigurationEnabled = "DD_RUNTIME_SECURITY_CONFIG_REMOTE_CONFIGURATION_ENABLED"
DDContainerImageEnabled = "DD_CONTAINER_IMAGE_ENABLED"
DDSBOMEnabled = "DD_SBOM_ENABLED"
DDSBOMContainerImageEnabled = "DD_SBOM_CONTAINER_IMAGE_ENABLED"
DDSBOMContainerImageAnalyzers = "DD_SBOM_CONTAINER_IMAGE_ANALYZERS"
DDSBOMContainerUseMount = "DD_SBOM_CONTAINER_IMAGE_USE_MOUNT"
DDSBOMContainerOverlayFSDirectScan = "DD_SBOM_CONTAINER_IMAGE_OVERLAYFS_DIRECT_SCAN"
DDSBOMHostEnabled = "DD_SBOM_HOST_ENABLED"
DDSBOMHostAnalyzers = "DD_SBOM_HOST_ANALYZERS"
DDSecretBackendCommand = "DD_SECRET_BACKEND_COMMAND"
DDSecretBackendArguments = "DD_SECRET_BACKEND_ARGUMENTS"
DDSecretBackendTimeout = "DD_SECRET_BACKEND_TIMEOUT"
DDServiceDiscoveryEnabled = "DD_DISCOVERY_ENABLED"
DDSite = "DD_SITE"
DDSystemProbeAgentEnabled = "DD_SYSTEM_PROBE_ENABLED"
DDSystemProbeBPFDebugEnabled = DDSystemProbeEnvPrefix + "BPF_DEBUG"
DDSystemProbeCollectDNSStatsEnabled = "DD_COLLECT_DNS_STATS"
DDSystemProbeConntrackEnabled = DDSystemProbeEnvPrefix + "ENABLE_CONNTRACK"
DDSystemProbeDebugPort = DDSystemProbeEnvPrefix + "DEBUG_PORT"
DDSystemProbeEnabled = "DD_SYSTEM_PROBE_ENABLED"
DDSystemProbeEnvPrefix = "DD_SYSTEM_PROBE_CONFIG_"
DDSystemProbeExternal = "DD_SYSTEM_PROBE_EXTERNAL"
DDSystemProbeNPMEnabled = "DD_SYSTEM_PROBE_NETWORK_ENABLED"
DDSystemProbeServiceMonitoringEnabled = "DD_SYSTEM_PROBE_SERVICE_MONITORING_ENABLED"
DDSystemProbeSocket = "DD_SYSPROBE_SOCKET"
DDSystemProbeOOMKillEnabled = DDSystemProbeEnvPrefix + "ENABLE_OOM_KILL"
DDSystemProbeTCPQueueLengthEnabled = DDSystemProbeEnvPrefix + "ENABLE_TCP_QUEUE_LENGTH"
DDTags = "DD_TAGS"
DockerHost = "DOCKER_HOST"

DDOTLPgRPCEndpoint = "DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_GRPC_ENDPOINT"
DDOTLPHTTPEndpoint = "DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_HTTP_ENDPOINT"

// KubernetesEnvvarName Env var used by the Datadog Agent container entrypoint
// to add kubelet config provider and listener
KubernetesEnvVar = "KUBERNETES"

ClusterChecksConfigProvider = "clusterchecks"

EnvVarTrueValue = "true"
EnvVarFalseValue = "false"

// InstallInfoToolVersion is used by the Operator to override the tool
// version value in the Agent's install info
InstallInfoToolVersion = "DD_TOOL_VERSION"
)

// DatadogAgentProfile env var names
const (
CreateStrategyEnabled = "DD_DAP_CREATE_STRATEGY_ENABLED"
Expand Down
5 changes: 5 additions & 0 deletions api/datadoghq/v2alpha1/condition.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

package v2alpha1

import (
Expand Down
5 changes: 5 additions & 0 deletions api/datadoghq/v2alpha1/condition_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

package v2alpha1

import (
Expand Down
Loading

0 comments on commit 756ed08

Please sign in to comment.