Skip to content

Commit

Permalink
test hook
Browse files Browse the repository at this point in the history
Signed-off-by: Viktor Kramarenko <[email protected]>
  • Loading branch information
ViktorKram committed Sep 4, 2024
1 parent 1350433 commit 4482c59
Show file tree
Hide file tree
Showing 2 changed files with 258 additions and 112 deletions.
67 changes: 9 additions & 58 deletions crds/lvmvolumegroupbackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
group: storage.deckhouse.io
scope: Cluster
names:
kind: LVMVolumeGroupBackup
kind: LvmVolumeGroupBackup
plural: lvmvolumegroupbackups
singular: lvmvolumegroupbackup
shortNames:
Expand All @@ -33,13 +33,9 @@ spec:
properties:
spec:
type: object
x-kubernetes-validations:
- rule: |
(self.type == "Local" && has(self.local)) || self.type != "Local"
message: "The 'local' field is required when the 'type' field is 'Local'."
required:
- type
- blockDeviceSelector
- blockDeviceNames
- actualVGNameOnTheNode
properties:
type:
Expand All @@ -49,65 +45,20 @@ spec:
- Local, that is, local if the devices used are not distributed (not Shared LUN).
enum:
- Local
x-kubernetes-validations:
- rule: self == oldSelf
message: "The type field is immutable."
local:
type: object
description: |
The desired configuration for a local Volume Group.
required:
- nodeName
properties:
nodeName:
type: string
description: |
The desired node name for the LVM Volume Group.
> This field is immutable.
x-kubernetes-validations:
- rule: self == oldSelf
message: "The nodeName field is immutable."
blockDeviceSelector:
type: object
blockDeviceNames:
type: array
description: |
The desired block device selector.
properties:
matchLabels:
type: object
description: |
The desired block device selector labels.
additionalProperties:
type: string
matchExpressions:
type: array
description: |
The desired block device selector expressions.
items:
type: object
properties:
key:
type: string
operator:
type: string
enum:
- In
- NotIn
- Exists
- DoesNotExist
values:
type: array
items:
type: string
An array of block device resource names to create a Volume Group.
> Note that the selected block devices must belong to the same node for a Local Volume Group.
items:
type: string
actualVGNameOnTheNode:
type: string
description: |
The desired name of a Volume Group. Must be unique for the node it is on.
> This field is immutable.
x-kubernetes-validations:
- rule: self == oldSelf
message: "The actualVGNameOnTheNode field is immutable."
thinPools:
type: array
description: |
Expand Down
Loading

0 comments on commit 4482c59

Please sign in to comment.