Skip to content

Commit

Permalink
feat: introduce minimal chart values schema to catch structural changes
Browse files Browse the repository at this point in the history
This introduces a minimal values.schema.json file to catch the
breaking structural changes made to the values.yaml file in the
related commits to this PR.

This will cause the 'helm template' or 'helm lint' commands
to throw errors and require consumers of the chart to fix
their values.yaml before deploying.
  • Loading branch information
rbjorklin committed Mar 8, 2025
1 parent a994de2 commit 6b5fd3a
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions hack/charts/cluster-api-operator/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {
"nameNamespaceVersion": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"namespace": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": ["name"]
}
},
"properties": {
"core": {
"$ref": "#/definitions/nameNamespaceVersion"
},
"bootstrap": {
"type": "array",
"items": {
"$ref": "#/definitions/nameNamespaceVersion"
}
},
"controlPlane": {
"type": "array",
"items": {
"$ref": "#/definitions/nameNamespaceVersion"
}
},
"infrastructure": {
"type": "array",
"items": {
"$ref": "#/definitions/nameNamespaceVersion"
}
},
"addon": {
"type": "array",
"items": {
"$ref": "#/definitions/nameNamespaceVersion"
}
},
"ipam": {
"type": "array",
"items": {
"$ref": "#/definitions/nameNamespaceVersion"
}
}
}
}

0 comments on commit 6b5fd3a

Please sign in to comment.