Skip to content

feat: add configuration support for secure TLS bootstrap client RPC timeouts#8261

Open
cameronmeissner wants to merge 6 commits intomainfrom
cameissner/stls-timeout-config
Open

feat: add configuration support for secure TLS bootstrap client RPC timeouts#8261
cameronmeissner wants to merge 6 commits intomainfrom
cameissner/stls-timeout-config

Conversation

@cameronmeissner
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Copilot AI review requested due to automatic review settings April 9, 2026 20:09
@cameronmeissner cameronmeissner changed the title Cameissner/stls timeout config feat: add configuration support for secure TLS bootstrap client RPC timeouts Apr 9, 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

Adds support for configuring secure TLS bootstrapping client timeouts via CSE variables, updating the Linux bootstrap scripts and Go template plumbing to pass new per-operation timeout flags (and treating the existing --deadline as deprecated/optional).

Changes:

  • Extend SecureTLSBootstrappingConfig with per-step timeout fields and add corresponding template funcs in baker.go.
  • Update Linux CSE templates/scripts to emit and consume new timeout env vars and append the new flags to BOOTSTRAP_FLAGS.
  • Update unit/spec tests to validate the new env vars/flags and adjust expectations around --deadline.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
spec/parts/linux/cloud-init/artifacts/cse_config_spec.sh Updates ShellSpec expectations for secure-tls-bootstrap drop-in content and adds new env vars for test coverage.
pkg/agent/datamodel/types.go Adds new secure TLS bootstrapping timeout fields + getters; marks Deadline deprecated.
pkg/agent/baker.go Plumbs new timeout getters into the CSE template function map.
pkg/agent/baker_test.go Adds a test asserting secure TLS bootstrapping vars are correctly emitted into the CSE command.
parts/linux/cloud-init/artifacts/cse_config.sh Appends new timeout flags when corresponding env vars are set; changes defaulting behavior for --deadline.
parts/linux/cloud-init/artifacts/cse_cmd.sh Adds new timeout variables to the generated CSE environment.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 9, 2026, 9:36 PM

Copilot AI review requested due to automatic review settings April 9, 2026 21:25
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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

@cameronmeissner cameronmeissner marked this pull request as ready for review April 10, 2026 23:36
Copilot AI review requested due to automatic review settings April 10, 2026 23:36
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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment on lines +1929 to +1943
func (c *SecureTLSBootstrappingConfig) GetGetAccessTokenTimeout() string {
if c == nil {
return ""
}
return c.GetAccessTokenTimeout
}

func (c *SecureTLSBootstrappingConfig) GetGetInstanceDataTimeout() string {
if c == nil {
return ""
}
return c.GetInstanceDataTimeout
}

func (c *SecureTLSBootstrappingConfig) GetGetNonceTimeout() string {
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The getter names GetGetAccessTokenTimeout, GetGetInstanceDataTimeout, etc. have a duplicated Get prefix and are the only GetGet* methods in this package. Renaming these to GetAccessTokenTimeout, GetInstanceDataTimeout, etc. would improve API clarity and avoid spreading this naming pattern to templates/callers.

Suggested change
func (c *SecureTLSBootstrappingConfig) GetGetAccessTokenTimeout() string {
if c == nil {
return ""
}
return c.GetAccessTokenTimeout
}
func (c *SecureTLSBootstrappingConfig) GetGetInstanceDataTimeout() string {
if c == nil {
return ""
}
return c.GetInstanceDataTimeout
}
func (c *SecureTLSBootstrappingConfig) GetGetNonceTimeout() string {
func (c *SecureTLSBootstrappingConfig) GetAccessTokenTimeout() string {
if c == nil {
return ""
}
return c.GetAccessTokenTimeout
}
func (c *SecureTLSBootstrappingConfig) GetInstanceDataTimeout() string {
if c == nil {
return ""
}
return c.GetInstanceDataTimeout
}
func (c *SecureTLSBootstrappingConfig) GetNonceTimeout() string {

Copilot uses AI. Check for mistakes.
"SECURE_TLS_BOOTSTRAPPING_GET_ATTESTED_DATA_TIMEOUT": config.GetBootstrappingConfig().GetSecureTlsBootstrappingGetAttestedDataTimeout(),
"SECURE_TLS_BOOTSTRAPPING_GET_CREDENTIAL_TIMEOUT": config.GetBootstrappingConfig().GetSecureTlsBootstrappingGetCredentialTimeout(),
"SECURE_TLS_BOOTSTRAPPING_DEADLINE": config.GetBootstrappingConfig().GetSecureTlsBootstrappingDeadline(),
"CUSTOM_SECURE_TLS_BOOTSTRAPPING_CLIENT_URL": config.GetBootstrappingConfig().GetSecureTlsBootstrappingCustomClientDownloadUrl(),
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

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

The env var key CUSTOM_SECURE_TLS_BOOTSTRAPPING_CLIENT_URL does not match the variable name used by the provisioning scripts (CUSTOM_SECURE_TLS_BOOTSTRAPPING_CLIENT_DOWNLOAD_URL in parts/linux/cloud-init/artifacts/cse_install.sh / cse_cmd.sh). As a result, when bootstrapping via aks-node-controller, a configured custom secure TLS bootstrap client download URL will not be picked up by the scripts. Align the env var name with what the scripts actually consume.

Suggested change
"CUSTOM_SECURE_TLS_BOOTSTRAPPING_CLIENT_URL": config.GetBootstrappingConfig().GetSecureTlsBootstrappingCustomClientDownloadUrl(),
"CUSTOM_SECURE_TLS_BOOTSTRAPPING_CLIENT_DOWNLOAD_URL": config.GetBootstrappingConfig().GetSecureTlsBootstrappingCustomClientDownloadUrl(),

Copilot uses AI. Check for mistakes.
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.

2 participants