mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 11:50:18 +00:00
util: fix tracevol.py to take config map namespace as an option
Added a new option so that user can specify the namespace for config map. Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
This commit is contained in:
parent
b2c9c589aa
commit
3585b21e80
@ -63,6 +63,8 @@ PARSER.add_argument("-key", "--userkey",
|
||||
default="", help="user password to connect to ceph cluster")
|
||||
PARSER.add_argument("-cm", "--configmap", default="ceph-csi-config",
|
||||
help="configmap name which holds the cephcsi configuration")
|
||||
PARSER.add_argument("-cmn", "--configmapnamespace", default="default",
|
||||
help="namespace where configmap exists")
|
||||
|
||||
|
||||
def list_pvc_vol_name_mapping(arg):
|
||||
@ -450,6 +452,7 @@ def get_subvol_group(arg):
|
||||
else:
|
||||
cmd += ["--kubeconfig", arg.kubeconfig]
|
||||
cmd += ['get', 'cm', arg.configmap, '-o', 'json']
|
||||
cmd += ['--namespace', arg.configmapnamespace]
|
||||
out = subprocess.Popen(cmd, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT)
|
||||
stdout, stderr = out.communicate()
|
||||
|
Loading…
Reference in New Issue
Block a user