Commit 3fe5424
feat(common): Auto-generate complete-values-structure.yaml with objectname normalization (#44955)
Adds automated generation of `complete-values-structure.yaml` that
aggregates all chart configurations into a normalized reference
structure using placeholder values and `objectname` for variable-keyed
nested objects.
## Implementation
**Script:** `generate_complete_values_structure.py`
- Collects 841+ values.yaml files from stable/incubator charts and
common-test
- Merges into comprehensive structure showing all possible configuration
keys
- Preserves existing comments via ruamel.yaml (falls back to PyYAML with
warning)
- Applies normalization post-merge
**Normalization:**
- Variable-named keys → `objectname` placeholder
- String values → `""`
- Large numbers → `0` (preserves 0-100 as likely config values)
- Booleans → unchanged
- Lists → first element only (structure example)
**Parent keys with variable children:**
```python
PARENT_KEYS_WITH_VARIABLE_CHILDREN = {
'workload', 'service', 'persistence', 'configmap', 'secret',
'ingress', 'route', 'containers', 'initContainers', 'ports', 'hosts'
}
```
## Result
File reduced from 14k to 6.5k lines. Example structure:
```yaml
workload:
objectname: # replaces: main, backup, worker, etc.
enabled: true
type: ''
podSpec:
containers:
objectname: # replaces: main, sidecar, init, etc.
enabled: true
imageSelector: ''
service:
objectname: # replaces: main, api, metrics, etc.
enabled: true
ports:
objectname: # replaces: main, http, grpc, etc.
port: 0
protocol: ''
```
## Workflow Integration
Added to schema-validation job in `.github/workflows/common-tests.yaml`:
- Installs `ruamel.yaml` alongside PyYAML
- Runs before `test_schema.py`
- Comments persist across regenerations
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/trueforge-org/truecharts/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>1 parent 79426b8 commit 3fe5424
File tree
3 files changed
+6734
-1750
lines changed- .github/workflows
- charts/library/common
3 files changed
+6734
-1750
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
| |||
0 commit comments