mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-30 00:29:30 +00:00
Merge pull request #224 from red-hat-storage/sync_us--devel
Syncing latest changes from upstream devel for ceph-csi
This commit is contained in:
commit
c94a057011
@ -13,3 +13,8 @@
|
||||
ConfigMap in [PR](https://github.com/ceph/ceph-csi/pull/4165)
|
||||
|
||||
- Support for CephFS kernel and fuse mount options per cluster in [PR](https://github.com/ceph/ceph-csi/pull/4245)
|
||||
|
||||
## NOTE
|
||||
|
||||
- Support is limited to only the active Ceph releases. Support for EOLed Ceph
|
||||
releases are removed [PR](https://github.com/ceph/ceph-csi/pull/4262)
|
||||
|
66
README.md
66
README.md
@ -81,39 +81,39 @@ for its support details.
|
||||
|
||||
| Plugin | Features | Feature Status | CSI Driver Version | CSI Spec Version | Ceph Cluster Version | Kubernetes Version |
|
||||
| ------ | --------------------------------------------------------- | -------------- | ------------------ | ---------------- | -------------------- | ------------------ |
|
||||
| RBD | Dynamically provision, de-provision Block mode RWO volume | GA | >= v1.0.0 | >= v1.0.0 | Octopus (>=15.0.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision Block mode RWX volume | GA | >= v1.0.0 | >= v1.0.0 | Octopus (>=15.0.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision Block mode RWOP volume| Alpha | >= v3.5.0 | >= v1.5.0 | Octopus (>=15.0.0) | >= v1.22.0 |
|
||||
| | Dynamically provision, de-provision File mode RWO volume | GA | >= v1.0.0 | >= v1.0.0 | Octopus (>=15.0.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWOP volume | Alpha | >= v3.5.0 | >= v1.5.0 | Octopus (>=15.0.0) | >= v1.22.0 |
|
||||
| | Provision File Mode ROX volume from snapshot | Alpha | >= v3.0.0 | >= v1.0.0 | Octopus (>=v15.0.0) | >= v1.17.0 |
|
||||
| | Provision File Mode ROX volume from another volume | Alpha | >= v3.0.0 | >= v1.0.0 | Octopus (>=v15.0.0) | >= v1.16.0 |
|
||||
| | Provision Block Mode ROX volume from snapshot | Alpha | >= v3.0.0 | >= v1.0.0 | Octopus (>=v15.0.0) | >= v1.17.0 |
|
||||
| | Provision Block Mode ROX volume from another volume | Alpha | >= v3.0.0 | >= v1.0.0 | Octopus (>=v15.0.0) | >= v1.16.0 |
|
||||
| | Creating and deleting snapshot | GA | >= v1.0.0 | >= v1.0.0 | Octopus (>=15.0.0) | >= v1.17.0 |
|
||||
| | Provision volume from snapshot | GA | >= v1.0.0 | >= v1.0.0 | Octopus (>=15.0.0) | >= v1.17.0 |
|
||||
| | Provision volume from another volume | GA | >= v1.0.0 | >= v1.0.0 | Octopus (>=15.0.0) | >= v1.16.0 |
|
||||
| | Expand volume | Beta | >= v2.0.0 | >= v1.1.0 | Octopus (>=15.0.0) | >= v1.15.0 |
|
||||
| | Volume/PV Metrics of File Mode Volume | GA | >= v1.2.0 | >= v1.1.0 | Octopus (>=15.0.0) | >= v1.15.0 |
|
||||
| | Volume/PV Metrics of Block Mode Volume | GA | >= v1.2.0 | >= v1.1.0 | Octopus (>=15.0.0) | >= v1.21.0 |
|
||||
| | Topology Aware Provisioning Support | Alpha | >= v2.1.0 | >= v1.1.0 | Octopus (>=15.0.0) | >= v1.14.0 |
|
||||
| CephFS | Dynamically provision, de-provision File mode RWO volume | GA | >= v1.1.0 | >= v1.0.0 | Octopus (>=15.0.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWX volume | GA | >= v1.1.0 | >= v1.0.0 | Octopus (>=v15.0.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode ROX volume | Alpha | >= v3.0.0 | >= v1.0.0 | Octopus (>=v15.0.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWOP volume | Alpha | >= v3.5.0 | >= v1.5.0 | Octopus (>=15.0.0) | >= v1.22.0 |
|
||||
| | Creating and deleting snapshot | GA | >= v3.1.0 | >= v1.0.0 | Octopus (>=v15.2.4) | >= v1.17.0 |
|
||||
| | Provision volume from snapshot | GA | >= v3.1.0 | >= v1.0.0 | Octopus (>=v15.2.4) | >= v1.17.0 |
|
||||
| | Provision volume from another volume | GA | >= v3.1.0 | >= v1.0.0 | Octopus (>=v15.2.4) | >= v1.16.0 |
|
||||
| | Expand volume | Beta | >= v2.0.0 | >= v1.1.0 | Octopus (>=v15.0.0) | >= v1.15.0 |
|
||||
| | Volume/PV Metrics of File Mode Volume | GA | >= v1.2.0 | >= v1.1.0 | Octopus (>=v15.0.0) | >= v1.15.0 |
|
||||
| NFS | Dynamically provision, de-provision File mode RWO volume | Alpha | >= v3.6.0 | >= v1.0.0 | Pacific (>=16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWX volume | Alpha | >= v3.6.0 | >= v1.0.0 | Pacific (>=16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode ROX volume | Alpha | >= v3.6.0 | >= v1.0.0 | Pacific (>=16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWOP volume | Alpha | >= v3.6.0 | >= v1.5.0 | Pacific (>=16.2.0) | >= v1.22.0 |
|
||||
| | Expand volume | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=16.2.0) | >= v1.15.0 |
|
||||
| | Creating and deleting snapshot | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from snapshot | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from another volume | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=16.2.0) | >= v1.16.0 |
|
||||
| RBD | Dynamically provision, de-provision Block mode RWO volume | GA | >= v1.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision Block mode RWX volume | GA | >= v1.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision Block mode RWOP volume| Alpha | >= v3.5.0 | >= v1.5.0 | Pacific (>=v16.2.0) | >= v1.22.0 |
|
||||
| | Dynamically provision, de-provision File mode RWO volume | GA | >= v1.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWOP volume | Alpha | >= v3.5.0 | >= v1.5.0 | Pacific (>=v16.2.0) | >= v1.22.0 |
|
||||
| | Provision File Mode ROX volume from snapshot | Alpha | >= v3.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision File Mode ROX volume from another volume | Alpha | >= v3.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.16.0 |
|
||||
| | Provision Block Mode ROX volume from snapshot | Alpha | >= v3.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision Block Mode ROX volume from another volume | Alpha | >= v3.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.16.0 |
|
||||
| | Creating and deleting snapshot | GA | >= v1.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from snapshot | GA | >= v1.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from another volume | GA | >= v1.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.16.0 |
|
||||
| | Expand volume | Beta | >= v2.0.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.15.0 |
|
||||
| | Volume/PV Metrics of File Mode Volume | GA | >= v1.2.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.15.0 |
|
||||
| | Volume/PV Metrics of Block Mode Volume | GA | >= v1.2.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.21.0 |
|
||||
| | Topology Aware Provisioning Support | Alpha | >= v2.1.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| CephFS | Dynamically provision, de-provision File mode RWO volume | GA | >= v1.1.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWX volume | GA | >= v1.1.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode ROX volume | Alpha | >= v3.0.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWOP volume | Alpha | >= v3.5.0 | >= v1.5.0 | Pacific (>=v16.2.0) | >= v1.22.0 |
|
||||
| | Creating and deleting snapshot | GA | >= v3.1.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from snapshot | GA | >= v3.1.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from another volume | GA | >= v3.1.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.16.0 |
|
||||
| | Expand volume | Beta | >= v2.0.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.15.0 |
|
||||
| | Volume/PV Metrics of File Mode Volume | GA | >= v1.2.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.15.0 |
|
||||
| NFS | Dynamically provision, de-provision File mode RWO volume | Alpha | >= v3.6.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWX volume | Alpha | >= v3.6.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode ROX volume | Alpha | >= v3.6.0 | >= v1.0.0 | Pacific (>=v16.2.0) | >= v1.14.0 |
|
||||
| | Dynamically provision, de-provision File mode RWOP volume | Alpha | >= v3.6.0 | >= v1.5.0 | Pacific (>=v16.2.0) | >= v1.22.0 |
|
||||
| | Expand volume | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.15.0 |
|
||||
| | Creating and deleting snapshot | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from snapshot | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.17.0 |
|
||||
| | Provision volume from another volume | Alpha | >= v3.7.0 | >= v1.1.0 | Pacific (>=v16.2.0) | >= v1.16.0 |
|
||||
|
||||
`NOTE`: The `Alpha` status reflects possible non-backward
|
||||
compatible changes in the future, and is thus not recommended
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
"text/template"
|
||||
|
||||
"github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
"github.com/ghodss/yaml"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
@ -30,11 +31,13 @@ import (
|
||||
var csiConfigMap string
|
||||
|
||||
type CSIConfigMapValues struct {
|
||||
Name string
|
||||
Name string
|
||||
ClusterInfo []kubernetes.ClusterInfo
|
||||
}
|
||||
|
||||
var CSIConfigMapDefaults = CSIConfigMapValues{
|
||||
Name: "ceph-csi-config",
|
||||
Name: "ceph-csi-config",
|
||||
ClusterInfo: []kubernetes.ClusterInfo{},
|
||||
}
|
||||
|
||||
// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces
|
||||
|
@ -5,4 +5,4 @@ metadata:
|
||||
name: "{{ .Name }}"
|
||||
data:
|
||||
config.json: |-
|
||||
[]
|
||||
{{ .ClusterInfo }}
|
||||
|
@ -7,3 +7,4 @@ spec:
|
||||
attachRequired: false
|
||||
podInfoOnMount: false
|
||||
fsGroupPolicy: File
|
||||
seLinuxMount: true
|
||||
|
59
api/deploy/kubernetes/csi-config-map.go
Normal file
59
api/deploy/kubernetes/csi-config-map.go
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright 2023 The Ceph-CSI Authors.
|
||||
|
||||
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 kubernetes
|
||||
|
||||
type ClusterInfo struct {
|
||||
// ClusterID is used for unique identification
|
||||
ClusterID string
|
||||
// Monitors is monitor list for corresponding cluster ID
|
||||
Monitors []string
|
||||
// CephFS contains CephFS specific options
|
||||
CephFS CephFS
|
||||
// RBD Contains RBD specific options
|
||||
RBD RBD
|
||||
// NFS contains NFS specific options
|
||||
NFS NFS
|
||||
// Read affinity map options
|
||||
ReadAffinity ReadAffinity
|
||||
}
|
||||
|
||||
type CephFS struct {
|
||||
// symlink filepath for the network namespace where we need to execute commands.
|
||||
NetNamespaceFilePath string
|
||||
// SubvolumeGroup contains the name of the SubvolumeGroup for CSI volumes
|
||||
SubvolumeGroup string
|
||||
// KernelMountOptions contains the kernel mount options for CephFS volumes
|
||||
KernelMountOptions string
|
||||
// FuseMountOptions contains the fuse mount options for CephFS volumes
|
||||
FuseMountOptions string
|
||||
}
|
||||
type RBD struct {
|
||||
// symlink filepath for the network namespace where we need to execute commands.
|
||||
NetNamespaceFilePath string
|
||||
// RadosNamespace is a rados namespace in the pool
|
||||
RadosNamespace string
|
||||
}
|
||||
|
||||
type NFS struct {
|
||||
// symlink filepath for the network namespace where we need to execute commands.
|
||||
NetNamespaceFilePath string
|
||||
}
|
||||
|
||||
type ReadAffinity struct {
|
||||
Enabled bool
|
||||
CrushLocationLabels []string
|
||||
}
|
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
"text/template"
|
||||
|
||||
"github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
"github.com/ghodss/yaml"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
@ -30,11 +31,13 @@ import (
|
||||
var csiConfigMap string
|
||||
|
||||
type CSIConfigMapValues struct {
|
||||
Name string
|
||||
Name string
|
||||
ClusterInfo []kubernetes.ClusterInfo
|
||||
}
|
||||
|
||||
var CSIConfigMapDefaults = CSIConfigMapValues{
|
||||
Name: "ceph-csi-config",
|
||||
Name: "ceph-csi-config",
|
||||
ClusterInfo: []kubernetes.ClusterInfo{},
|
||||
}
|
||||
|
||||
// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces
|
||||
|
@ -5,4 +5,4 @@ metadata:
|
||||
name: "{{ .Name }}"
|
||||
data:
|
||||
config.json: |-
|
||||
[]
|
||||
{{ .ClusterInfo }}
|
||||
|
@ -6,5 +6,6 @@ metadata:
|
||||
spec:
|
||||
attachRequired: false
|
||||
fsGroupPolicy: File
|
||||
seLinuxMount: true
|
||||
volumeLifecycleModes:
|
||||
- Persistent
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
"text/template"
|
||||
|
||||
"github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
"github.com/ghodss/yaml"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
@ -30,11 +31,13 @@ import (
|
||||
var csiConfigMap string
|
||||
|
||||
type CSIConfigMapValues struct {
|
||||
Name string
|
||||
Name string
|
||||
ClusterInfo []kubernetes.ClusterInfo
|
||||
}
|
||||
|
||||
var CSIConfigMapDefaults = CSIConfigMapValues{
|
||||
Name: "ceph-csi-config",
|
||||
Name: "ceph-csi-config",
|
||||
ClusterInfo: []kubernetes.ClusterInfo{},
|
||||
}
|
||||
|
||||
// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces
|
||||
|
@ -5,4 +5,4 @@ metadata:
|
||||
name: "{{ .Name }}"
|
||||
data:
|
||||
config.json: |-
|
||||
[]
|
||||
{{ .ClusterInfo }}
|
||||
|
@ -6,4 +6,5 @@ metadata:
|
||||
spec:
|
||||
attachRequired: true
|
||||
podInfoOnMount: false
|
||||
seLinuxMount: true
|
||||
fsGroupPolicy: File
|
||||
|
4
charts/ceph-csi-cephfs/templates/extra-deploy.yaml
Normal file
4
charts/ceph-csi-cephfs/templates/extra-deploy.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{- tpl ( . | toYaml) $ }}
|
||||
{{- end }}
|
@ -323,6 +323,9 @@ cephconf: |
|
||||
# see https://github.com/ceph/ceph-csi/issues/1928
|
||||
fuse_big_writes = true
|
||||
|
||||
# Array of extra objects to deploy with the release
|
||||
extraDeploy: []
|
||||
|
||||
#########################################################
|
||||
# Variables for 'internal' use please use with caution! #
|
||||
#########################################################
|
||||
|
4
charts/ceph-csi-rbd/templates/extra-deploy.yaml
Normal file
4
charts/ceph-csi-rbd/templates/extra-deploy.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{- tpl ( . | toYaml) $ }}
|
||||
{{- end }}
|
@ -501,6 +501,9 @@ cephconf: |
|
||||
auth_service_required = cephx
|
||||
auth_client_required = cephx
|
||||
|
||||
# Array of extra objects to deploy with the release
|
||||
extraDeploy: []
|
||||
|
||||
#########################################################
|
||||
# Variables for 'internal' use please use with caution! #
|
||||
#########################################################
|
||||
|
@ -65,6 +65,7 @@ spec:
|
||||
- "--leader-election"
|
||||
- "--retry-interval-start=500ms"
|
||||
- "--handle-volume-inuse-error=false"
|
||||
- "--feature-gates=RecoverVolumeExpansionFailure=true"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: unix:///csi/csi-provisioner.sock
|
||||
|
@ -77,6 +77,7 @@ you're running it inside a k8s cluster and find the config itself).
|
||||
| `csi.storage.k8s.io/provisioner-secret-namespace`, `csi.storage.k8s.io/node-stage-secret-namespace` | for Kubernetes | Namespaces of the above Secret objects |
|
||||
| `encrypted` | no | disabled by default, use `"true"` to enable fscrypt encryption on PVC and `"false"` to disable it. **Do not change for existing storageclasses** |
|
||||
| `encryptionKMSID` | no | required if encryption is enabled and a kms is used to store passphrases |
|
||||
| `extraDeploy` | no | array of extra objects to deploy with the release |
|
||||
|
||||
**NOTE:** An accompanying CSI configuration file, needs to be provided to the
|
||||
running pods. Refer to [Creating CSI configuration](../examples/README.md#creating-csi-configuration)
|
||||
|
@ -72,6 +72,7 @@ make image-cephcsi
|
||||
| `stripeUnit` | no | stripe unit in bytes |
|
||||
| `stripeCount` | no | objects to stripe over before looping |
|
||||
| `objectSize` | no | object size in bytes |
|
||||
| `extraDeploy` | no | array of extra objects to deploy with the release |
|
||||
|
||||
**NOTE:** An accompanying CSI configuration file, needs to be provided to the
|
||||
running pods. Refer to [Creating CSI configuration](../examples/README.md#creating-csi-configuration)
|
||||
|
@ -199,15 +199,13 @@ func (s *subVolumeClient) GetSubVolumeInfo(ctx context.Context) (*Subvolume, err
|
||||
type operationState int64
|
||||
|
||||
const (
|
||||
unknown operationState = iota
|
||||
supported
|
||||
supported operationState = iota
|
||||
unsupported
|
||||
)
|
||||
|
||||
type localClusterState struct {
|
||||
// set the enum value i.e., unknown, supported,
|
||||
// set the enum value i.e., supported or
|
||||
// unsupported as per the state of the cluster.
|
||||
resizeState operationState
|
||||
subVolMetadataState operationState
|
||||
subVolSnapshotMetadataState operationState
|
||||
}
|
||||
@ -268,39 +266,21 @@ func (s *subVolumeClient) ExpandVolume(ctx context.Context, bytesQuota int64) er
|
||||
return err
|
||||
}
|
||||
|
||||
// ResizeVolume will try to use ceph fs subvolume resize command to resize the
|
||||
// subvolume. If the command is not available as a fallback it will use
|
||||
// CreateVolume to resize the subvolume.
|
||||
// ResizeVolume will use the ceph fs subvolume resize command to resize the
|
||||
// subvolume.
|
||||
func (s *subVolumeClient) ResizeVolume(ctx context.Context, bytesQuota int64) error {
|
||||
newLocalClusterState(s.clusterID)
|
||||
// resize subvolume when either it's supported, or when corresponding
|
||||
// clusterID key was not present.
|
||||
if clusterAdditionalInfo[s.clusterID].resizeState == unknown ||
|
||||
clusterAdditionalInfo[s.clusterID].resizeState == supported {
|
||||
fsa, err := s.conn.GetFSAdmin()
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "could not get FSAdmin, can not resize volume %s:", s.FsName, err)
|
||||
fsa, err := s.conn.GetFSAdmin()
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "could not get FSAdmin, can not resize volume %s:", s.FsName, err)
|
||||
|
||||
return err
|
||||
}
|
||||
_, err = fsa.ResizeSubVolume(s.FsName, s.SubvolumeGroup, s.VolID, fsAdmin.ByteCount(bytesQuota), true)
|
||||
if err == nil {
|
||||
clusterAdditionalInfo[s.clusterID].resizeState = supported
|
||||
|
||||
return nil
|
||||
}
|
||||
var invalid fsAdmin.NotImplementedError
|
||||
// In case the error is other than invalid command return error to the caller.
|
||||
if !errors.As(err, &invalid) {
|
||||
log.ErrorLog(ctx, "failed to resize subvolume %s in fs %s: %s", s.VolID, s.FsName, err)
|
||||
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
_, err = fsa.ResizeSubVolume(s.FsName, s.SubvolumeGroup, s.VolID, fsAdmin.ByteCount(bytesQuota), true)
|
||||
if err != nil {
|
||||
log.ErrorLog(ctx, "failed to resize subvolume %s in fs %s: %s", s.VolID, s.FsName, err)
|
||||
}
|
||||
clusterAdditionalInfo[s.clusterID].resizeState = unsupported
|
||||
s.Size = bytesQuota
|
||||
|
||||
return s.CreateVolume(ctx)
|
||||
return err
|
||||
}
|
||||
|
||||
// PurgSubVolume removes the subvolume.
|
||||
|
7
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs/csi-config-map.go
generated
vendored
7
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs/csi-config-map.go
generated
vendored
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
"text/template"
|
||||
|
||||
"github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
"github.com/ghodss/yaml"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
@ -30,11 +31,13 @@ import (
|
||||
var csiConfigMap string
|
||||
|
||||
type CSIConfigMapValues struct {
|
||||
Name string
|
||||
Name string
|
||||
ClusterInfo []kubernetes.ClusterInfo
|
||||
}
|
||||
|
||||
var CSIConfigMapDefaults = CSIConfigMapValues{
|
||||
Name: "ceph-csi-config",
|
||||
Name: "ceph-csi-config",
|
||||
ClusterInfo: []kubernetes.ClusterInfo{},
|
||||
}
|
||||
|
||||
// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces
|
||||
|
2
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs/csi-config-map.yaml
generated
vendored
2
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs/csi-config-map.yaml
generated
vendored
@ -5,4 +5,4 @@ metadata:
|
||||
name: "{{ .Name }}"
|
||||
data:
|
||||
config.json: |-
|
||||
[]
|
||||
{{ .ClusterInfo }}
|
||||
|
1
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs/csidriver.yaml
generated
vendored
1
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs/csidriver.yaml
generated
vendored
@ -7,3 +7,4 @@ spec:
|
||||
attachRequired: false
|
||||
podInfoOnMount: false
|
||||
fsGroupPolicy: File
|
||||
seLinuxMount: true
|
||||
|
59
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/csi-config-map.go
generated
vendored
Normal file
59
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/csi-config-map.go
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright 2023 The Ceph-CSI Authors.
|
||||
|
||||
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 kubernetes
|
||||
|
||||
type ClusterInfo struct {
|
||||
// ClusterID is used for unique identification
|
||||
ClusterID string
|
||||
// Monitors is monitor list for corresponding cluster ID
|
||||
Monitors []string
|
||||
// CephFS contains CephFS specific options
|
||||
CephFS CephFS
|
||||
// RBD Contains RBD specific options
|
||||
RBD RBD
|
||||
// NFS contains NFS specific options
|
||||
NFS NFS
|
||||
// Read affinity map options
|
||||
ReadAffinity ReadAffinity
|
||||
}
|
||||
|
||||
type CephFS struct {
|
||||
// symlink filepath for the network namespace where we need to execute commands.
|
||||
NetNamespaceFilePath string
|
||||
// SubvolumeGroup contains the name of the SubvolumeGroup for CSI volumes
|
||||
SubvolumeGroup string
|
||||
// KernelMountOptions contains the kernel mount options for CephFS volumes
|
||||
KernelMountOptions string
|
||||
// FuseMountOptions contains the fuse mount options for CephFS volumes
|
||||
FuseMountOptions string
|
||||
}
|
||||
type RBD struct {
|
||||
// symlink filepath for the network namespace where we need to execute commands.
|
||||
NetNamespaceFilePath string
|
||||
// RadosNamespace is a rados namespace in the pool
|
||||
RadosNamespace string
|
||||
}
|
||||
|
||||
type NFS struct {
|
||||
// symlink filepath for the network namespace where we need to execute commands.
|
||||
NetNamespaceFilePath string
|
||||
}
|
||||
|
||||
type ReadAffinity struct {
|
||||
Enabled bool
|
||||
CrushLocationLabels []string
|
||||
}
|
20
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/doc.go
generated
vendored
Normal file
20
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/doc.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Copyright 2021 The Ceph-CSI Authors.
|
||||
|
||||
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 kubernetes contains functions to obtain standard and recommended
|
||||
// deployment artifacts for Kubernetes. These artifacts can be used by
|
||||
// automation tools that want to deploy Ceph-CSI.
|
||||
package kubernetes
|
7
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.go
generated
vendored
7
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.go
generated
vendored
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
"text/template"
|
||||
|
||||
"github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
"github.com/ghodss/yaml"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
@ -30,11 +31,13 @@ import (
|
||||
var csiConfigMap string
|
||||
|
||||
type CSIConfigMapValues struct {
|
||||
Name string
|
||||
Name string
|
||||
ClusterInfo []kubernetes.ClusterInfo
|
||||
}
|
||||
|
||||
var CSIConfigMapDefaults = CSIConfigMapValues{
|
||||
Name: "ceph-csi-config",
|
||||
Name: "ceph-csi-config",
|
||||
ClusterInfo: []kubernetes.ClusterInfo{},
|
||||
}
|
||||
|
||||
// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces
|
||||
|
2
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.yaml
generated
vendored
2
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csi-config-map.yaml
generated
vendored
@ -5,4 +5,4 @@ metadata:
|
||||
name: "{{ .Name }}"
|
||||
data:
|
||||
config.json: |-
|
||||
[]
|
||||
{{ .ClusterInfo }}
|
||||
|
1
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csidriver.yaml
generated
vendored
1
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs/csidriver.yaml
generated
vendored
@ -6,5 +6,6 @@ metadata:
|
||||
spec:
|
||||
attachRequired: false
|
||||
fsGroupPolicy: File
|
||||
seLinuxMount: true
|
||||
volumeLifecycleModes:
|
||||
- Persistent
|
||||
|
7
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd/csi-config-map.go
generated
vendored
7
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd/csi-config-map.go
generated
vendored
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
"text/template"
|
||||
|
||||
"github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
"github.com/ghodss/yaml"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
@ -30,11 +31,13 @@ import (
|
||||
var csiConfigMap string
|
||||
|
||||
type CSIConfigMapValues struct {
|
||||
Name string
|
||||
Name string
|
||||
ClusterInfo []kubernetes.ClusterInfo
|
||||
}
|
||||
|
||||
var CSIConfigMapDefaults = CSIConfigMapValues{
|
||||
Name: "ceph-csi-config",
|
||||
Name: "ceph-csi-config",
|
||||
ClusterInfo: []kubernetes.ClusterInfo{},
|
||||
}
|
||||
|
||||
// NewCSIConfigMap takes a name from the CSIConfigMapValues struct and relaces
|
||||
|
2
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd/csi-config-map.yaml
generated
vendored
2
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd/csi-config-map.yaml
generated
vendored
@ -5,4 +5,4 @@ metadata:
|
||||
name: "{{ .Name }}"
|
||||
data:
|
||||
config.json: |-
|
||||
[]
|
||||
{{ .ClusterInfo }}
|
||||
|
1
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd/csidriver.yaml
generated
vendored
1
vendor/github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd/csidriver.yaml
generated
vendored
@ -6,4 +6,5 @@ metadata:
|
||||
spec:
|
||||
attachRequired: true
|
||||
podInfoOnMount: false
|
||||
seLinuxMount: true
|
||||
fsGroupPolicy: File
|
||||
|
1
vendor/modules.txt
vendored
1
vendor/modules.txt
vendored
@ -134,6 +134,7 @@ github.com/cenkalti/backoff/v3
|
||||
github.com/cenkalti/backoff/v4
|
||||
# github.com/ceph/ceph-csi/api v0.0.0-00010101000000-000000000000 => ./api
|
||||
## explicit; go 1.18
|
||||
github.com/ceph/ceph-csi/api/deploy/kubernetes
|
||||
github.com/ceph/ceph-csi/api/deploy/kubernetes/cephfs
|
||||
github.com/ceph/ceph-csi/api/deploy/kubernetes/nfs
|
||||
github.com/ceph/ceph-csi/api/deploy/kubernetes/rbd
|
||||
|
Loading…
Reference in New Issue
Block a user