mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-06 23:23:23 +09:00
RabbitMQ passwords were generated at render time, kept with lookup and stored in a per-user Secret that every tenant tier could read, next to the operator's administrator in -default-user. The chart now renders a CredentialTemplate per user and points each User's importCredentialsSecret at the account Secret the credentials API mints into. messaging-topology-operator 1.20.2 watches that Secret and puts the password to the broker again on every change, so a mint applies without a Helm run. The operator hashes the password itself, so the account Secret holds the plaintext, as the design's wave 2 does; no tenant role reads it. The User objects keep their names, since a rename would make the operator delete and recreate the broker user. -default-user is a platform account: the ApplicationDefinition stops selecting it and excludes it instead. Tenants lose the administrator login and the per-user Secrets; users.<name>.password is no longer read, and a value left there draws an admission warning that points at a mint on the user's Credential. A user whose account name is longer than 63 characters, does not start and end with a letter or a digit, or is shared with another user is refused at render. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
211 lines
7.0 KiB
JSON
211 lines
7.0 KiB
JSON
{
|
|
"title": "Chart Values",
|
|
"type": "object",
|
|
"properties": {
|
|
"replicas": {
|
|
"description": "Number of RabbitMQ replicas.",
|
|
"type": "integer",
|
|
"default": 3
|
|
},
|
|
"resources": {
|
|
"description": "Explicit CPU and memory configuration for each RabbitMQ replica. Every resource left unset here is taken from `resourcesPreset`.",
|
|
"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. It supplies every resource `resources` does not set, not only a `resources` left empty entirely.",
|
|
"type": "string",
|
|
"default": "s1.nano",
|
|
"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 Claim size available for application data.",
|
|
"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 data.",
|
|
"type": "string",
|
|
"default": "",
|
|
"x-kubernetes-validations": [
|
|
{
|
|
"rule": "self == oldSelf",
|
|
"message": "storageClass is immutable"
|
|
}
|
|
],
|
|
"x-cozystack-options": {
|
|
"source": "storageclass"
|
|
}
|
|
},
|
|
"external": {
|
|
"description": "Enable external access from outside the cluster.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"affinity": {
|
|
"description": "Pod affinity applied to RabbitMQ pods (standard Kubernetes corev1.Affinity). Use podAntiAffinity with topologyKey `kubernetes.io/hostname` to spread RabbitMQ pods across nodes.",
|
|
"type": "object",
|
|
"default": {},
|
|
"x-kubernetes-preserve-unknown-fields": true
|
|
},
|
|
"tls": {
|
|
"description": "TLS configuration. TLS is off unless `tls.enabled` is set to true.",
|
|
"type": "object",
|
|
"default": {},
|
|
"properties": {
|
|
"disableNonTLSListeners": {
|
|
"description": "Close the plaintext AMQP (5672) and management (15672) listeners. This is a broker-level switch: it drops in-cluster clients as well as external ones, and it cannot be combined with `users` or `vhosts`. Erlang distribution (25672) and epmd (4369) stay plaintext regardless. Defaults to false.",
|
|
"type": "boolean"
|
|
},
|
|
"enabled": {
|
|
"description": "Enable TLS for AMQPS (5671) and Management HTTPS (15671). Applies whether or not `external` is set. Plaintext AMQP (5672) and management (15672) keep serving unless `disableNonTLSListeners` is set as well. Moves the `port` key of the `\u003crelease\u003e-default-user` Secret from 5672 to 5671, and the metrics port from 15692 to 15691. Defaults to false.",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"version": {
|
|
"description": "RabbitMQ major.minor version to deploy",
|
|
"type": "string",
|
|
"default": "v4.2",
|
|
"enum": [
|
|
"v4.2",
|
|
"v4.1",
|
|
"v4.0",
|
|
"v3.13"
|
|
]
|
|
},
|
|
"users": {
|
|
"description": "Users configuration map. Each user is a RabbitMQ user that messaging-topology-operator keeps from an account Secret the platform holds. Passwords are issued through the Cozystack credentials API: a mint on the account's `Credential` (`core.cozystack.io`) returns a new password once, and a revoke retires the password without issuing one. The operator applies either to the broker within seconds. A `password` key here is ignored. The administrator in `\u003crelease\u003e-default-user` belongs to the platform and is not shown to tenants.",
|
|
"type": "object",
|
|
"default": {},
|
|
"additionalProperties": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"vhosts": {
|
|
"description": "Virtual hosts configuration map.",
|
|
"type": "object",
|
|
"default": {},
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": [
|
|
"roles"
|
|
],
|
|
"properties": {
|
|
"roles": {
|
|
"description": "Virtual host roles list.",
|
|
"type": "object",
|
|
"properties": {
|
|
"admin": {
|
|
"description": "List of admin users.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"readonly": {
|
|
"description": "List of readonly users.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"schedulingClass": {
|
|
"description": "Name of a SchedulingClass CR (cluster-scoped, group cozystack.io) used in place of the tenant's for this application's pods. A pod gets its class when it is created, so running pods keep theirs until they are recreated. Must be the tenant's own class or one listed in the tenant's `allowedSchedulingClasses`. Setting any other value is refused, and the pods of an application whose class is not, or no longer, in that list get the tenant's class. Empty means inherit from the tenant.",
|
|
"type": "string",
|
|
"default": "",
|
|
"maxLength": 63
|
|
}
|
|
}
|
|
}
|