-
Notifications
You must be signed in to change notification settings - Fork 39k
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
Added support for colon (':') in environment variable name #59599
Conversation
/sig windows |
@@ -302,7 +302,7 @@ func IsHTTPHeaderName(value string) []string { | |||
return nil | |||
} | |||
|
|||
const envVarNameFmt = "[-._a-zA-Z][-._a-zA-Z0-9]*" | |||
const envVarNameFmt = "[-:._a-zA-Z][-:._a-zA-Z0-9]*" | |||
const envVarNameFmtErrMsg string = "a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit" |
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.
can we also change the message to include the fact that we now support : ?
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.
Good catch! Updated.
/approve |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bsteciuk, michmike Assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these OWNERS Files:
Approvers can indicate their approval by writing |
/test pull-kubernetes-e2e-kops-aws |
@bsteciuk: you can't request testing unless you are a kubernetes member. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
NM - nobody in SIG-Windows meeting needed it for 1.9 |
/test pull-kubernetes-e2e-kops-aws |
@bsteciuk you're going to need to contact folks from the OWNERS files listed above and get approvals. |
/test all Tests are more than 96 hours old. Re-running tests. |
@bsteciuk: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
I don't think we should do this. In Linux ":" is a path separator and completely invalid to use in an environment variable name. In .NET Core you use "__" in place of ":" in order get the desired configuration functionality to work as documented
@kow3ns FWIW, the argument brought forward in #48986 to support relaxing the rules for dots and dashes was that the mentioned restrictions seemingly only apply to shell contexts; general application usages are supposed to be handled more liberally according to the standard (emphasis by me):
The referenced Portable Character Set lists the colon. See also the links I noted down in that PR's description. |
Closing due to response and ticket close of #53201, added docs PR to explain the issue and it's workaround kubernetes/website/pull/7657 . |
What this PR does / why we need it:
This PR adds support for including a colon
:
in environment variable names. A number of .Net applications/libraries use:
in their environment variable names.Which issue(s) this PR fixes:
Fixes #53201
Special notes for your reviewer:
Release note: