Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(topo): support old topology key for backward compatibility #320

Merged
merged 1 commit into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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