fix(common): correct JSON schema primitive type definitions#44935
Merged
Crow-Control merged 6 commits intocommon2026from Feb 14, 2026
Merged
fix(common): correct JSON schema primitive type definitions#44935Crow-Control merged 6 commits intocommon2026from
Crow-Control merged 6 commits intocommon2026from
Conversation
13 tasks
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
…r, rbac, serviceAccount Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove env-list support and improve network policy
fix(common): correct JSON schema primitive type definitions
Feb 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes a critical JSON schema validation issue in the common library chart where primitive types (boolean, string, integer, array) were incorrectly defined as "type": "object" with empty properties and additionalProperties: true. This caused helm lint validation failures across 797 stable charts.
Changes:
- Corrected primitive type definitions across 9 schema files (persistence, service, workload, rbac, serviceAccount, configmap, secret, operator, hostNetwork)
- Changed boolean fields from object to
"type": "boolean"(e.g., enabled, primary, readOnly) - Changed string fields from object to
"type": "string"(e.g., mountPath, hostPath, type, imageSelector) - Changed integer fields from object to
"type": "integer"(e.g., port, targetPort, runAsUser, runAsGroup) - Changed port fields to
"type": ["integer", "string"]to support both numeric ports and Helm template strings - Changed command/args fields to use
oneOfpattern supporting both string and array types - Changed collection fields from object to proper array types (e.g., rules, envFrom, items)
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| charts/library/common/test_output.txt | New file documenting the validation error that this PR fixes (showing errors before the fix) |
| charts/library/common/schemas/workload.json | Fixed 50+ primitive type definitions including container fields (enabled, primary, imageSelector), security context (runAsUser, runAsGroup, privileged, etc.), probe ports (integer|string), command/args (string|array via oneOf), envFrom (array), and podSpec fields (hostNetwork, terminationGracePeriodSeconds, etc.) |
| charts/library/common/schemas/serviceAccount.json | Fixed enabled, primary, and targetSelectAll from object to boolean |
| charts/library/common/schemas/service.json | Fixed enabled, type, targetSelector to proper types; fixed port fields (port, targetPort, nodePort, hostPort) from object to integer; fixed protocol to string |
| charts/library/common/schemas/secret.json | Fixed enabled from object to boolean, type from object to string |
| charts/library/common/schemas/rbac.json | Fixed enabled, primary, clusterWide, allServiceAccounts to boolean; changed rules from object to array with items; changed rules array fields (apiGroups, resources, resourceNames, verbs) from object to array |
| charts/library/common/schemas/persistence.json | Fixed 15+ fields including enabled/readOnly/targetSelectAll (boolean), size/hostPath/mountPath/medium (string), items (array), and targetSelector mounts (string/boolean) |
| charts/library/common/schemas/operator.json | Fixed enabled and register from object to boolean |
| charts/library/common/schemas/hostNetwork.json | Fixed root type from object to boolean |
| charts/library/common/schemas/configmap.json | Fixed enabled from object to boolean |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Crow-Control
added a commit
that referenced
this pull request
Feb 14, 2026
The common chart JSON schemas incorrectly defined primitive types
(boolean, string, integer) as `"type": "object"`, causing helm lint
validation failures across 797 stable charts.
## Changes
### Schema Type Corrections
- **persistence.json**: Fixed 20+ fields including `enabled` (boolean),
`mountPath` (string), `items` (array), `size`/`hostPath` (string)
- **service.json**: Fixed `enabled` (boolean), `port`/`targetPort`
(integer), `type`/`targetSelector` (string)
- **workload.json**: Fixed container fields (`enabled`/`primary` →
boolean, `imageSelector` → string), podSpec fields
(`hostNetwork`/`terminationGracePeriodSeconds` → boolean/integer), probe
`port` → `["integer", "string"]`, `envFrom` → array, `args`/`command` →
string|array
- **rbac.json**: Fixed
`enabled`/`primary`/`clusterWide`/`allServiceAccounts` → boolean,
`rules` → array
- **serviceAccount.json**: Fixed `enabled`/`primary`/`targetSelectAll` →
boolean
- **configmap.json**, **secret.json**, **operator.json**: Fixed
`enabled` → boolean
- **hostNetwork.json**: Fixed root type → boolean
### Example Fix
```json
// Before
"enabled": {
"type": "object",
"properties": {},
"additionalProperties": true
}
// After
"enabled": {
"type": "boolean"
}
```
## Impact
- **Before**: Validation failures across most charts
- **After**: 755/797 charts passing (94.7%)
- **Remaining failures**: 42 charts with Helm template strings (e.g.,
`"{{ .Values.x }}"`) in typed fields - valid Helm usage, not schema bugs
## Testing
Validated with `python3 test_schema.py` against all stable charts.
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Crow-Control
added a commit
that referenced
this pull request
Feb 15, 2026
The common chart JSON schemas incorrectly defined primitive types
(boolean, string, integer) as `"type": "object"`, causing helm lint
validation failures across 797 stable charts.
## Changes
### Schema Type Corrections
- **persistence.json**: Fixed 20+ fields including `enabled` (boolean),
`mountPath` (string), `items` (array), `size`/`hostPath` (string)
- **service.json**: Fixed `enabled` (boolean), `port`/`targetPort`
(integer), `type`/`targetSelector` (string)
- **workload.json**: Fixed container fields (`enabled`/`primary` →
boolean, `imageSelector` → string), podSpec fields
(`hostNetwork`/`terminationGracePeriodSeconds` → boolean/integer), probe
`port` → `["integer", "string"]`, `envFrom` → array, `args`/`command` →
string|array
- **rbac.json**: Fixed
`enabled`/`primary`/`clusterWide`/`allServiceAccounts` → boolean,
`rules` → array
- **serviceAccount.json**: Fixed `enabled`/`primary`/`targetSelectAll` →
boolean
- **configmap.json**, **secret.json**, **operator.json**: Fixed
`enabled` → boolean
- **hostNetwork.json**: Fixed root type → boolean
### Example Fix
```json
// Before
"enabled": {
"type": "object",
"properties": {},
"additionalProperties": true
}
// After
"enabled": {
"type": "boolean"
}
```
## Impact
- **Before**: Validation failures across most charts
- **After**: 755/797 charts passing (94.7%)
- **Remaining failures**: 42 charts with Helm template strings (e.g.,
`"{{ .Values.x }}"`) in typed fields - valid Helm usage, not schema bugs
## Testing
Validated with `python3 test_schema.py` against all stable charts.
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: PrivatePuffin <7613738+PrivatePuffin@users.noreply.github.com>
Contributor
|
This PR is locked to prevent necro-posting on closed PRs. Please create a issue or contact staff on discord if you want to further discuss this |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The common chart JSON schemas incorrectly defined primitive types (boolean, string, integer) as
"type": "object", causing helm lint validation failures across 797 stable charts.Changes
Schema Type Corrections
enabled(boolean),mountPath(string),items(array),size/hostPath(string)enabled(boolean),port/targetPort(integer),type/targetSelector(string)enabled/primary→ boolean,imageSelector→ string), podSpec fields (hostNetwork/terminationGracePeriodSeconds→ boolean/integer), probeport→["integer", "string"],envFrom→ array,args/command→ string|arrayenabled/primary/clusterWide/allServiceAccounts→ boolean,rules→ arrayenabled/primary/targetSelectAll→ booleanenabled→ booleanExample Fix
Impact
"{{ .Values.x }}") in typed fields - valid Helm usage, not schema bugsTesting
Validated with
python3 test_schema.pyagainst all stable charts.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.