{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "image": {
      "type": "object",
      "properties": {
        "repository": {
          "type": "string",
          "description": "Container image repository"
        },
        "pullPolicy": {
          "type": "string",
          "enum": ["Always", "IfNotPresent", "Never"],
          "description": "Image pull policy"
        },
        "tag": {
          "type": "string",
          "description": "Image tag (defaults to chart appVersion)"
        }
      },
      "required": ["repository", "pullPolicy"]
    },
    "imagePullSecrets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      }
    },
    "serviceAccount": {
      "type": "object",
      "properties": {
        "create": {
          "type": "boolean"
        },
        "annotations": {
          "type": "object"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "rbac": {
      "type": "object",
      "properties": {
        "create": {
          "type": "boolean"
        }
      }
    },
    "config": {
      "type": "object",
      "properties": {
        "kubeletEndpoint": {
          "type": "string",
          "pattern": "^https?://.*",
          "description": "Kubelet endpoint URL"
        },
        "metricsPort": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535,
          "description": "Port to expose Prometheus metrics"
        },
        "scrapeInterval": {
          "type": "string",
          "pattern": "^[0-9]+(s|m|h)$",
          "description": "Interval to scrape kubelet stats"
        },
        "insecureSkipTLSVerify": {
          "type": "boolean",
          "description": "Skip TLS certificate verification"
        },
        "tokenPath": {
          "type": "string",
          "description": "Path to service account token"
        }
      },
      "required": ["kubeletEndpoint", "metricsPort", "scrapeInterval"]
    },
    "resources": {
      "type": "object",
      "properties": {
        "limits": {
          "type": "object",
          "properties": {
            "cpu": {
              "type": "string"
            },
            "memory": {
              "type": "string"
            }
          }
        },
        "requests": {
          "type": "object",
          "properties": {
            "cpu": {
              "type": "string"
            },
            "memory": {
              "type": "string"
            }
          }
        }
      }
    },
    "nodeSelector": {
      "type": "object"
    },
    "tolerations": {
      "type": "array"
    },
    "affinity": {
      "type": "object"
    },
    "serviceMonitor": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "interval": {
          "type": "string",
          "pattern": "^[0-9]+(s|m|h)$"
        }
      }
    }
  }
}

