Skip to content

Commit a426707

Browse files
committed
Image proxy inherit configuration from existing deployment
1 parent 88609dc commit a426707

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

tool/build_image_proxy.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,24 @@ steps:
2828
- 'BRANCH_NAME=$BRANCH_NAME'
2929
- 'TAG_NAME=$TAG_NAME'
3030
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
31+
# Deploy latest version to Cloud Run. Depends on an existing version having
32+
# been configured in terraform. The terraform configuration should ignore
33+
# changes to:
34+
# - image URL
35+
#
36+
# It should set up and manage:
37+
# - HMAC_KEY_ID environment variable
38+
# - service account with permissions to access the secret manager.
39+
# - appropriate CPU/Memory settings. And this new deployment will inherit
40+
# those settings.
41+
#
42+
# Be careful when changing this script, as modifying non-ignored settings
43+
# will cause inconsistency in the terraform state.
3144
script: |
3245
#!/usr/bin/env bash
3346
set -x
3447
gcloud run deploy image-proxy-server \
3548
--image="us-central1-docker.pkg.dev/$PROJECT_ID/image-proxy/image-proxy:$TAG_NAME" \
36-
--region="us-central1" \
37-
--platform="managed" \
38-
--quiet \
39-
--set-env-vars HMAC_KEY_ID="projects/$PROJECT_ID/locations/us-central1/keyRings/image-proxy-key-ring/cryptoKeys/image-proxy-mac-key/cryptoKeyVersions/1" \
40-
--service-account="image-proxy@$PROJECT_ID.iam.gserviceaccount.com"
4149
env:
4250
- 'PROJECT_ID=$PROJECT_ID'
4351
- 'TAG_NAME=$TAG_NAME'

0 commit comments

Comments
 (0)