-
Notifications
You must be signed in to change notification settings - Fork 207
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
Make GetNodeBootstrappingPayload return base64 encoded string. #412
Merged
yizhang4321
merged 6 commits into
Azure:master
from
yizhang4321:yizhang4321/ProvideNonARMTemplateCustomData
Oct 28, 2020
Merged
Make GetNodeBootstrappingPayload return base64 encoded string. #412
yizhang4321
merged 6 commits into
Azure:master
from
yizhang4321:yizhang4321/ProvideNonARMTemplateCustomData
Oct 28, 2020
Conversation
This file contains 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
… non-ARM case. Updated GetAgentKubernetesLabels and GetAgentKubernetesLabelsDeprecated in the function map to generate the resource group names themselves so they don't need to take it from the nodecustomdata.yml. This simplifies the logic for nodecustomdata.yml: we no longer need to "concat" substrings, which contains a variables('labelResourceGroup') in the middle. We can now directly take nodecustomdata.yaml as a string in our code.
xuto2
reviewed
Oct 27, 2020
xuto2
reviewed
Oct 27, 2020
xuto2
reviewed
Oct 27, 2020
Windows CSE isn't in AgentBaker yet, so the code there is not worling and isn't worth changing.
…m data. Because both non-ARM and ARM case use base64 encoding of the custom data, they can be unified into one.
yizhang4321
changed the title
Add a Get...PayloadNonARM that provides custom data for non-ARM case.
Make GetNodeBootstrappingPayload return base64 encoded string.
Oct 27, 2020
xuto2
reviewed
Oct 28, 2020
@@ -48,11 +51,11 @@ func (t *TemplateGenerator) getLinuxNodeCustomDataJSONObject(config *datamodel.N | |||
panic(e) | |||
} | |||
|
|||
return fmt.Sprintf("{\"customData\": \"[base64(concat('%s'))]\"}", str) | |||
return fmt.Sprintf("{\"customData\": \"%s\"}", str) |
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.
alternatively, we can do base64.StdEncoding.EncodeToString([]byte(str)) here and save the change from caller side.
…<= 62. This is for parity with aks-engine's value: [if(or(or(endsWith(variables('truncatedResourceGroup'), '-'), endsWith(variables('truncatedResourceGroup'), '_')), endsWith(variables('truncatedResourceGroup'), '.')), concat(take(variables('truncatedResourceGroup'), 62), 'z'), variables('truncatedResourceGroup'))] I converted that to code incorrectly before.
/lgtm |
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.
Updated GetAgentKubernetesLabels and GetAgentKubernetesLabelsDeprecated in the function map to generate the resource group names themselves so they don't need to take it from the nodecustomdata.yml. This simplifies the logic for nodecustomdata.yml: we no longer need to "concat" substrings, which contains a variables('labelResourceGroup') in the middle. We can now directly take nodecustomdata.yaml as a string in our code.