You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(carvel): support structured BOSH variable declarations in base.yml (#664)
## Summary
- Changes `Variables []string` → `Variables []proofing.Variable` in
`internal/carvel/models/metadata.go` and `metadata_out.go`
- Adds `validateVariables()` to `baker.go` — returns a clear error if a
variable entry is missing `name` or `type`
- Covers with 4 new Ginkgo unit specs + updates
`testdata/sample-tile/base.yml` for integration round-trip coverage
## Motivation
Carvel tile authors need to declare BOSH CredHub variable definitions
(e.g., certificate CA hierarchies) inline in `base.yml`. The previous
`[]string` type rejected structured map entries with a YAML unmarshal
error:
```
yaml: unmarshal errors:
line 34: cannot unmarshal !!map into string
```
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-7` as a BOSH
CredHub certificate variable so BOSH manages the CA lifecycle
automatically.
## Why `proofing.Variable`?
`pkg/proofing` already 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
- [x] `go test ./internal/carvel/... --ginkgo.focus="validateVariables"`
— 4 new unit specs pass
- [x] `go test ./internal/carvel/...` — 36/36 specs pass, including
integration round-trip for structured variables
- [x] `go build ./internal/carvel/...` — clean build
## Related
TNZ-112157
Made with [Cursor](https://cursor.com)
0 commit comments