Skip to content

Commit 97be30c

Browse files
committed
doc: add deprecation warning for netNamespaceFilePath
Add a deprecation warning when netNamespaceFilePath is configured in the CSI configuration. This warns users that the feature will be removed in a future version and they should migrate to using host networking for CSI plugin pods. The warning is logged at the WARNING level when the feature is detected during volume staging/publishing operations. Assisted-by: AskBob <askbob@ibm.com> Signed-off-by: Niels de Vos <ndevos@ibm.com>
1 parent 16de1ed commit 97be30c

4 files changed

Lines changed: 16 additions & 0 deletions

File tree

PendingReleaseNotes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@
55
## Features
66

77
## NOTE
8+
9+
## Deprecations
10+
11+
- The `netNamespaceFilePath` configuration option is now deprecated and will be
12+
removed in a future release. Users should migrate to using host networking for
13+
CSI plugin pods instead. When this feature is detected, a deprecation warning
14+
will be logged at the WARNING level.

internal/cephfs/nodeserver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ func (ns *cephfsNodeServer) NodeStageVolume(
252252
if err != nil {
253253
return nil, status.Error(codes.Internal, err.Error())
254254
}
255+
if volOptions.NetNamespaceFilePath != "" {
256+
log.WarningLog(ctx, "netNamespaceFilePath is deprecated and will be removed in a future version. Please migrate to using host networking for CSI plugin pods.")
257+
}
255258
}
256259

257260
if volOptions.BackingSnapshot {

internal/nfs/nodeserver/nodeserver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ func (ns *nfsNodeServer) NodePublishVolume(
110110
if err != nil {
111111
return nil, status.Error(codes.Internal, err.Error())
112112
}
113+
if netNamespaceFilePath != "" {
114+
log.WarningLog(ctx, "netNamespaceFilePath is deprecated and will be removed in a future version. Please migrate to using host networking for CSI plugin pods.")
115+
}
113116
}
114117

115118
err = ns.mountNFS(ctx,

internal/rbd/nodeserver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ func (ns *NodeServer) NodeStageVolume(
392392
if err != nil {
393393
return nil, status.Error(codes.Internal, err.Error())
394394
}
395+
if rv.NetNamespaceFilePath != "" {
396+
log.WarningLog(ctx, "netNamespaceFilePath is deprecated and will be removed in a future version. Please migrate to using host networking for CSI plugin pods.")
397+
}
395398
if isHealer {
396399
err = healerStageTransaction(ctx, cr, rv, stagingParentPath)
397400
if err != nil {

0 commit comments

Comments
 (0)