From d98c6962bce04d9e4b2e5ba32ca0129af66ee9fc Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Fri, 27 May 2022 16:19:27 +0530 Subject: [PATCH] csi: add --extra-create-metadata arg to csi sidecars This argument in csi-provisioner and csi-snapshotter sidecar allows us to receive additional metadata in the CreateVolume and CreateSnapshot() request. For ex: as part of CreateVolume request: csi.storage.k8s.io/pvc/name csi.storage.k8s.io/pvc/namespace csi.storage.k8s.io/pv/name and as part of CreateSnapshot request: csi.storage.k8s.io/volumesnapshot/name csi.storage.k8s.io/volumesnapshot/namespace csi.storage.k8s.io/volumesnapshotcontent/name This is useful information which can be used depend on the use case we have at our csi driver level. The features like adding metadata to CephFS subvolume, RBD image or snapshot can consume this based on the need. Signed-off-by: Prasanna Kumar Kalever (cherry picked from commit 1666ce2d9c59aa93c923f9603cbcf914d44d883e) --- .../csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml | 2 ++ .../ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/pkg/operator/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml b/pkg/operator/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml index 702cb948b..f06d12d92 100644 --- a/pkg/operator/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml +++ b/pkg/operator/ceph/csi/template/cephfs/csi-cephfsplugin-provisioner-dep.yaml @@ -46,6 +46,7 @@ spec: - "--timeout={{ .GRPCTimeout }}" - "--leader-election=true" - "--leader-election-namespace={{ .Namespace }}" + - "--extra-create-metadata=true" env: - name: ADDRESS value: unix:///csi/csi-provisioner.sock @@ -79,6 +80,7 @@ spec: - "--retry-interval-start=500ms" - "--leader-election=true" - "--leader-election-namespace={{ .Namespace }}" + - "--extra-create-metadata=true" env: - name: ADDRESS value: unix:///csi/csi-provisioner.sock diff --git a/pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml b/pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml index a86dba29b..e153c6ba8 100644 --- a/pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml +++ b/pkg/operator/ceph/csi/template/rbd/csi-rbdplugin-provisioner-dep.yaml @@ -80,6 +80,7 @@ spec: - "--timeout={{ .GRPCTimeout }}" - "--leader-election=true" - "--leader-election-namespace={{ .Namespace }}" + - "--extra-create-metadata=true" env: - name: ADDRESS value: unix:///csi/csi-provisioner.sock