Skip to content

Commit

Permalink
followup to allow special characters
Browse files Browse the repository at this point in the history
Kubernetes-commit: 2867be47b3162109391b4b2ae4f70f43e4c8fb34
  • Loading branch information
HirazawaUi authored and k8s-publishing-bot committed Mar 7, 2024
1 parent 25164f7 commit 0407311
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/util/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ 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"

// TODO(hirazawaui): Rename this when the RelaxedEnvironmentVariableValidation gate is removed.
const relaxedEnvVarNameFmtErrMsg string = "a valid environment variable names must be printable ASCII characters other than '=' character"
const relaxedEnvVarNameFmtErrMsg string = "a valid environment variable name must consist only of printable ASCII characters other than '='"

var envVarNameRegexp = regexp.MustCompile("^" + envVarNameFmt + "$")

Expand All @@ -440,7 +440,7 @@ func IsRelaxedEnvVarName(value string) []string {
var errs []string

if len(value) == 0 {
errs = append(errs, "environment variable name"+EmptyError())
errs = append(errs, "environment variable name "+EmptyError())
}

for _, r := range value {
Expand Down

0 comments on commit 0407311

Please sign in to comment.