-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[controller] Add NFSStorageClass CRD (#3)
Signed-off-by: v.oleynikov <[email protected]>
- Loading branch information
Showing
2 changed files
with
200 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
spec: | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: | | ||
Интерфейс управления StorageСlass для CSI-драйвера nfs.csi.storage.deckhouse.io. Ручное создание StorageClass для данного драйвера запрещено. | ||
properties: | ||
spec: | ||
properties: | ||
server: | ||
description: | | ||
Настройки сервера NFS | ||
properties: | ||
host: | ||
description: | | ||
Адрес NFS сервера | ||
share: | ||
description: | | ||
Путь к точке монтирования на NFS сервере | ||
nfsVersion: | ||
description: | | ||
Версия NFS сервера | ||
options: | ||
description: | | ||
Опции монтирования | ||
properties: | ||
mountMode: | ||
description: | | ||
Режим монтирования NFS раздела | ||
timeout: | ||
description: | | ||
Таймаут NFS сервера | ||
retransmissions: | ||
description: | | ||
Количество попыток подключения к NFS серверу | ||
readOnly: | ||
description: | | ||
Монтирование в режиме "только чтение" | ||
chmodPermissions: | ||
description: | | ||
Права монтирования субдиректории в NFS разделе | ||
reclaimPolicy: | ||
description: | | ||
Режим поведения при удалении PVC. Может быть: | ||
- Delete (При удалении PVC будет удален PV и данные на NFS-сервере) | ||
- Retain (При удалении PVC не будут удалены PV и данные на NFS-сервере, потребуют ручного удаления пользователем) | ||
volumeBindingMode: | ||
description: | | ||
Режим создания тома. Может быть Immediate (запрос при создании PVC) или WaitForFirstConsumer (до появления первого Pod) | ||
status: | ||
properties: | ||
phase: | ||
description: | | ||
Общее текущее состояние StorageClass. Может быть: | ||
- Failed (если контроллер получил некорректную конфигурацию ресурса или возникли ошибки в процессе выполнения операции) | ||
- Created (если StorageClass создан успешно) | ||
reason: | ||
description: | | ||
Дополнительная информация о текущем состоянии StorageClass. |
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,140 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: nfsstorageclasses.storage.deckhouse.io | ||
labels: | ||
heritage: deckhouse | ||
module: storage | ||
spec: | ||
group: storage.deckhouse.io | ||
scope: Cluster | ||
names: | ||
plural: nfsstorageclasses | ||
singular: nfsstorageclass | ||
kind: NFSStorageClass | ||
shortNames: | ||
- nsc | ||
preserveUnknownFields: false | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
description: | | ||
NFSStorageClass is a Kubernetes Custom Resource that defines a configuration for a Kubernetes Storage class. | ||
required: | ||
- spec | ||
properties: | ||
spec: | ||
type: object | ||
description: | | ||
Defines a Kubernetes Storage class configuration. | ||
required: | ||
- server | ||
properties: | ||
server: | ||
type: object | ||
description: | | ||
Defines a Kubernetes Storage class configuration. | ||
required: | ||
- host | ||
- share | ||
- nfsVersion | ||
properties: | ||
host: | ||
type: string | ||
x-kubernetes-validations: | ||
- rule: self == oldSelf | ||
message: Value is immutable. | ||
description: | | ||
NFS server host | ||
share: | ||
type: string | ||
x-kubernetes-validations: | ||
- rule: self == oldSelf | ||
message: Value is immutable. | ||
description: | | ||
NFS server share path | ||
nfsVersion: | ||
type: string | ||
x-kubernetes-validations: | ||
- rule: self == oldSelf | ||
message: Value is immutable. | ||
description: | | ||
NFS server version | ||
enum: | ||
- "3" | ||
- "4.1" | ||
- "4.2" | ||
options: | ||
type: object | ||
description: | | ||
Storage class mount options | ||
properties: | ||
mountMode: | ||
type: string | ||
description: | | ||
NFS share mount mode | ||
enum: | ||
- hard | ||
- soft | ||
timeout: | ||
type: integer | ||
description: | | ||
NFS server timeout | ||
retransmissions: | ||
type: integer | ||
description: | | ||
NFS retries before fail | ||
readOnly: | ||
type: boolean | ||
description: | | ||
Share read-only flag | ||
chmodPermissions: | ||
type: string | ||
description: | | ||
chmod rights for PVs subdirectory | ||
reclaimPolicy: | ||
type: string | ||
x-kubernetes-validations: | ||
- rule: self == oldSelf | ||
message: Value is immutable. | ||
description: | | ||
The storage class's reclaim policy. Might be: | ||
- Delete (If the Persistent Volume Claim is deleted, deletes the Persistent Volume and its associated storage as well) | ||
- Retain (If the Persistent Volume Claim is deleted, remains the Persistent Volume and its associated storage) | ||
enum: | ||
- Delete | ||
- Retain | ||
volumeBindingMode: | ||
type: string | ||
x-kubernetes-validations: | ||
- rule: self == oldSelf | ||
message: Value is immutable. | ||
description: | | ||
The storage class's volume binding mode. Might be Immediate or WaitForFirstConsumer | ||
enum: | ||
- Immediate | ||
- WaitForFirstConsumer | ||
status: | ||
type: object | ||
description: | | ||
Displays current information about the Storage Class. | ||
properties: | ||
phase: | ||
type: string | ||
description: | | ||
The Storage class current state. Might be: | ||
- Failed (if the controller received incorrect resource configuration or some errors occurred during the operation) | ||
- Create (if everything went fine) | ||
enum: | ||
- Failed | ||
- Created | ||
reason: | ||
type: string | ||
description: | | ||
Additional information about the current state of the Storage Class. | ||
subresources: | ||
status: {} |