Skip to content

Commit

Permalink
add datadog-agent/
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 28, 2024
1 parent 88f0174 commit 2acad8a
Show file tree
Hide file tree
Showing 16 changed files with 930 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/extras/datadog-agent/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.values
20 changes: 20 additions & 0 deletions examples/extras/datadog-agent/.tf-control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# .tf-control
# allows for setting a specific command to be used for tf-* commands under this git repo
# see tf-control.sh help for more info

TFCONTROL_VERSION="1.0.5"

TFCOMMAND="terraform_latest"
# TF_CLI_CONFIG_FILE=PATH-TO-FILE/.tf-control.tfrc
# TFARGS=""
# TFNOLOG=""
# TFNOCOLOR=""

# use the following to force a specific version. An upgrade of an existing 0.12.31 to 1.x
# needs you to cycle through 0.13.17, 0.14.11, and then latest (0.15.5 not needed). Other
# steps in between. See https://github.e.it.census.gov/terraform/support/tree/master/docs/how-to/terraform-upgrade for details
#
#TFCOMMAND="terraform_0.12.31"
#TFCOMMAND="terraform_0.13.7"
#TFCOMMAND="terraform_0.14.11"
#TFCOMMAND="terraform_0.15.5"
24 changes: 24 additions & 0 deletions examples/extras/datadog-agent/.tf-control.tfrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
TFCONTROL_VERSION="1.0.5"

# https://www.terraform.io/docs/cli/config/config-file.html
plugin_cache_dir = "/data/terraform/terraform.d/plugin-cache"
#disable_checkpoint = true

provider_installation {
# filesystem_mirror {
# path = "/apps/terraform/terraform.d/providers"
# include = [ "*/*/*" ]
# }
filesystem_mirror {
path = "/data/terraform/terraform.d/providers"
include = [ "*/*/*" ]
}
# filesystem_mirror {
# path = "/apps/terraform/terraform.d/providers"
# include = [ "external.terraform.census.gov/*/*" ]
# }
direct {
include = [ "*/*/*" ]
}
}

106 changes: 106 additions & 0 deletions examples/extras/datadog-agent/datadog.values.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
## Custom Values for our EKS
## Default file located https://github.com/DataDog/helm-charts/blob/main/charts/datadog/values.yaml
## Use this file as reference in TF Helm Resource
datadog:
# pass these in via set{}
## apiKey: # <DATADOG_API_KEY>
## appKey: # <DATADOG_APP_KEY>
## apiKeyExistingSecret: datadog-keys
## appKeyExistingSecret: # <DATADOG_APP_KEY_SECRET>
## site: ddog-gov.com
## proxy:
## http: "http://proxy.tco.census.gov:3128"
## https: "http://proxy.tco.census.gov:3128"
apm:
portEnabled: true
serviceMonitoring:
enabled: true
logs:
enabled: false
autoMultiLineDetection: false
processAgent:
processCollection: true
dogstatsd:
useHostPort: true
kubeStateMetricsEnabled: false
kubeStateMetricsCore:
enabled: true
kubelet:
tlsVerify: false
networkMonitoring:
enabled: true
env:
- name: DD_EC2_PREFER_IMDSV2
value: "true"
- name: DD_INVENTORIES_CONFIGURATION_ENABLED
value: "true"
- name: HTTP_PROXY
value: "http://proxy.tco.census.gov:3128"
- name: HTTPS_PROXY
value: "http://proxy.tco.census.gov:3128"
- name: NO_PROXY
value: ".census.gov,169.254.169.254,127.0.0.1/8,10.0.0.0/8,172.16.0.0/12,148.129.0.0/16,.local,.default,.eks.amazonaws.com"
- name: DD_HOSTNAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName

clusterAgent:
enabled: true
admissionController:
enabled: true
mutateUnlabelled: false
metricsProvider:
enabled: false
# useDatadogMetrics: true
confd:
kube_apiserver_metrics.yaml: |-
cluster_check: true
init_config:
instances:
- prometheus_url: https://kubernetes.default/metrics
ssl_ca_cert: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
bearer_token_auth: true
kube_controller_manager.yaml: |-
cluster_check: true
init_config:
instances:
- prometheus_url: https://kubernetes.default/metrics
ssl_ca_cert: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
bearer_token_auth: true
env:
- name: DD_EC2_PREFER_IMDSV2
value: "true"
- name: HTTP_PROXY
value: "http://proxy.tco.census.gov:3128"
- name: HTTPS_PROXY
value: "http://proxy.tco.census.gov:3128"
- name: NO_PROXY
value: ".census.gov,169.254.169.254,127.0.0.1/8,10.0.0.0/8,172.16.0.0/12,148.129.0.0/16,.local,.default,.eks.amazonaws.com"
- name: DD_HOSTNAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName

#agents:
# useConfigMap: true
# customAgentConfig: true

# fips:
# enabled: true
# use_https: false
#
# systemProbe:
# collectDNSStats: false
# enableOOMKill: false
# enableTCPQueueLength: false
#
# securityAgent:
# runtime:
# enabled: true

# https://docs.datadoghq.com/agent/troubleshooting/hostname_containers/?tab=helm
## for DD_HOSTNAME

# https://docs.datadoghq.com/containers/guide/cluster_agent_autoscaling_metrics/?tab=helm#setup-datadogmetric-crd
## for datadog metrics (disable, do not want to autoscale based on DD metrics)
Loading

0 comments on commit 2acad8a

Please sign in to comment.