diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02c9ef62e273..03059dd92a8d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,6 +93,8 @@ staging-deploy: MODE: daemonset REPLICA_COUNT: 1 CLUSTER_ROLE: opentelemetry-collector + REGISTRY: $BUILD_SANDBOX_REGISTRY + #env:otel-gateway staging-deploy-gateway: !!merge <<: *staging-deploy @@ -104,6 +106,8 @@ staging-deploy-gateway: MODE: deployment REPLICA_COUNT: 3 CLUSTER_ROLE: opentelemetry-collector-gateway + REGISTRY: $BUILD_SANDBOX_REGISTRY + #env:otel-ds-gateway staging-deploy-ds-gateway: !!merge <<: *staging-deploy @@ -115,6 +119,7 @@ staging-deploy-ds-gateway: MODE: deployment REPLICA_COUNT: 3 CLUSTER_ROLE: opentelemetry-collector-ds-gateway + REGISTRY: $BUILD_SANDBOX_REGISTRY # DEPLOY COLLECTOR PROD .prod-deploy: &prod-deploy-demo-eks @@ -145,4 +150,5 @@ prod-deploy: NODE_GROUP: MODE: daemonset REPLICA_COUNT: 1 - CLUSTER_ROLE: opentelemetry-collector \ No newline at end of file + CLUSTER_ROLE: opentelemetry-collector + REGISTRY: $BUILD_DEMO_REGISTRY \ No newline at end of file diff --git a/ci/scripts/ci-deploy.sh b/ci/scripts/ci-deploy.sh index 29743b0e9b38..63fac0aacfc2 100644 --- a/ci/scripts/ci-deploy.sh +++ b/ci/scripts/ci-deploy.sh @@ -16,6 +16,7 @@ replicaCount=$REPLICA_COUNT clusterRole=$CLUSTER_ROLE clusterName=$CLUSTER_NAME clusterArn=$CLUSTER_ARN +registry=$REGISTRY install_collector() { release_name="opentelemetry-collector" @@ -25,8 +26,9 @@ install_collector() { helm repo update open-telemetry helm_cmd="helm --debug upgrade ${release_name} -n ${namespace} open-telemetry/opentelemetry-collector --install \ - -f ./ci/values.yaml \ - --set-string image.tag=otelcolcontrib-v$CI_COMMIT_SHORT_SHA \ + -f ./ci/values.yaml ${registry}\ + --set-string image.repository= \ + --set-string image.tag=otelcolcontrib-v$CI_COMMIT_SHORT_SHA \ --set clusterRole.name=${clusterRole} \ --set clusterRole.clusterRoleBinding.name=${clusterRole} \ --set-string image.repository=${clusterArn} \