Skip to content

Upgrade MSR 4 to use Valkey New#

  1. Modify the values.yaml configuration file:

    external:
      addr: "msr-valkey:6379"
      existingSecret: "msr-valkey-secret"
    
  2. Upgrade MSR 4:

    helm upgrade msr4 oci://registry.mirantis.com/harbor/helm/msr \
      --version <MSR4 version> \
      -f values.yaml
    

    Alternatively, use only the helm upgrade command:

    helm upgrade msr4 oci://registry.mirantis.com/harbor/helm/msr \
      --version <MSR4 version> \
      --reuse-values \
      --set redis.type=external \
      --set redis.external.addr="msr-valkey:6379" \
      --set redis.external.existingSecret="msr-valkey-secret"
    

    Note

    Helm offers two flags for preserving existing values during an upgrade. Choose the flag based on what you are upgrading:

    • --reuse-values keeps the currently installed values as is and layers your --set flags on top. Use this flag when you upgrade only the Redis or Valkey configuration.

    • --reset-then-reuse-values applies the new chart version's defaults first, then reapplies your customizations and --set flags on top. Use this flag when you also upgrade the MSR 4 version.

  3. Verify the replication with Valkey:

    # From the leader:
    $ kubectl exec -it msr-valkey-0 -- valkey-cli -a $PASSWORD INFO replication
    Defaulted container "msr-valkey" out of: msr-valkey, msr-valkey-init (init)
    Warning: Using a password with '-a' or '-u' option on the command line
    interface may not be safe.
    # Replication
    role:master
    connected_slaves:2
    slave0:ip=msr-valkey-1.msr-valkey-headless.default.svc.cluster.local,port=6379,state=online,offset=67326,lag=0,type=replica
    slave1:ip=msr-valkey-2.msr-valkey-headless.default.svc.cluster.local,port=6379,state=online,offset=67326,lag=0,type=replica
    replicas_waiting_psync:0
    master_failover_state:no-failover
    [..]
    
    # From a replica:
    $ kubectl exec -it msr-valkey-1 -- valkey-cli -a $PASSWORD INFO replication
    Defaulted container "msr-valkey" out of: msr-valkey, msr-valkey-init (init)
    Warning: Using a password with '-a' or '-u' option on the command line
    interface may not be safe.
    # Replication
    role:slave
    master_host:msr-valkey-0.msr-valkey-headless.default.svc.cluster.local
    master_port:6379
    master_link_status:up
    [..]
    
  4. Verify the authentication and connections among the Valkey leader and replicas:

    $ kubectl exec -it msr-valkey-0 -- valkey-cli -a $PASSWORD PING
    Defaulted container "msr-valkey" out of: msr-valkey, msr-valkey-init (init)
    Warning: Using a password with '-a' or '-u' option on the command line
    interface may not be safe.
    PONG