Skip to content

fix(valkey): add dynamic parameter reconfiguration via nc-based shellTrigger #2593

@weicao

Description

@weicao

Problem

The Valkey addon ParametersDefinition was missing dynamicParameters and reloadAction, causing all parameter changes (including dynamic ones like maxmemory-policy) to trigger a rolling pod restart instead of hot-reloading via CONFIG SET.

Root cause chain

  1. No dynamicParameters list → KB classified all params as static → rolling restart
  2. No reloadAction → even with dynamicParameters, KB had no way to apply changes
  3. shellTrigger runs in config-manager sidecar (not the valkey container), so valkey-cli is unavailable (glibc/musl ABI mismatch)
  4. batchReload: true passes params via argv ($0=key, $1=value), not stdin
  5. Solution: send inline Redis protocol (AUTH + CONFIG SET) via nc 127.0.0.1 6379

Changes

  • addons/valkey/templates/paramsdef.yaml: add dynamicParameters (51 params supporting CONFIG SET) and staticParameters, and add reloadAction.shellTrigger using nc
  • addons/valkey/templates/cmpd.yaml: fix externalManaged comment

Verification

  • R08a dynamic reconfigure: 14 PASS / 0 FAIL — maxmemory-policy applied to 3 pods, no restart
  • R08b static restart: 22 PASS / 0 FAIL — databases=20 triggered rolling restart on all 3 pods

Known independent issue

kbcli cluster configure has a resolveConfigTemplate bug in KB 1.0.x. Tests used direct kubectl apply OpsRequest as workaround. Tracked separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions