Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions manifests/kcover/values.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"agent": {
"type": "object",
"properties": {
"flavor": {
"type": "string",
"enum": [
"base",
"metax"
],
"default": "base"
}
}
}
}
Comment on lines +4 to +18

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current schema only validates the agent.flavor property. To make the schema validation more robust and prevent configuration errors, it is highly recommended to expand the schema to cover other critical properties defined in values.yaml, such as global.imageRegistry and controller.replicas (which should be a positive integer).

  "properties": {
    "global": {
      "type": "object",
      "properties": {
        "imageRegistry": {
          "type": "string"
        }
      }
    },
    "agent": {
      "type": "object",
      "properties": {
        "flavor": {
          "type": "string",
          "enum": [
            "base",
            "metax"
          ],
          "default": "base"
        }
      }
    },
    "controller": {
      "type": "object",
      "properties": {
        "replicas": {
          "type": "integer",
          "minimum": 1
        }
      }
    }
  }

}