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

Syncing latest changes from upstream devel for ceph-csi #366

Merged
merged 4 commits into from
Sep 3, 2024
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
2 changes: 0 additions & 2 deletions charts/ceph-csi-cephfs/templates/csidriver-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ spec:
attachRequired: false
podInfoOnMount: false
fsGroupPolicy: {{ .Values.CSIDriver.fsGroupPolicy }}
{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.CSIDriver.seLinuxMount }}
seLinuxMount: true
{{- end }}
2 changes: 0 additions & 2 deletions charts/ceph-csi-rbd/templates/csidriver-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ spec:
attachRequired: true
podInfoOnMount: false
fsGroupPolicy: {{ .Values.CSIDriver.fsGroupPolicy }}
{{- if and (semverCompare ">= 1.25.x" .Capabilities.KubeVersion.Version) .Values.CSIDriver.seLinuxMount }}
seLinuxMount: true
{{- end }}
13 changes: 13 additions & 0 deletions examples/cephfs/groupsnapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
kind: VolumeGroupSnapshot
metadata:
name: new-groupsnapshot-demo-1
spec:
source:
selector:
matchLabels:
# The PVCs will need to have this label for it to be
# included in the VolumeGroupSnapshot
group: test
volumeGroupSnapshotClassName: csi-cephfsplugin-groupsnapclass
17 changes: 17 additions & 0 deletions examples/cephfs/groupsnapshotclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: groupsnapshot.storage.k8s.io/v1alpha1
kind: VolumeGroupSnapshotClass
metadata:
name: csi-cephfsplugin-groupsnapclass
driver: cephfs.csi.ceph.com
parameters:
# String representing a Ceph cluster to provision storage from.
# Should be unique across all Ceph clusters in use for provisioning,
# cannot be greater than 36 bytes in length, and should remain immutable for
# the lifetime of the StorageClass in use
clusterID: <cluster-id>
# eg: fsName: myfs
fsName: <cephfs-name>
csi.storage.k8s.io/group-snapshotter-secret-name: csi-cephfs-secret
csi.storage.k8s.io/group-snapshotter-secret-namespace: default
deletionPolicy: Delete
11 changes: 11 additions & 0 deletions internal/rbd/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,13 @@ func (ns *NodeServer) NodeGetCapabilities(
},
},
},
{
Type: &csi.NodeServiceCapability_Rpc{
Rpc: &csi.NodeServiceCapability_RPC{
Type: csi.NodeServiceCapability_RPC_VOLUME_CONDITION,
},
},
},
{
Type: &csi.NodeServiceCapability_Rpc{
Rpc: &csi.NodeServiceCapability_RPC{
Expand Down Expand Up @@ -1358,6 +1365,10 @@ func blockNodeGetVolumeStats(ctx context.Context, targetPath string) (*csi.NodeG
Unit: csi.VolumeUsage_BYTES,
},
},
VolumeCondition: &csi.VolumeCondition{
Abnormal: false,
Message: "volume is in a healthy condition",
},
}, nil
}

Expand Down