diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc8867ae4ed4..fae6bd4360f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -100,7 +100,12 @@ staging-deploy-gateway-eks: staging-deploy-ds-gateway-eks: !!merge <<: *staging-deploy variables: - SCRIPT: ./ci/scripts/ci-deploy-ds-gateway.sh + SCRIPT: ./ci/scripts/ci-deploy-staging.sh + NAMESPACE: otel-ds-gateway + NODE_GROUP: ng-6 + MODE: deployment + REPLICA_COUNT: 3 + CLUSTER_ROLE: opentelemetry-collector-ds-gateway # DEPLOY COLLECTOR PROD prod-deploy-demo-eks: diff --git a/ci/scripts/ci-deploy-ds-gateway.sh b/ci/scripts/ci-deploy-ds-gateway.sh deleted file mode 100644 index 2f65ea3500b4..000000000000 --- a/ci/scripts/ci-deploy-ds-gateway.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/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' -set -x - -install_collector() { - # Set the namespace and release name - release_name="opentelemetry-collector" - release_name_gateway="opentelemetry-collector-gateway" - namespace="otel-ds-gateway" - - # if repo already exists, helm 3+ will skip - helm --debug repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts - - # --install will run `helm install` if not already present. - # gateway with DD exporter - helm --debug upgrade "${release_name_gateway}" -n "${namespace}" open-telemetry/opentelemetry-collector --install \ - -f ./ci/values.yaml \ - -f ./ci/values-ds-gateway.yaml \ - --set-string image.tag="otelcolcontrib-v$CI_COMMIT_SHORT_SHA" \ - --set-string image.repository="601427279990.dkr.ecr.us-east-1.amazonaws.com/otel-collector-contrib" - - # daemonset with otlp exporter - helm --debug upgrade "${release_name}" -n "${namespace}" open-telemetry/opentelemetry-collector --install \ - -f ./ci/values.yaml \ - -f ./ci/values-otlp-col.yaml \ - --set-string image.tag="otelcolcontrib-v$CI_COMMIT_SHORT_SHA" \ - --set-string image.repository="601427279990.dkr.ecr.us-east-1.amazonaws.com/otel-collector-contrib" - -} - -########################################################################################################### -clusterName="dd-otel" -clusterArn="arn:aws:eks:us-east-1:601427279990:cluster/${clusterName}" - -aws eks --region us-east-1 update-kubeconfig --name "${clusterName}" -kubectl config use-context "${clusterArn}" - -install_collector diff --git a/ci/scripts/ci-deploy-staging.sh b/ci/scripts/ci-deploy-staging.sh index 7f1f3cb6f277..914efaec19f6 100644 --- a/ci/scripts/ci-deploy-staging.sh +++ b/ci/scripts/ci-deploy-staging.sh @@ -33,12 +33,24 @@ install_collector() { --set clusterRole.clusterRoleBinding.name="${clusterRole}" - # only deploy jmx deployment for otel-staging - if [ "$namespace" == "otel-staging" ]; then - install_deployment + # only deploy otlp col for otel-ds-gateway + if [ "$namespace" == "otel-ds-gateway" ]; then + install_ds_otlp fi } +install_ds_otlp() { + release_name="opentelemetry-collector-ds" + + # daemonset with otlp exporter + helm --debug upgrade "${release_name}" -n "${namespace}" open-telemetry/opentelemetry-collector --install \ + -f ./ci/values.yaml \ + -f ./ci/values-otlp-col.yaml \ + --set-string image.tag="otelcolcontrib-v$CI_COMMIT_SHORT_SHA" \ + --set-string image.repository="601427279990.dkr.ecr.us-east-1.amazonaws.com/otel-collector-contrib" +} + + install_deployment() { release_name_deployment="opentelemetry-collector-deployment" diff --git a/ci/values-ds-gateway.yaml b/ci/values-ds-gateway.yaml deleted file mode 100644 index 1371b3da79c1..000000000000 --- a/ci/values-ds-gateway.yaml +++ /dev/null @@ -1,8 +0,0 @@ -mode: deployment -replicaCount: 3 -nodeSelector: - alpha.eksctl.io/nodegroup-name: ng-6 -clusterRole: - name: "opentelemetry-collector-ds-gateway" - clusterRoleBinding: - name: opentelemetry-collector-ds-gateway