diff --git a/changelogs/304-pawanpraka1 b/changelogs/unreleased/304-pawanpraka1 similarity index 100% rename from changelogs/304-pawanpraka1 rename to changelogs/unreleased/304-pawanpraka1 diff --git a/changelogs/unreleased/320-pawanpraka1 b/changelogs/unreleased/320-pawanpraka1 new file mode 100644 index 000000000..a679176a2 --- /dev/null +++ b/changelogs/unreleased/320-pawanpraka1 @@ -0,0 +1 @@ +support old topology key `openebs.io/nodename` for backward compatibility diff --git a/pkg/driver/agent.go b/pkg/driver/agent.go index 03046263c..925f9ec53 100644 --- a/pkg/driver/agent.go +++ b/pkg/driver/agent.go @@ -233,6 +233,8 @@ func (ns *node) NodeGetInfo( if _, ok := topology[zfs.ZFSTopologyKey]; !ok { topology[zfs.ZFSTopologyKey] = ns.driver.config.Nodename } + // add old topology key to support backward compatibility for velero + topology[zfs.ZFSTopoNodenameKey] = ns.driver.config.Nodename return &csi.NodeGetInfoResponse{ NodeId: ns.driver.config.Nodename, diff --git a/pkg/zfs/volume.go b/pkg/zfs/volume.go index 98dc1d535..69f9fc4cf 100644 --- a/pkg/zfs/volume.go +++ b/pkg/zfs/volume.go @@ -51,6 +51,8 @@ const ( ZFSNodeKey string = "kubernetes.io/nodename" // ZFSTopologyKey is supported topology key for the zfs driver ZFSTopologyKey string = "openebs.io/nodeid" + // ZFSTopoNodenameKey is supported topology key for the zfs driver + ZFSTopoNodenameKey string = "openebs.io/nodename" // ZFSStatusPending shows object has not handled yet ZFSStatusPending string = "Pending" // ZFSStatusFailed shows object operation has failed