Currently, every time I deploy a new release using Cloud Deploy, my pods are restarted even if they don't have any changes. After some researching, I realized that pods are recreated because of skaffold.dev/run-id
label is updated on every release. In this issue, there's a workaround to solve the problem at Skaffold level, which is basically to set that label to any fixed value through environment variable SKAFFOLD_LABEL
, so I did something like:
export SKAFFOLD_LABEL="skaffold.dev/run-id=fixed"
gcloud deploy releases create $RELEASE_NAME \
--delivery-pipeline=$DELIVERY_PIPELINE_NAME \
--region=$LOCATION
However, this workaround doesn't seem to work with Cloud Deploy. How should I configure this Skaffold label to make it work using Cloud Deploy, or make Cloud deploy releases idempotent?