Skip to content

Validate the var names before substitution#291

Merged
stefanprodan merged 1 commit intomainfrom
var-validation
Mar 2, 2021
Merged

Validate the var names before substitution#291
stefanprodan merged 1 commit intomainfrom
var-validation

Conversation

@stefanprodan
Copy link
Copy Markdown
Member

The name of a variable used in post build substitutions can contain only alphanumeric and underscore characters. This PR implements validation for the variable names using ^[_[:alpha:]][_[:alpha:][:digit:]]*$ regex.

Fix: #290

@stefanprodan stefanprodan added enhancement New feature or request area/varsub Post-build variable substitution related issues and pull requests labels Feb 27, 2021
@stefanprodan stefanprodan requested a review from hiddeco February 27, 2021 10:06
@stefanprodan stefanprodan changed the title Validation the var names before substitution Validate the var names before substitution Feb 27, 2021
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Copy link
Copy Markdown
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @stefanprodan 💯

@stefanprodan stefanprodan merged commit ff38a3f into main Mar 2, 2021
@stefanprodan stefanprodan deleted the var-validation branch March 2, 2021 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/varsub Post-build variable substitution related issues and pull requests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Variable substitution failed: missing closing brace when using variable substitution in Kustomization

2 participants