Skip to content

Commit

Permalink
fix(topo): support old topology key for backward compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Pawan <pawan@mayadata.io>
  • Loading branch information
pawanpraka1 committed May 4, 2021
1 parent 1b30116 commit 024f6d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions changelogs/unreleased/320-pawanpraka1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
support old topology key `openebs.io/nodename` for backward compatibility
2 changes: 2 additions & 0 deletions pkg/driver/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions pkg/zfs/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 024f6d0

Please sign in to comment.