-
Notifications
You must be signed in to change notification settings - Fork 0
/
persistent_volume_claim_spec.cr
59 lines (49 loc) · 4.6 KB
/
persistent_volume_claim_spec.cr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# THIS FILE WAS AUTO GENERATED FROM THE K8S SWAGGER SPEC
require "yaml"
require "json"
module K8S
# PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes
@[::K8S::Properties(
access_modes: {type: Array(String), nilable: true, key: "accessModes", getter: false, setter: false},
data_source: {type: Api::Core::V1::TypedLocalObjectReference, nilable: true, key: "dataSource", getter: false, setter: false},
resources: {type: Api::Core::V1::ResourceRequirements, nilable: true, key: "resources", getter: false, setter: false},
selector: {type: Apimachinery::Apis::Meta::V1::LabelSelector, nilable: true, key: "selector", getter: false, setter: false},
storage_class_name: {type: String, nilable: true, key: "storageClassName", getter: false, setter: false},
volume_mode: {type: String, nilable: true, key: "volumeMode", getter: false, setter: false},
volume_name: {type: String, nilable: true, key: "volumeName", getter: false, setter: false},
)]
class Api::Core::V1::PersistentVolumeClaimSpec
include ::JSON::Serializable
include ::YAML::Serializable
# AccessModes contains the desired access modes the volume should have. More info: [https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1](https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1)
@[::JSON::Field(key: "accessModes", emit_null: false)]
@[::YAML::Field(key: "accessModes", emit_null: false)]
property access_modes : Array(String) | Nil
# This field can be used to specify either: * An existing VolumeSnapshot object [(snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.]((snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) * An existing custom resource that implements data population (Alpha) In order to use custom resource types that implement data population, the AnyVolumeDataSource feature gate must be enabled. If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source.)
@[::JSON::Field(key: "dataSource", emit_null: false)]
@[::YAML::Field(key: "dataSource", emit_null: false)]
property data_source : Api::Core::V1::TypedLocalObjectReference | Nil
# Resources represents the minimum resources the volume should have. More info: [https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources](https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources)
@[::JSON::Field(key: "resources", emit_null: false)]
@[::YAML::Field(key: "resources", emit_null: false)]
property resources : Api::Core::V1::ResourceRequirements | Nil
# A label query over volumes to consider for binding.
@[::JSON::Field(key: "selector", emit_null: false)]
@[::YAML::Field(key: "selector", emit_null: false)]
property selector : Apimachinery::Apis::Meta::V1::LabelSelector | Nil
# Name of the StorageClass required by the claim. More info: [https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1](https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1)
@[::JSON::Field(key: "storageClassName", emit_null: false)]
@[::YAML::Field(key: "storageClassName", emit_null: false)]
property storage_class_name : String | Nil
# volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec.
@[::JSON::Field(key: "volumeMode", emit_null: false)]
@[::YAML::Field(key: "volumeMode", emit_null: false)]
property volume_mode : String | Nil
# VolumeName is the binding reference to the PersistentVolume backing this claim.
@[::JSON::Field(key: "volumeName", emit_null: false)]
@[::YAML::Field(key: "volumeName", emit_null: false)]
property volume_name : String | Nil
def initialize(*, @access_modes : Array | Nil = nil, @data_source : Api::Core::V1::TypedLocalObjectReference | Nil = nil, @resources : Api::Core::V1::ResourceRequirements | Nil = nil, @selector : Apimachinery::Apis::Meta::V1::LabelSelector | Nil = nil, @storage_class_name : String | Nil = nil, @volume_mode : String | Nil = nil, @volume_name : String | Nil = nil)
end
end
end