Skip to content

feat(linux): refactor secure-tls-bootstrap.service to use default file and conditionally set AZURE_ENVIRONMENT_FILEPATH#8456

Merged
cameronmeissner merged 1 commit into
mainfrom
cameissner/stls-stack-support
May 6, 2026
Merged

feat(linux): refactor secure-tls-bootstrap.service to use default file and conditionally set AZURE_ENVIRONMENT_FILEPATH#8456
cameronmeissner merged 1 commit into
mainfrom
cameissner/stls-stack-support

Conversation

@cameronmeissner
Copy link
Copy Markdown
Contributor

@cameronmeissner cameronmeissner commented May 5, 2026

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 #

…le and conditionally set AZURE_ENVIRONMENT_FILEPATH
Copilot AI review requested due to automatic review settings May 5, 2026 23:31
@cameronmeissner cameronmeissner changed the title feat(linux): refactor secure TLS bootstrapping unit to use default file and conditionally set AZURE_ENVIRONMENT_FILEPATH feat(linux): refactor secure-tls-bootstrap.service to use default file and conditionally set AZURE_ENVIRONMENT_FILEPATH May 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-bootstrap containing BOOTSTRAP_FLAGS=..., and optionally AZURE_ENVIRONMENT_FILEPATH=....
  • Update the secure-tls-bootstrap systemd drop-in to reference the new file via EnvironmentFile=... instead of embedding Environment="BOOTSTRAP_FLAGS=...".
  • Extend ShellSpec coverage to validate both the default-file creation and the conditional AZURE_ENVIRONMENT_FILEPATH behavior.

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.

@cameronmeissner cameronmeissner merged commit f4d69a4 into main May 6, 2026
37 checks passed
@cameronmeissner cameronmeissner deleted the cameissner/stls-stack-support branch May 6, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants