feat(carvel): support structured BOSH variable declarations in base.yml - #664
Merged
Conversation
Changes Variables []string to []proofing.Variable in both Metadata structs. Adds validateVariables() to baker.go to catch missing name/type at bake time. Covers with 4 Ginkgo specs. TNZ-112157 Co-authored-by: Cursor <cursoragent@cursor.com>
…overage Updates testdata/sample-tile/base.yml from variables: [] to a real certificate variable declaration, and updates the "populates the output metadata" integration test to assert the variable is preserved through the bake process. TNZ-112157 Co-authored-by: Cursor <cursoragent@cursor.com>
davewalter
reviewed
Jun 19, 2026
…ations - Fix indentation of Variables[0] assertions to match surrounding 5-tab style - Add Options assertions (common_name, is_ca) to verify round-trip fidelity of the full variable definition including nested options block - Refactor validateVariables to use errors.Join so all malformed entries are reported in a single error instead of failing on the first one - Fix pre-existing AfterEach indentation so gofmt is clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
davewalter
approved these changes
Jun 19, 2026
drich10
added a commit
that referenced
this pull request
Jun 22, 2026
…dateVariables Both branches added code after the progress() function: the PR branch added boshLinkConsumer/jobSpecOverlay types; main added validateVariables (from #664). Include both blocks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Variables []string→Variables []proofing.Variableininternal/carvel/models/metadata.goandmetadata_out.govalidateVariables()tobaker.go— returns a clear error if a variable entry is missingnameortypetestdata/sample-tile/base.ymlfor integration round-trip coverageMotivation
Carvel tile authors need to declare BOSH CredHub variable definitions (e.g., certificate CA hierarchies) inline in
base.yml. The previous[]stringtype rejected structured map entries with a YAML unmarshal error:Discovered while building the EAR-K8s tile's Diego Instance Identity CA support. The EAR-K8s tile mirrors the TAS IST tile's pattern of declaring
diego-instance-identity-intermediate-ca-2-7as a BOSH CredHub certificate variable so BOSH manages the CA lifecycle automatically.Why
proofing.Variable?pkg/proofingalready models this shape (name,type,options any). Reusing it avoids duplicating the struct. The import direction (internal/carvel→pkg/proofing) is valid — no circular dependency.Test Plan
go test ./internal/carvel/... --ginkgo.focus="validateVariables"— 4 new unit specs passgo test ./internal/carvel/...— 36/36 specs pass, including integration round-trip for structured variablesgo build ./internal/carvel/...— clean buildRelated
TNZ-112157
Made with Cursor