[main] provisioning cluster: remove carriage returns from agentEnvVars values - #1789
Open
vardhaman22 wants to merge 3 commits into
Open
[main] provisioning cluster: remove carriage returns from agentEnvVars values#1789vardhaman22 wants to merge 3 commits into
vardhaman22 wants to merge 3 commits into
Conversation
…s in mutating webhook
vardhaman22
force-pushed
the
fix-provisioning-cluster-agent-env-vars
branch
from
August 18, 2026 16:15
25e058b to
a912a74
Compare
vardhaman22
marked this pull request as ready for review
August 18, 2026 16:38
crobby
approved these changes
Aug 18, 2026
HarrisonWAffel
requested changes
Aug 18, 2026
Author
kept the behavior same except the line endings since the issue was reported explicitly for the line endings. |
HarrisonWAffel
approved these changes
Aug 19, 2026
crobby
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
rancher/rancher#50213
Problem
When configuring a provisioning cluster's agent environment variables from a file on UI, values containing DOS/Windows line endings (\r\n) retain the trailing carriage return.
These carriage returns are propagated to the generated node registration command, resulting in malformed environment variable values
Solution
Update the provisioning cluster mutating webhook to normalize agentEnvVars values during Create and Update operations.
The normalization removes trailing carriage return (\r) and newline (\n) characters while preserving any newline characters within the value.
CheckList