Merge pull request #2265 from min-zh/storage-capability
capability for non CSI storage
This commit is contained in:
99
config/crds/storage.kubesphere.io_provisionercapabilities.yaml
generated
Normal file
99
config/crds/storage.kubesphere.io_provisionercapabilities.yaml
generated
Normal file
@@ -0,0 +1,99 @@
|
||||
# according to https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/,
|
||||
# and https://kubernetes.io/docs/concepts/storage/storage-classes/#allow-volume-expansion
|
||||
# volume expansion support for the following in-tree volume plugins:
|
||||
# AWS-EBS, GCE-PD, Azure Disk, Azure File, Glusterfs, Cinder, Portworx, and Ceph RBD.
|
||||
# online file system expansion support for the following in-tree plugin
|
||||
# GCE-PD, AWS-EBS, Cinder, and Ceph RBD
|
||||
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: provisionercapabilities.storage.kubesphere.io
|
||||
spec:
|
||||
group: storage.kubesphere.io
|
||||
version: v1alpha1
|
||||
preserveUnknownFields: false
|
||||
names:
|
||||
plural: provisionercapabilities
|
||||
singular: provisionercapability
|
||||
kind: ProvisionerCapability
|
||||
shortNames:
|
||||
- pcap
|
||||
scope: Cluster
|
||||
additionalPrinterColumns:
|
||||
- name: Provisioner
|
||||
type: string
|
||||
description: The provisioner name should be the same as name
|
||||
JSONPath: .spec.pluginInfo.name
|
||||
- name: Expand
|
||||
type: string
|
||||
JSONPath: .spec.features.volume.expandMode
|
||||
- name: Age
|
||||
type: date
|
||||
JSONPath: .metadata.creationTimestamp
|
||||
validation:
|
||||
openAPIV3Schema:
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation of an object.'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this object represents.'
|
||||
type: string
|
||||
spec:
|
||||
type: object
|
||||
description: 'spec defines the desired characteristics of obejct'
|
||||
properties:
|
||||
pluginInfo:
|
||||
type: object
|
||||
description: 'Plugininfo represents plugin metadata'
|
||||
properties:
|
||||
name:
|
||||
description: 'provisioner name'
|
||||
type: string
|
||||
version:
|
||||
description: 'plugin version'
|
||||
type: string
|
||||
features:
|
||||
type: object
|
||||
description: 'Features represents plugin capability'
|
||||
properties:
|
||||
topology:
|
||||
description: 'topology determines whether a provisioner support topology by looking up GetPluginCapabilities.PluginCapability'
|
||||
type: boolean
|
||||
volume:
|
||||
type: object
|
||||
description: 'Volume represents whether plugin supports volume features'
|
||||
properties:
|
||||
create:
|
||||
description: 'Determined by ControllerGetCapabilities in ControllerServer'
|
||||
type: boolean
|
||||
attach:
|
||||
description: 'Determined by ControllerGetCapabilities in ControllerServer'
|
||||
type: boolean
|
||||
list:
|
||||
description: 'Determined by ControllerGetCapabilities in ControllerServer'
|
||||
type: boolean
|
||||
clone:
|
||||
description: 'Determined by ControllerGetCapabilities in ControllerServer'
|
||||
type: boolean
|
||||
stats:
|
||||
description: 'Determined by NodeGetCapabilities in NodeServer'
|
||||
type: boolean
|
||||
expandMode:
|
||||
description: 'Determined by GetPluginCapabilities in IdentityServer'
|
||||
type: string
|
||||
items:
|
||||
type: string
|
||||
enum: ["UNKNOWN", "OFFLINE", "ONLINE"]
|
||||
snapshot:
|
||||
type: object
|
||||
description: 'Snapshot represents whether plugin supports snapshot features'
|
||||
properties:
|
||||
create:
|
||||
type: boolean
|
||||
list:
|
||||
type: boolean
|
||||
@@ -19,6 +19,12 @@ spec:
|
||||
- name: Volume
|
||||
type: boolean
|
||||
JSONPath: .spec.features.volume.create
|
||||
- name: Expand
|
||||
type: string
|
||||
JSONPath: .spec.features.volume.expandMode
|
||||
- name: Clone
|
||||
type: boolean
|
||||
JSONPath: .spec.features.volume.clone
|
||||
- name: Snapshot
|
||||
type: boolean
|
||||
JSONPath: .spec.features.snapshot.create
|
||||
|
||||
20
config/default/provisonercapability/aws-ebs.yaml
Normal file
20
config/default/provisonercapability/aws-ebs.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-aws-ebs
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/aws-ebs
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: ONLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/default/provisonercapability/azure-disk.yaml
Normal file
20
config/default/provisonercapability/azure-disk.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-azure-disk
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/azure-disk
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: OFFLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/default/provisonercapability/azure-file.yaml
Normal file
20
config/default/provisonercapability/azure-file.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-azure-file
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/azure-file
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: OFFLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/default/provisonercapability/cinder.yaml
Normal file
20
config/default/provisonercapability/cinder.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-cinder
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/cinder
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: ONLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/default/provisonercapability/gce-pd.yaml
Normal file
20
config/default/provisonercapability/gce-pd.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-gce-pd
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/gce-pd
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: ONLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/default/provisonercapability/glusterfs.yaml
Normal file
20
config/default/provisonercapability/glusterfs.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-glusterfs
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/glusterfs
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: OFFLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/default/provisonercapability/portworx-volume.yaml
Normal file
20
config/default/provisonercapability/portworx-volume.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-portworx-volume
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/portworx-volume
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: OFFLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/default/provisonercapability/rbd.yaml
Normal file
20
config/default/provisonercapability/rbd.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-rbd
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/rbd
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: false
|
||||
expandMode: ONLINE
|
||||
snapshot:
|
||||
create: false
|
||||
list: false
|
||||
20
config/samples/storage_v1alpha1_provisionercapability.yaml
Normal file
20
config/samples/storage_v1alpha1_provisionercapability.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
apiVersion: storage.kubesphere.io/v1alpha1
|
||||
kind: ProvisionerCapability
|
||||
metadata:
|
||||
name: kubernetes-io-no-provisioner
|
||||
spec:
|
||||
pluginInfo:
|
||||
name: kubernetes.io/no-provisioner
|
||||
version: ""
|
||||
features:
|
||||
topology: false
|
||||
volume:
|
||||
create: true
|
||||
attach: true
|
||||
clone: false
|
||||
list: false
|
||||
stats: fasle
|
||||
expandMode: OFFLINE
|
||||
snapshot:
|
||||
create: fasle
|
||||
list: false
|
||||
Reference in New Issue
Block a user