Rotate Cluster Secrets
This feature was introduced in Hydrolix version 6.6.
Schedule the Hydrolix operator to replace the cluster's generated passwords and keys, exclude specific keys, and check a rotation's progress. For how rotation works and which keys it changes, see How Secret Rotation Works.
Prerequisites⚓︎
- Hydrolix v6.6 or later
- Permission to modify the
HydrolixClusterspecification - A maintenance window that doesn't overlap a Hydrolix upgrade
Schedule a rotation⚓︎
Effects during a rotation
Until the affected workloads restart, sign-in can fail and services can't open new database connections. The Grafana and Superset admin passwords change. See Effects during a rotation.
-
Set
secret_rotation.atto the start time, in ISO 8601 format with a UTC offset such asZ. Optionally, setsecret_rotation.timeout. The default is30m. -
Apply the configuration.
Apply the Configuration
The rotation starts within 15 seconds after the at time, once the cluster status is Ready.
To rotate again, set a later at. Each at value starts one rotation.
Exclude a key from rotation⚓︎
The operator doesn't rotate keys in the curated secret. To keep a key's current value, copy the key from general into curated. This example excludes the Grafana admin password:
| Copy a Key Into the Curated Secret | |
|---|---|
The command copies the base64-encoded value as Kubernetes stores it. If the cluster has no curated secret, see Create a curated secret.
To return a key to rotation, remove it from curated. The next rotation includes it.
Check a rotation's progress⚓︎
-
Show the rotation status. The
phasefield shows the current phase, anderrorshows the reason for a revert or failure.Show the Rotation Status -
Monitor the
o6r_hdx_secret_rotation_phasemetric. The current phase is1. Alert whenphase="failed"orphase="rolled-back"is1. Therestartingphase has no timeout, so also alert when it stays at1longer than a normal rollout takes. - Search the operator log for
secret rotation.
For phase and field definitions, see Status and metrics.
Respond to a failed rotation⚓︎
When the phase is rolled-back, the cluster is on its previous values and general is unchanged.
- Read
status.secretRotation.error. - Fix the cause.
- Set a later
at.
When the phase is failed, the revert didn't complete, and some services might use values that differ from general. Don't set a new at. Collect the rotation status and the logs of the rotation jobs, and contact Hydrolix support.
| List the Rotation Jobs | |
|---|---|