Skip to content

docs: CustomData size guard design for hotfix PRs - #9181

Closed
Abigail Liang (abigailliang-aks-sig-node) wants to merge 1 commit into
mainfrom
abigailliang/customdata-size-guard-design
Closed

docs: CustomData size guard design for hotfix PRs#9181
Abigail Liang (abigailliang-aks-sig-node) wants to merge 1 commit into
mainfrom
abigailliang/customdata-size-guard-design

Conversation

@abigailliang-aks-sig-node

Copy link
Copy Markdown
Contributor

Summary

  • Design doc for pre-deployment validation/guardrail on CustomData size
  • Two guards: (1) H vs 87,380 CustomData limit, (2) R vs 65,535 protectedSettings limit
  • Proposed CI step in hotfix-generate.yml to fail hotfix PRs that would exceed limits

Context

This is a bridge solution until PR #9101 (embed hotfix scripts in ANC binary) lands.

Test plan

  • Nishchay review design
  • Implement Go test after design approval

Design doc for pre-deployment validation of CustomData and
protectedSettings size limits during hotfix injection.
@github-actions

Copy link
Copy Markdown
Contributor

PR Title Lint Failed ❌

Current Title: docs: CustomData size guard design for hotfix PRs

Your PR title doesn't follow the expected format. Please update your PR title to follow one of these patterns:

Conventional Commits Format:

  • feat: add new feature - for new features
  • fix: resolve bug in component - for bug fixes
  • docs: update README - for documentation changes
  • refactor: improve code structure - for refactoring
  • test: add unit tests - for test additions
  • chore: remove dead code - for maintenance tasks
  • chore(deps): update dependencies - for updating dependencies
  • ci: update build pipeline - for CI/CD changes

Guidelines:

  • Use lowercase for the type and description
  • Keep the description concise but descriptive
  • Use imperative mood (e.g., "add" not "adds" or "added")
  • Don't end with a period

Examples:

  • feat(windows): add secure TLS bootstrapping for Windows nodes
  • fix: resolve kubelet certificate rotation issue
  • docs: update installation guide
  • Added new feature
  • Fix bug.
  • Update docs

Please update your PR title and the lint check will run again automatically.

@abigailliang-aks-sig-node

Copy link
Copy Markdown
Contributor Author

Superseded — reopening from the branch that includes the full implementation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a design document describing a proposed CI guardrail to prevent Linux hotfix PRs from causing VMSS CustomData/protectedSettings size overflows during provisioning, as an interim solution until hotfix scripts are embedded in aks-node-controller (#9101).

Changes:

  • Introduces a design doc explaining the CustomData (87,380 base64 bytes) and protectedSettings (~65,535 bytes) constraints and why both must be guarded independently.
  • Documents a proposed approach (Go tests + CI wiring) to validate worst-case sizes after hotfix generation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +103 to +107
## 5. Two Guards (Implemented)

Investigation of the Mode B fallback revealed that **H and R end up in different Azure fields**, so a single CustomData check is insufficient. Two independent guards are implemented in
`pkg/agent/customdata_size_guard_test.go` (plain `Test*` funcs so they run under `go test -run`).

Comment on lines +193 to +195
| `pkg/agent/baker.go:145-227` | `getLinuxNodeBootstrappingPayload` + `getScriptlessBoothook` |
| `pkg/agent/baker.go:29` | `MaxCustomDataLength = 87380` |
| `pkg/agent/const.go:105,122` | hotfix JSON file paths |
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