Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This introduces a new CRD to add the ability to create subvolumegroup for a given ceph filesystem volume. Typically the name of the volume is the name of the filesystem created by rook. Closes: #7036 Signed-off-by: Sébastien Han <seb@redhat.com>
- Loading branch information
Showing
31 changed files
with
1,690 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
"rbd-mirror", | ||
"rgw", | ||
"security", | ||
"subvolumegroup", | ||
"test" | ||
] | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: SubVolumeGroup CRD | ||
weight: 3610 | ||
indent: true | ||
--- | ||
|
||
{% include_relative branch.liquid %} | ||
|
||
This guide assumes you have created a Rook cluster as explained in the main [Quickstart guide](quickstart.md) | ||
|
||
# CephFilesystemSubVolumeGroup CRD | ||
|
||
Rook allows creation of Ceph Filesystem [SubVolumeGroups](https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-subvolume-groups) through the custom resource definitions (CRDs). | ||
Filesystem subvolume groups are an abstraction for a directory level higher than Filesystem subvolumes to effect policies (e.g., File layouts) across a set of subvolumes. | ||
For more information about CephFS volume, subvolumegroup and subvolume refer to the [Ceph docs](https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes). | ||
|
||
## Creating daemon | ||
|
||
To get you started, here is a simple example of a CRD to create a subvolumegroup on the CephFilesystem "myfs". | ||
|
||
```yaml | ||
apiVersion: ceph.rook.io/v1 | ||
kind: CephFilesystemSubVolumeGroup | ||
metadata: | ||
name: group-a | ||
namespace: rook-ceph # namespace:cluster | ||
spec: | ||
# filesystemName is the metadata name of the CephFilesystem CR where the subvolume group will be created | ||
filesystemName: myfs | ||
``` | ||
|
||
## Settings | ||
|
||
If any setting is unspecified, a suitable default will be used automatically. | ||
|
||
### CephFilesystemSubVolumeGroup metadata | ||
|
||
- `name`: The name that will be used for the Ceph Filesystem subvolume group. | ||
|
||
### CephFilesystemSubVolumeGroup spec | ||
|
||
- `filesystemName`: The metadata name of the CephFilesystem CR where the subvolume group will be created. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
apiVersion: ceph.rook.io/v1 | ||
kind: CephFilesystemSubVolumeGroup | ||
metadata: | ||
name: group-a | ||
namespace: rook-ceph # namespace:cluster | ||
spec: | ||
# filesystemName is the metadata name of the CephFilesystem CR where the subvolume group will be created | ||
filesystemName: myfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
Copyright 2021 The Rook Authors. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1 | ||
|
||
func (c *CephFilesystem) GetStatusConditions() *[]Condition { | ||
return &c.Status.Conditions | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.