-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
I have a key in my values that is used to construct a Pydantic BaseModel for the python service that my Helm chart deploys. Due to some easy to miss mistakes in whitespace, I wanted helm template to be able to catch these.
My values.yaml has this key
# @schema
# $ref: config_schema.json
# @schema
# -- Config for the worker goes here, will be mounted into a config file
worker:
api:
# -- 0.0.0.0 required to allow non-loopback traffic
# If using hostNetwork, the port must be free on the host
url: http://0.0.0.0:8000/And config_schema.json has the following:
{
"$defs": {
"RestConfig": {
"additionalProperties": false,
"properties": {
"url": {
"default": "http://localhost:8000/",
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"title": "Url",
"type": "string"
}
},
"title": "RestConfig",
"type": "object"
},
},
"additionalProperties": false,
"description": "Config for the worker application as a whole. Root of\nconfig tree.",
"properties": {
"api": {
"$ref": "#/$defs/RestConfig"
}
},
"title": "ApplicationConfig",
"type": "object"
}But when my values.schema.json is generated:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"worker": {
"additionalProperties": false,
"description": "Config for the worker application as a whole. Root of\nconfig tree.",
"properties": {
"api": {
"$ref": "#/$defs/RestConfig",
"required": []
}
},
"required": [],
"title": "ApplicationConfig",
"type": "object"
}
},
"required": [],
"type": "object"
}$ helm template chart/
Error: values don't meet the specifications of the schema(s) in the following chart(s):
chart:
Object has no key '$defs'Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels