Skip to content

Commit

Permalink
feat(cloudconfig): support multi container configuration
Browse files Browse the repository at this point in the history
Cloud Run now supports multi container deployments (up to 10 per instance).

With this change, sidecar container defined environment variables are not set for the ingress container.

Official docs: https://cloud.google.com/run/docs/deploying\#multicontainer-yaml
  • Loading branch information
andersastrom committed Apr 22, 2024
1 parent 24ae304 commit acbe621
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudconfig/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func setEnvFromYAMLServiceSpecificationFile(name string) (err error) {
return err
}
containers := config.Spec.Template.Spec.Containers
if len(containers) != 1 {
if len(containers) == 0 || len(containers) > 10 {
return fmt.Errorf("unexpected number of containers: %d", len(containers))
}
if config.Metadata.Name != "" {
Expand Down Expand Up @@ -81,7 +81,7 @@ func setEnvFromYAMLServiceSpecificationFile(name string) (err error) {
return err
}
containers := config.Spec.Template.Spec.Template.Spec.Containers
if len(containers) != 1 {
if len(containers) == 0 || len(containers) > 10 {
return fmt.Errorf("unexpected number of containers: %d", len(containers))
}
if config.Metadata.Name != "" {
Expand Down

0 comments on commit acbe621

Please sign in to comment.