Skip to content

Commit

Permalink
fix(issue-230): adding in startupProb to sidecar (#234)
Browse files Browse the repository at this point in the history
* fix: adding in startupProb to sidecar

* test: added debug log

* test: leave run container to debug

* refactor: updating limit to 2 with addition with startup probe, additional log displays before actual expected service

* refactor: clean up
  • Loading branch information
pattishin committed Feb 23, 2024
1 parent fa2a2f3 commit f5d1e8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions multi-container/hello-nginx-sample/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ spec:
limits:
cpu: 1000m
memory: 512Mi
startupProbe:
timeoutSeconds: 240
periodSeconds: 240
failureThreshold: 1
tcpSocket:
port: 8888
# [END cloudrun_mc_hello_sidecar_step_sidecar]
# Named volume pointing to
# nginx_config secret in secret manager
Expand Down
2 changes: 1 addition & 1 deletion multi-container/hello-nginx-sample/tests/e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ then
fi

# Check Cloud Run MC logs for signs of successful request to hello container.
MC_HELLO_LOG=$(gcloud logging read "resource.type=cloud_run_revision AND resource.labels.service_name=${MC_SERVICE_NAME} AND labels.container_name=hello" --limit 1 | grep -e 'Hello from Cloud Run')
MC_HELLO_LOG=$(gcloud logging read "resource.type=cloud_run_revision AND resource.labels.service_name=${MC_SERVICE_NAME} AND labels.container_name=hello" --limit 2 | grep -e 'Hello from Cloud Run')

if [[ -z "${MC_HELLO_LOG}" ]]
then
Expand Down

0 comments on commit f5d1e8f

Please sign in to comment.