-
Notifications
You must be signed in to change notification settings - Fork 539
values.schema.json enforces null type for ServiceAccount name — should accept string for custom ServiceAccounts #1839
Description
Currently, the chart’s values.schema.json defines the ServiceAccount name field as null, which prevents users from providing a custom ServiceAccount name when serviceAccount.create (or operator.serviceAccount.create) is set to false.
https://github.com/Altinity/clickhouse-operator/blob/master/deploy/helm/clickhouse-operator/values.schema.json#L823C1-L839C11
Example from values.schema.json:
"serviceAccount": {
"type": "object",
"properties": {
"annotations": {
"description": "annotations to add to the service account",
"type": "object"
},
"create": {
"description": "specifies whether a service account should be created",
"type": "boolean"
},
"name": {
"description": "the name of the service account to use; if not set and create is true, a name is generated using the fullname template",
"type": "null" ----> This needs to be changed
}
}
},
When deploying with a custom ServiceAccount:
serviceAccount:
create: false
name: clickhouse-access
Helm validation fails with below error:
Helm upgrade failed for release clickhouse/clickhouse-operator with chart [email protected]: values don't meet the specifications of the schema(s) in the following chart(s): altinity-clickhouse-operator: - serviceAccount.name: Invalid type. Expected: null, given: string
💡 Suggested fix
Update the schema to accept both string and null values for the ServiceAccount name.
Environment:
- Chart version: 0.25.4
- Helm version: v3.x
- Operator deployment method: Helm via Flux
Please update the chart’s values.schema.json to allow a string for the ServiceAccount name field. This will make it possible to use a pre-created ServiceAccount with external RBAC policies