feat(linux): refactor secure-tls-bootstrap.service to use default file and conditionally set AZURE_ENVIRONMENT_FILEPATH#8456
Merged
Conversation
…le and conditionally set AZURE_ENVIRONMENT_FILEPATH
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Linux secure TLS bootstrapping systemd drop-in generation to use a dedicated default environment file (mirroring kubelet’s /etc/default pattern), and conditionally injects AZURE_ENVIRONMENT_FILEPATH when it is set to support stack/custom cloud endpoint resolution.
Changes:
- Write
/etc/default/secure-tls-bootstrapcontainingBOOTSTRAP_FLAGS=..., and optionallyAZURE_ENVIRONMENT_FILEPATH=.... - Update the
secure-tls-bootstrapsystemd drop-in to reference the new file viaEnvironmentFile=...instead of embeddingEnvironment="BOOTSTRAP_FLAGS=...". - Extend ShellSpec coverage to validate both the default-file creation and the conditional
AZURE_ENVIRONMENT_FILEPATHbehavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
parts/linux/cloud-init/artifacts/cse_config.sh |
Creates /etc/default/secure-tls-bootstrap and switches the secure TLS bootstrapping drop-in to EnvironmentFile=/etc/default/secure-tls-bootstrap. |
spec/parts/linux/cloud-init/artifacts/cse_config_spec.sh |
Updates/expands unit tests to assert the new default file contents and conditional AZURE_ENVIRONMENT_FILEPATH inclusion. |
djsly
approved these changes
May 5, 2026
awesomenix
approved these changes
May 6, 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.
What this PR does / why we need it:
refactors secure TLS bootstrapping unit to use a default file, similar to kubelet, for environment variable configuration - this allows us to easily specify the AZURE_ENVIRONMENT_FILEPATH environment variable when needed (stack clouds), such that the secure TLS bootstrapping client can correctly resolve in-cloud Entra ID endpoints for service principal token acquisition
Which issue(s) this PR fixes:
Fixes #