mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-06 07:03:45 +09:00
feat(redis)!: issue the password through the credentials API
The chart generated the password of the default user itself, kept it readable by the tenant in <release>-auth, and shared it with replication, the Sentinels, the exporter and backups. It now renders a CredentialTemplate for the default account while authEnabled is on, and points the operator at that account's Secret, which the platform seeds and rewrites on a mint and which the tenant cannot read. The operator keeps replication, the Sentinels, the probes and the exporter on an internal account of its own, so the minted password reaches only the servers' default user and the backup Job, which is why the backup strategy reads the same Secret, and a mint restarts no pod. The ResourceDefinition no longer selects <release>-auth and excludes the internal account's Secret, which carries an ownerReference to the RedisFailover, so the tenant-visible set holds the trust anchor alone. The e2e mint step fails if a mint restarts a pod or moves the master. BREAKING CHANGE: <release>-auth is no longer rendered or readable; clients get the password by minting the default credential. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
15 files changed
+248
-52
No files matched your search
Generated
+1
-1
@@ -46,7 +46,7 @@ type ConfigSpec struct {
|
||||
// TLS configuration. TLS is opt-in and is not inferred from `external`.
|
||||
// +kubebuilder:default:={}
|
||||
Tls TLS `json:"tls,omitempty"`
|
||||
// Enable password generation.
|
||||
// Require a password. The password of the `default` user is issued through the credentials API, and issuing a new one takes effect without restarting anything. Replication, the Sentinels and the metrics exporter use an internal account of their own; backups use the `default` password.
|
||||
// +kubebuilder:default:=true
|
||||
AuthEnabled bool `json:"authEnabled"`
|
||||
// Redis `min-replicas-to-write`: the master refuses writes unless at least this many replicas are connected and within `minReplicasMaxLag`. Unset by default, which leaves the Redis default (disabled). With `replicas: 2` and a value of 1 the master rejects writes while its only replica is down, trading availability for a bound on the writes lost if an isolated master is failed over. Replication stays asynchronous, so this bounds the loss, it does not remove it. Must be 0 or more and below `replicas` (a master with `replicas` pods has `replicas - 1` replicas), otherwise every write is refused; the chart refuses such a value.
|
||||
|
||||
Reference in new issue
Block a user