csi-addons / volume-replication-operator

Apache License 2.0
16 stars 23 forks source link

fix status update #53

Closed sp98 closed 3 years ago

sp98 commented 3 years ago

updated updateReplicationStatus to update the status correctly. Also remove nil arguments from the update method. Using LastCompletionTime as a pointer due to https://github.com/kubernetes/kubernetes/issues/86811

Signed-off-by: Santosh Pillai sapillai@redhat.com

Result:

spec:
    dataSource:
      apiGroup: PVC
      kind: PersistentVolumeClaim
      name: rbd-pvc
    replicationState: primary
    volumeReplicationClass: volumereplicationclass-sample
  status:
    lastCompletionTime: "2021-03-23T10:44:52Z"
    lastStartTime: "2021-03-23T10:44:51Z"
    message: volume is marked primary
    state: Replicating
umangachapagain commented 3 years ago

I'm surprised we're not getting a "too few args" error. Approving since the build is passing and output is verified.