Skip to content

Commit e94deff

Browse files
committed
feat: add Velero datadog integration on EKS
1 parent e6e3a3d commit e94deff

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

terraform/aws/aws-eks/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,26 @@ velero backup delete learning-backup1 --confirm
131131
# delete all backups
132132
velero backup delete --all --confirm
133133
```
134+
135+
### Datadog
136+
137+
```bash
138+
# SSH to the Datadog Agent pod on the same node where target pod is located.
139+
NODE_NAME="..."
140+
kubectl exec -n datadog -it $(kubectl get pods -n datadog --field-selector spec.nodeName=$NODE_NAME -o jsonpath="{.items[0].metadata.name}") -c agent -- bash
141+
142+
## get status
143+
agent status
144+
145+
# get collectors status
146+
agent status collector
147+
148+
# check particular integrations/check (for example: velero, nginx, mongo, nginx_ingress_controller)
149+
agent check velero
150+
151+
# run twice to get rate metrics from particular check
152+
agent check mongo --check-rate
153+
154+
# show agent runtime configuration
155+
agent config
156+
```

terraform/aws/aws-eks/module/backup.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
resource "aws_s3_bucket" "backup" {
22
bucket = "${local.account_id}-${local.prefix}-velero-backups"
33
force_destroy = "true"
4-
object_lock_enabled = "false"
4+
object_lock_enabled = "false" # when versioning is disabled, this must be false
55
}
66

77

@@ -55,7 +55,7 @@ resource "aws_iam_role_policy_attachment" "backup_irsa" {
5555

5656

5757
resource "aws_iam_policy" "velero-policy" {
58-
description = "Allow pass ReadOnlyAccess role to Tools"
58+
description = "Allow Velero to manage backups in S3 and EBS"
5959
name = "${local.prefix}-velero-irsa"
6060

6161
policy = <<EOF

terraform/aws/aws-eks/module/eks.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,5 +235,8 @@ resource "null_resource" "cluster-config" {
235235
aws_eks_access_policy_association.admin,
236236
aws_eks_pod_identity_association.externaldns,
237237
aws_iam_role_policy_attachment.backup_irsa,
238+
aws_eks_addon.snapshot-controller,
239+
aws_eks_addon.efs,
240+
aws_eks_addon.kube-state-metrics
238241
]
239242
}

terraform/aws/aws-eks/module/velero.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ image:
55
tag: latest
66
pullPolicy: Always
77

8+
podAnnotations:
9+
ad.datadoghq.com/velero.checks: |
10+
{
11+
"velero": {
12+
"init_config": {},
13+
"instances": [{"openmetrics_endpoint": "http://%%host%%:8085/metrics"}]
14+
}
15+
}
16+
ad.datadoghq.com/node-agent.checks: |
17+
{
18+
"velero": {
19+
"init_config": {},
20+
"instances": [{"openmetrics_endpoint": "http://%%host%%:8085/metrics"}]
21+
}
22+
}
823
924
nodeSelector:
1025
karpenter.sh/nodepool: "system"

0 commit comments

Comments
 (0)