-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- now generates migrationtasks and upgradetasks CRD on 'generate-crds' Signed-off-by: Niladri Halder <[email protected]>
- Loading branch information
Showing
6 changed files
with
499 additions
and
113 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 |
---|---|---|
@@ -1,2 +1,7 @@ | ||
# IDEs | ||
**/.idea | ||
|
||
# CRDs for deprecated APIs | ||
config/crds/openebs.io_cstorbackups.yaml | ||
config/crds/openebs.io_cstorcompletedbackups.yaml | ||
config/crds/openebs.io_cstorrestores.yaml |
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,163 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.11.4 | ||
name: blockdeviceclaims.openebs.io | ||
spec: | ||
group: openebs.io | ||
names: | ||
kind: BlockDeviceClaim | ||
listKind: BlockDeviceClaimList | ||
plural: blockdeviceclaims | ||
singular: blockdeviceclaim | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: BlockDeviceClaim is the Schema for the BlockDeviceClaim CR | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: DeviceClaimSpec defines the request details for a BlockDevice | ||
properties: | ||
blockDeviceName: | ||
description: BlockDeviceName is the reference to the block-device | ||
backing this claim | ||
type: string | ||
blockDeviceNodeAttributes: | ||
description: BlockDeviceNodeAttributes is the attributes on the node | ||
from which a BD should be selected for this claim. It can include | ||
nodename, failure domain etc. | ||
properties: | ||
hostName: | ||
description: HostName represents the hostname of the Kubernetes | ||
node resource where the BD should be present | ||
type: string | ||
nodeName: | ||
description: NodeName represents the name of the Kubernetes node | ||
resource where the BD should be present | ||
type: string | ||
type: object | ||
deviceClaimDetails: | ||
description: Details of the device to be claimed | ||
properties: | ||
allowPartition: | ||
description: AllowPartition represents whether to claim a full | ||
block device or a device that is a partition | ||
type: boolean | ||
blockVolumeMode: | ||
description: 'BlockVolumeMode represents whether to claim a device | ||
in Block mode or Filesystem mode. These are use cases of BlockVolumeMode: | ||
1) Not specified: VolumeMode check will not be effective 2) | ||
VolumeModeBlock: BD should not have any filesystem or mountpoint | ||
3) VolumeModeFileSystem: BD should have a filesystem and mountpoint. | ||
If DeviceFormat is specified then the format should match with | ||
the FSType in BD' | ||
type: string | ||
formatType: | ||
description: Format of the device required, eg:ext4, xfs | ||
type: string | ||
type: object | ||
deviceType: | ||
description: DeviceType represents the type of drive like SSD, HDD | ||
etc., | ||
type: string | ||
hostName: | ||
description: HostName from where blockdevice has to be claimed. | ||
type: string | ||
resources: | ||
description: Resources will help with placing claims on Capacity, | ||
IOPS | ||
properties: | ||
requests: | ||
additionalProperties: | ||
anyOf: | ||
- type: integer | ||
- type: string | ||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ | ||
x-kubernetes-int-or-string: true | ||
description: 'Requests describes the minimum resources required. | ||
eg: if storage resource of 10G is requested minimum capacity | ||
of 10G should be available' | ||
type: object | ||
required: | ||
- requests | ||
type: object | ||
selector: | ||
description: Selector is used to find block devices to be considered | ||
for claiming | ||
properties: | ||
matchExpressions: | ||
description: matchExpressions is a list of label selector requirements. | ||
The requirements are ANDed. | ||
items: | ||
description: A label selector requirement is a selector that | ||
contains values, a key, and an operator that relates the key | ||
and values. | ||
properties: | ||
key: | ||
description: key is the label key that the selector applies | ||
to. | ||
type: string | ||
operator: | ||
description: operator represents a key's relationship to | ||
a set of values. Valid operators are In, NotIn, Exists | ||
and DoesNotExist. | ||
type: string | ||
values: | ||
description: values is an array of string values. If the | ||
operator is In or NotIn, the values array must be non-empty. | ||
If the operator is Exists or DoesNotExist, the values | ||
array must be empty. This array is replaced during a strategic | ||
merge patch. | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- key | ||
- operator | ||
type: object | ||
type: array | ||
matchLabels: | ||
additionalProperties: | ||
type: string | ||
description: matchLabels is a map of {key,value} pairs. A single | ||
{key,value} in the matchLabels map is equivalent to an element | ||
of matchExpressions, whose key field is "key", the operator | ||
is "In", and the values array contains only "value". The requirements | ||
are ANDed. | ||
type: object | ||
type: object | ||
x-kubernetes-map-type: atomic | ||
required: | ||
- deviceType | ||
- hostName | ||
- resources | ||
type: object | ||
status: | ||
description: DeviceClaimStatus defines the observed state of BlockDeviceClaim | ||
properties: | ||
phase: | ||
description: DeviceClaimPhase is a typed string for phase field of | ||
BlockDeviceClaim. | ||
type: string | ||
required: | ||
- phase | ||
type: object | ||
type: object | ||
served: true | ||
storage: true |
Oops, something went wrong.