-
Notifications
You must be signed in to change notification settings - Fork 136
fix: Permit optional ports for sidecars so we can run sidecars #381
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
base: main
Are you sure you want to change the base?
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
49ef3ce to
54996c8
Compare
bharathkkb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @atrull
Could an alternative be to explicitly specify ports = {} for the other containers?
| ports = optional(object({ | ||
| name = optional(string, "http1") | ||
| container_port = optional(number, 8080) | ||
| name = optional(string) | ||
| container_port = optional(number) | ||
| }), {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@q2w PTAL due to default change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could an alternative be to explicitly specify ports = {} for the other containers?
I believe ports = {} then just defaults back to "http1" and 8080, if the default values are kept in variables.tf.
I do not believe optional with a fallback value can be used in any solution of this issue. Any default/fallback values must be set by you re-implementing a fallback inside the main.tf, because this optional does not give you a mechanism to know if the user supplied any value or not; meaning it will always be http1 or a user-specified non-empty value, never empty.
| ports = optional(object({ | ||
| name = optional(string, "http1") | ||
| container_port = optional(number, 8080) | ||
| name = optional(string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What name for the port is used if users doesn't define name but only configures container_port
This may close issue #302