Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(issue-230): adding in startupProb to sidecar #234

Merged
merged 5 commits into from
Feb 23, 2024
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
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')
Copy link
Contributor Author

@pattishin pattishin Feb 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: In tests/e2e-test.sh, updated result limit to 2 to accomodate new startup tcp probe logs now displaying before expected service.

Logs:

  • textPayload: STARTUP TCP probe succeeded after 1 attempt for container "hello" on port 8888.
  • textPayload: 2024/02/2- --:--:-- Hello from Cloud Run! The container started successfully and is listening for HTTP requests on $PORT


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