forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathci-deploy-converged-agent.sh
37 lines (27 loc) · 1.06 KB
/
ci-deploy-converged-agent.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env bash
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
# This script is used to deploy collector on demo account cluster
set -euo pipefail
IFS=$'\n\t'
clusterName=$CLUSTER_NAME
clusterArn=$CLUSTER_ARN
region=$REGION
namespace=$NAMESPACE
releaseName=$RELEASE_NAME
nodegroup=$NODE_GROUP
install_agent() {
# if repo already exists, helm 3+ will skip
helm repo add datadog https://helm.datadoghq.com
# --install will run `helm install` if not already present.
helm_cmd="helm --debug upgrade "${releaseName}" -n "${namespace}" datadog/datadog --install \
-f ./ci/converged-agent-values/values.yaml \
--set datadog.tags=env:"${namespace}" \
--set agents.nodeSelector.\"alpha\\.eksctl\\.io/nodegroup-name\"=${nodegroup} \
--set agents.image.doNotCheckTag=true"
eval $helm_cmd
}
###########################################################################################################
aws eks --region "${region}" update-kubeconfig --name "${clusterName}"
kubectl config use-context "${clusterArn}"
install_agent