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

Replace "-" in port labels with "_" for env vars #2406

Merged
merged 3 commits into from
Mar 7, 2017

Conversation

schmichael
Copy link
Member

Fixes #2405

Copy link
Contributor

@dadgar dadgar left a comment

Choose a reason for hiding this comment

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

Website documentation

@@ -147,6 +147,8 @@ func (t *TaskEnvironment) Build() *TaskEnvironment {
// Build the ports
for _, network := range t.Networks {
for label, value := range network.MapLabelToValues(nil) {
// Replace dashes with underscores #2405
label = strings.Replace(label, "-", "_", -1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would just move this to the bottom and go through all keys and sanitize them.

</table>

Port labels and task names will have any dashes `-` in their names replaced by
Copy link
Contributor

Choose a reason for hiding this comment

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

~> Port labels and task names will have any dashes `-` in their names replaced by
underscores `_` when they're used in environment variable names such as
`NOMAD_ADDR_<task>_<label>`.

This will make it a popped out bubble to draw attention. See yellow box: https://www.consul.io/docs/guides/outage.html

Up to you to include.

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants