Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions gocd/templates/bash/deploy-py.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ IMAGE_TAG="${GO_REVISION_SNUBA_REPO}"
--label-selector="${LABEL_SELECTOR}" \
--image="us-docker.pkg.dev/sentryio/snuba-mr/image:${IMAGE_TAG}" \
--container-name="snuba" \
--container-name="api" \
--container-name="dlq-consumer" \
--container-name="eap-items-subscriptions-executor" \
--container-name="eap-items-subscriptions-scheduler" \
Expand Down Expand Up @@ -46,4 +45,9 @@ IMAGE_TAG="${GO_REVISION_SNUBA_REPO}"
--image="us-docker.pkg.dev/sentryio/snuba-mr/image:${IMAGE_TAG}" \
--type="cronjob" \
--container-name="optimize" \
--container-name="cleanup"
--container-name="cleanup" \
&& k8s-deploy \
--label-selector="${LABEL_SELECTOR}" \
--image="us-docker.pkg.dev/sentryio/snuba-mr/image:${IMAGE_TAG}" \
--type="${SNUBA_API_DEPLOY_TYPE:-deployment}" \
--container-name="api"
11 changes: 10 additions & 1 deletion gocd/templates/pipelines/snuba.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ local migrate_stage(stage_name, region) = [
},
];

// Regions where snuba-api is an Argo Rollout and k8s-deploy should track the
// Rollout instead of the (scaled to zero) Deployment it references.
local api_rollout_regions = ['s4s2'];

local is_api_rollout(region) = std.member(api_rollout_regions, region);

local saas_datadog_monitor_ids = {
us: '311884335 311884334',
de: '311884404 311884405',
Expand Down Expand Up @@ -215,10 +221,13 @@ function(region) {
],
},
'deploy-primary': {
timeout: 1200,
// Argo Rollout canary steps and analyses take longer than a
// plain rolling update.
timeout: if is_api_rollout(region) then 2400 else 1200,
elastic_profile_id: 'snuba',
environment_variables: {
LABEL_SELECTOR: 'service=snuba',
[if is_api_rollout(region) then 'SNUBA_API_DEPLOY_TYPE' else null]: 'rollout',
},
tasks: [
gocdtasks.script(importstr '../bash/deploy-py.sh'),
Expand Down
Loading