fix: permit optional ports for sidecars so we can run sidecars#450
Open
bdashrad wants to merge 7 commits into
Open
fix: permit optional ports for sidecars so we can run sidecars#450bdashrad wants to merge 7 commits into
bdashrad wants to merge 7 commits into
Conversation
fix[sidecars]: Permit optional ports for sidecars.
bdashrad
requested review from
a team,
anamer,
ayushmjain,
krprabhat-eng,
prabhu34 and
q2w
as code owners
March 19, 2026 21:33
Author
|
@q2w @prabhu34 @krprabhat-eng @ayushmjain @anamer if you have a moment, could you take a look at this PR, or the prior one #381? We need this to run sidecar containers with the v2 module. I've been running it myself for a few weeks in the fork, but hoping to get it merged back to the main branch. |
Author
|
Hi, I'm looking to see if there is anything I can do to help make this easier to review or prepare for merging. |
Collaborator
|
/gcbrun |
Author
|
@amandakarina Thanks for looking. It seems like your |
Collaborator
|
/gcbrun |
3 tasks
robbiet480
added a commit
to CampusTech/fleet-terraform
that referenced
this pull request
May 29, 2026
Adds two inputs to the gcp module so callers can wire OpenTelemetry
collectors (or any other sidecar) into the fleet-api Cloud Run service:
- sidecar_containers: list of arbitrary sidecar containers to colocate
with Fleet. Lets users plug in DDOT, otelcol-contrib, Grafana Alloy,
or any other observability agent that exposes an OTLP receiver on a
localhost port.
- service_only_env_vars: extra env vars applied only to the Cloud Run
service but not the migration job. The migration job runs as a Cloud
Run Job without sidecars, so things like OTEL_EXPORTER_OTLP_ENDPOINT
would point to a nonexistent listener during job execution.
Behavior is unchanged when both inputs use their empty defaults —
existing deployments don't need to update tfvars.
The new addons/gcp/otel-sidecar addon emits the corresponding Fleet env
vars (FLEET_LOGGING_TRACING_ENABLED, OTEL_EXPORTER_OTLP_*, etc.) in a
{universal, service_only} split so callers route them correctly. It
doesn't ship a sidecar container itself; the README has copy-pasteable
examples for OpenTelemetry Collector contrib and Datadog DDOT.
Multi-container Cloud Run services depend on
GoogleCloudPlatform/cloud-run/google//modules/v2 accepting sidecars
without a ports block, tracked in
GoogleCloudPlatform/terraform-google-cloud-run#450. Until that lands
upstream, callers using sidecar_containers will hit "exactly one
container with an exposed port" — documented in the addon README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is another attempt at #381 to resolve #302.