Skip to content

valkey: addon API contract compliance — add GlobalRoleSnapshot output + README #2658

@weicao

Description

@weicao

Following @westonnnn's directive to review and fix Valkey addon code against the new kubeblocks-addon-docs/docs/addon-api/ contract, this issue tracks five gaps identified in the review.

Initial review

5 gaps were flagged:

  1. roleProbe output format — check-role.sh emits plain text role, not GlobalRoleSnapshot JSON, so the KB controller's authoritative-snapshot staleness gate never engages
  2. advertised-address script — Services declared (NodePort, LoadBalancer) but no path observed for replica-announce-ip / replica-announce-port setup
  3. backup / restore compatibility matrix — no documented source/target × topology × method × outcome table
  4. Sentinel state backup — BackupActionSet covers /data only; Sentinel PVC loss path not addressed
  5. Reconfigure action — no lifecycle.reconfigure action visible in the initial review

Updated state after deeper read

  • Gap 2 (advertised-address) was already implemented in scripts/valkey-start.sh:build_announce_addr (covers NodePort, LoadBalancer, FQDN paths). The initial review missed the inline implementation.
  • Gap 5 (reconfigure) was already implemented via the valkey.reconfigureAction helper in templates/_helpers.tpl, wired into the ComponentDefinition lifecycle actions. The initial review missed the helper.

Remaining real gaps:

  1. roleProbe JSON output — addressed by the PR
  2. backup / restore compatibility matrix — addressed by the new addon README
  3. Sentinel state backup — addressed by documenting the supported scope and the operator workaround for Sentinel PVC loss in the new README; backing up Sentinel state is left as a future enhancement

Boundary

  • Documents the actually supported scope of the addon rather than expanding scope
  • Does not change ComponentDefinition lifecycle action surface
  • Does not change BackupActionSet contents (data-plane only)
  • Cross-major restore (8.x → 9.x) is documented as out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions