Files
cozystack/packages/apps/kafka/values.schema.json
Timofei Larkin 06b41da030 feat(apps): declare the Kubernetes and Kafka name caps in their charts
Both caps are facts about what each chart renders, and nothing outside
the chart can derive them. Every Kubernetes worker pool is a separate
KubernetesNodes release named kubernetes-nodes-<name>-<pool>, so a
cluster name has to leave room for the default md0 pool inside the
53-character Helm release name limit: 32 characters. A Kafka KRaft
controller pod is named kafka-<name>-c-<hash>-<id> with an 8-character
hash, and that hostname has to fit the 63-character DNS-1123 label
limit: 44 characters.

Each chart now states its cap with a @name annotation, which
cozyvalues-gen v1.7.0 publishes as x-cozystack-name in
values.schema.json and hack/update-crd.sh carries into the
ApplicationDefinition. The pre-commit job moves to that release, the
first that understands the annotation.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-09-23 10:59:51 +03:00

216 lines
7.0 KiB
JSON

{
"title": "Chart Values",
"type": "object",
"x-cozystack-name": {
"type": "string",
"description": "Kafka cluster name. The KRaft controller pods are named `kafka-\u003cname\u003e-c-\u003chash\u003e-\u003cid\u003e` with an 8-character hash, and that pod hostname must fit the 63-character DNS-1123 label limit even for the smallest cluster.",
"maxLength": 44
},
"properties": {
"external": {
"description": "Enable external access from outside the cluster.",
"type": "boolean",
"default": false
},
"tls": {
"description": "TLS configuration. Strimzi manages the cluster PKI automatically (no cert-manager is involved for this chart): the operator auto-creates `\u003crelease\u003e-cluster-ca-cert` and `\u003crelease\u003e-clients-ca-cert` secrets, both exposed for client trust setup. The internal TLS listener on 9093 is always on; this toggle only controls the external listener on 9094.",
"type": "object",
"default": {},
"properties": {
"enabled": {
"description": "Enable TLS on the external listener. When unset, inherits the value of `external` (TLS is on when external access is enabled). Warning: setting this to false while external is true exposes Kafka over plaintext on a public IP via LoadBalancer. Strimzi does not provide authentication on this listener unless SCRAM, mTLS, or OAuth is separately configured. Use only in controlled networks.",
"type": "boolean"
}
}
},
"version": {
"description": "Kafka version to deploy. Upgrade-only: once a cluster's KRaft metadata is at a given version, Strimzi refuses an in-place downgrade, so lowering this on a running cluster (e.g. v3.9 back to v3.8) leaves the Kafka CR stuck in a reconcile error. Pick the target version at creation and only ever raise it.",
"type": "string",
"default": "v3.9",
"enum": [
"v3.9",
"v3.8"
]
},
"topics": {
"description": "Topics configuration.",
"type": "array",
"default": [],
"items": {
"type": "object",
"required": [
"name",
"partitions",
"replicas"
],
"properties": {
"config": {
"description": "Topic configuration.",
"type": "object",
"x-kubernetes-preserve-unknown-fields": true
},
"name": {
"description": "Topic name.",
"type": "string"
},
"partitions": {
"description": "Number of partitions.",
"type": "integer"
},
"replicas": {
"description": "Number of replicas.",
"type": "integer"
}
}
}
},
"kafka": {
"description": "Kafka configuration.",
"type": "object",
"default": {},
"required": [
"replicas",
"resourcesPreset",
"size",
"storageClass"
],
"properties": {
"controllerStorageSize": {
"description": "Persistent Volume size for KRaft controller metadata (used during ZK-to-KRaft migration).",
"default": "5Gi",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
},
"replicas": {
"description": "Number of Kafka replicas.",
"type": "integer",
"default": 3
},
"resources": {
"description": "Explicit CPU and memory configuration. When omitted, the preset defined in `resourcesPreset` is applied.",
"type": "object",
"default": {},
"properties": {
"cpu": {
"description": "CPU available to each replica.",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
},
"memory": {
"description": "Memory (RAM) available to each replica.",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
}
}
},
"resourcesPreset": {
"description": "Default sizing preset used when `resources` is omitted.",
"type": "string",
"default": "c1.small",
"enum": [
"t1.nano",
"t1.micro",
"t1.small",
"t1.medium",
"t1.large",
"t1.xlarge",
"t1.2xlarge",
"t1.4xlarge",
"c1.nano",
"c1.micro",
"c1.small",
"c1.medium",
"c1.large",
"c1.xlarge",
"c1.2xlarge",
"c1.4xlarge",
"s1.nano",
"s1.micro",
"s1.small",
"s1.medium",
"s1.large",
"s1.xlarge",
"s1.2xlarge",
"s1.4xlarge",
"u1.nano",
"u1.micro",
"u1.small",
"u1.medium",
"u1.large",
"u1.xlarge",
"u1.2xlarge",
"u1.4xlarge",
"m1.nano",
"m1.micro",
"m1.small",
"m1.medium",
"m1.large",
"m1.xlarge",
"m1.2xlarge",
"m1.4xlarge",
"nano",
"micro",
"small",
"medium",
"large",
"xlarge",
"2xlarge"
]
},
"size": {
"description": "Persistent Volume size for Kafka.",
"default": "10Gi",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
},
"storageClass": {
"description": "StorageClass used to store the Kafka data.",
"type": "string",
"default": "",
"x-kubernetes-validations": [
{
"rule": "self == oldSelf",
"message": "storageClass is immutable"
}
],
"x-cozystack-options": {
"source": "storageclass"
}
}
}
}
}
}