mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
fix(topo): support old topology key for backward compatibility
Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
ea8049f30d
commit
0e6a02ea74
4 changed files with 5 additions and 0 deletions
1
changelogs/unreleased/320-pawanpraka1
Normal file
1
changelogs/unreleased/320-pawanpraka1
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
support old topology key `openebs.io/nodename` for backward compatibility
|
||||||
|
|
@ -233,6 +233,8 @@ func (ns *node) NodeGetInfo(
|
||||||
if _, ok := topology[zfs.ZFSTopologyKey]; !ok {
|
if _, ok := topology[zfs.ZFSTopologyKey]; !ok {
|
||||||
topology[zfs.ZFSTopologyKey] = ns.driver.config.Nodename
|
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{
|
return &csi.NodeGetInfoResponse{
|
||||||
NodeId: ns.driver.config.Nodename,
|
NodeId: ns.driver.config.Nodename,
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ const (
|
||||||
ZFSNodeKey string = "kubernetes.io/nodename"
|
ZFSNodeKey string = "kubernetes.io/nodename"
|
||||||
// ZFSTopologyKey is supported topology key for the zfs driver
|
// ZFSTopologyKey is supported topology key for the zfs driver
|
||||||
ZFSTopologyKey string = "openebs.io/nodeid"
|
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 shows object has not handled yet
|
||||||
ZFSStatusPending string = "Pending"
|
ZFSStatusPending string = "Pending"
|
||||||
// ZFSStatusFailed shows object operation has failed
|
// ZFSStatusFailed shows object operation has failed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue