Documentation ¶
Overview ¶
Package v1 is the v1 version of the rook.io API. +groupName=rook.io
Copyright 2018 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type Annotations
- type AnnotationsSpec
- type Device
- type Directory
- type KeyType
- type Labels
- type LabelsSpec
- type NetworkSpec
- type Node
- type NodesByName
- type Placement
- type PlacementSpec
- type PriorityClassNamesSpec
- type ProbeSpec
- type ResourceSpec
- type Selection
- type StorageClassDeviceSet
- type StorageScopeSpec
- func (s *StorageScopeSpec) AnyUseAllDevices() bool
- func (s *StorageScopeSpec) ClearUseAllDevices()
- func (in *StorageScopeSpec) DeepCopy() *StorageScopeSpec
- func (in *StorageScopeSpec) DeepCopyInto(out *StorageScopeSpec)
- func (s *StorageScopeSpec) NodeWithNameExists(name string) bool
- func (s *StorageScopeSpec) ResolveNode(nodeName string) *Node
- type VolumeSource
Constants ¶
const (
KeyAll = "all"
)
const (
Version = "v1"
)
Variables ¶
var ( // SchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: rookio.CustomResourceGroupName, Version: Version}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type Annotations ¶
Annotations
func (Annotations) ApplyToObjectMeta ¶
func (a Annotations) ApplyToObjectMeta(t *metav1.ObjectMeta)
ApplyToObjectMeta adds annotations to object meta unless the keys are already defined.
func (Annotations) DeepCopy ¶
func (in Annotations) DeepCopy() Annotations
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Annotations.
func (Annotations) DeepCopyInto ¶
func (in Annotations) DeepCopyInto(out *Annotations)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Annotations) Merge ¶
func (a Annotations) Merge(with Annotations) Annotations
Merge returns an Annotations which results from merging the attributes of the original Annotations with the attributes of the supplied one. The supplied Placement's attributes will override the original ones if defined.
type AnnotationsSpec ¶
type AnnotationsSpec map[KeyType]Annotations
AnnotationsSpec
func (AnnotationsSpec) All ¶
func (a AnnotationsSpec) All() Annotations
func (AnnotationsSpec) DeepCopy ¶
func (in AnnotationsSpec) DeepCopy() AnnotationsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnnotationsSpec.
func (AnnotationsSpec) DeepCopyInto ¶
func (in AnnotationsSpec) DeepCopyInto(out *AnnotationsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Device ¶
type Device struct { Name string `json:"name,omitempty"` FullPath string `json:"fullpath,omitempty"` Config map[string]string `json:"config"` }
func (*Device) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.
func (*Device) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Directory ¶
type Directory struct { Path string `json:"path,omitempty"` Config map[string]string `json:"config"` }
func (*Directory) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Directory.
func (*Directory) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Labels ¶ added in v1.4.2
Labels
func (Labels) ApplyToObjectMeta ¶ added in v1.4.2
func (a Labels) ApplyToObjectMeta(t *metav1.ObjectMeta)
ApplyToObjectMeta adds labels to object meta unless the keys are already defined.
func (Labels) DeepCopy ¶ added in v1.4.2
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Labels.
func (Labels) DeepCopyInto ¶ added in v1.4.2
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabelsSpec ¶ added in v1.4.2
LabelsSpec
func (LabelsSpec) All ¶ added in v1.4.2
func (a LabelsSpec) All() Labels
func (LabelsSpec) DeepCopy ¶ added in v1.4.2
func (in LabelsSpec) DeepCopy() LabelsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelsSpec.
func (LabelsSpec) DeepCopyInto ¶ added in v1.4.2
func (in LabelsSpec) DeepCopyInto(out *LabelsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NetworkSpec ¶
type NetworkSpec struct { // Provider is what provides network connectivity to the cluster e.g. "host" or "multus" Provider string `json:"provider"` // Selectors string values describe what networks will be used to connect the cluster. // Meanwhile the keys describe each network respective responsibilities or any metadata // storage provider decide. Selectors map[string]string `json:"selectors"` }
NetworkSpec represents cluster network settings
func (*NetworkSpec) DeepCopy ¶
func (in *NetworkSpec) DeepCopy() *NetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec.
func (*NetworkSpec) DeepCopyInto ¶
func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkSpec) IsHost ¶
func (net *NetworkSpec) IsHost() bool
IsHost get whether to use host network provider
func (*NetworkSpec) IsMultus ¶
func (net *NetworkSpec) IsMultus() bool
IsMultus get whether to use multus network provider
type Node ¶
type Node struct { Name string `json:"name,omitempty"` Resources v1.ResourceRequirements `json:"resources,omitempty"` Config map[string]string `json:"config"` Selection }
func (*Node) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.
func (*Node) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodesByName ¶
type NodesByName []Node
NodesByName implements an interface to sort nodes by name
func (NodesByName) DeepCopy ¶
func (in NodesByName) DeepCopy() NodesByName
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodesByName.
func (NodesByName) DeepCopyInto ¶
func (in NodesByName) DeepCopyInto(out *NodesByName)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (NodesByName) Len ¶
func (s NodesByName) Len() int
func (NodesByName) Less ¶
func (s NodesByName) Less(i, j int) bool
func (NodesByName) Swap ¶
func (s NodesByName) Swap(i, j int)
type Placement ¶
type Placement struct { NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"` PodAffinity *v1.PodAffinity `json:"podAffinity,omitempty"` PodAntiAffinity *v1.PodAntiAffinity `json:"podAntiAffinity,omitempty"` Tolerations []v1.Toleration `json:"tolerations,omitempty"` TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` }
func (Placement) ApplyToPodSpec ¶
ApplyToPodSpec adds placement to a pod spec
func (*Placement) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
func (*Placement) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementSpec ¶
func (PlacementSpec) All ¶
func (p PlacementSpec) All() Placement
func (PlacementSpec) DeepCopy ¶
func (in PlacementSpec) DeepCopy() PlacementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementSpec.
func (PlacementSpec) DeepCopyInto ¶
func (in PlacementSpec) DeepCopyInto(out *PlacementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PriorityClassNamesSpec ¶
PriorityClassNamesSpec is a map of priority class names to be assigned to components
func (PriorityClassNamesSpec) All ¶
func (p PriorityClassNamesSpec) All() string
All returns the priority class name defined for 'all' daemons in the Ceph cluster CRD.
func (PriorityClassNamesSpec) DeepCopy ¶
func (in PriorityClassNamesSpec) DeepCopy() PriorityClassNamesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PriorityClassNamesSpec.
func (PriorityClassNamesSpec) DeepCopyInto ¶
func (in PriorityClassNamesSpec) DeepCopyInto(out *PriorityClassNamesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProbeSpec ¶ added in v1.4.0
type ProbeSpec struct { Disabled bool `json:"disabled,omitempty"` Probe *v1.Probe `json:"probe,omitempty"` }
func (*ProbeSpec) DeepCopy ¶ added in v1.4.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeSpec.
func (*ProbeSpec) DeepCopyInto ¶ added in v1.4.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceSpec ¶
type ResourceSpec map[string]v1.ResourceRequirements
func (ResourceSpec) DeepCopy ¶
func (in ResourceSpec) DeepCopy() ResourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceSpec.
func (ResourceSpec) DeepCopyInto ¶
func (in ResourceSpec) DeepCopyInto(out *ResourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Selection ¶
type Selection struct { // Whether to consume all the storage devices found on a machine UseAllDevices *bool `json:"useAllDevices,omitempty"` // A regular expression to allow more fine-grained selection of devices on nodes across the cluster DeviceFilter string `json:"deviceFilter,omitempty"` // A regular expression to allow more fine-grained selection of devices with path names DevicePathFilter string `json:"devicePathFilter,omitempty"` // List of devices to use as storage devices Devices []Device `json:"devices,omitempty"` // List of host directories to use as storage Directories []Directory `json:"directories,omitempty"` // PersistentVolumeClaims to use as storage VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` }
func (*Selection) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selection.
func (*Selection) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Selection) GetUseAllDevices ¶
GetUseAllDevices return if all devices should be used.
type StorageClassDeviceSet ¶
type StorageClassDeviceSet struct { Name string `json:"name,omitempty"` // A unique identifier for the set Count int `json:"count,omitempty"` // Number of devices in this set Resources v1.ResourceRequirements `json:"resources,omitempty"` // Requests/limits for the devices Placement Placement `json:"placement,omitempty"` // Placement constraints for the device daemons PreparePlacement *Placement `json:"preparePlacement,omitempty"` // Placement constraints for the device preparation Config map[string]string `json:"config,omitempty"` // Provider-specific device configuration VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"` // List of PVC templates for the underlying storage devices Portable bool `json:"portable,omitempty"` // OSD portability across the hosts TuneSlowDeviceClass bool `json:"tuneDeviceClass,omitempty"` // TuneSlowDeviceClass Tune the OSD when running on a slow Device Class TuneFastDeviceClass bool `json:"tuneFastDeviceClass,omitempty"` // TuneFastDeviceClass Tune the OSD when running on a fast Device Class SchedulerName string `json:"schedulerName,omitempty"` // Scheduler name for OSD pod placement Encrypted bool `json:"encrypted,omitempty"` // Whether to encrypt the deviceSet }
func (*StorageClassDeviceSet) DeepCopy ¶
func (in *StorageClassDeviceSet) DeepCopy() *StorageClassDeviceSet
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassDeviceSet.
func (*StorageClassDeviceSet) DeepCopyInto ¶
func (in *StorageClassDeviceSet) DeepCopyInto(out *StorageClassDeviceSet)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageScopeSpec ¶
type StorageScopeSpec struct { Nodes []Node `json:"nodes,omitempty"` UseAllNodes bool `json:"useAllNodes,omitempty"` NodeCount int `json:"nodeCount,omitempty"` Config map[string]string `json:"config"` Selection VolumeSources []VolumeSource `json:"volumeSources,omitempty"` StorageClassDeviceSets []StorageClassDeviceSet `json:"storageClassDeviceSets"` }
func (*StorageScopeSpec) AnyUseAllDevices ¶
func (s *StorageScopeSpec) AnyUseAllDevices() bool
AnyUseAllDevices gets whether to use all devices
func (*StorageScopeSpec) ClearUseAllDevices ¶
func (s *StorageScopeSpec) ClearUseAllDevices()
ClearUseAllDevices clears all devices
func (*StorageScopeSpec) DeepCopy ¶
func (in *StorageScopeSpec) DeepCopy() *StorageScopeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageScopeSpec.
func (*StorageScopeSpec) DeepCopyInto ¶
func (in *StorageScopeSpec) DeepCopyInto(out *StorageScopeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*StorageScopeSpec) NodeWithNameExists ¶
func (s *StorageScopeSpec) NodeWithNameExists(name string) bool
NodeWithNameExists returns true if the storage spec defines a node with the given name.
func (*StorageScopeSpec) ResolveNode ¶
func (s *StorageScopeSpec) ResolveNode(nodeName string) *Node
Fully resolves the config of the given node name, taking into account cluster level and node level specified config. In general, the more fine grained the configuration is specified, the more precedence it takes. Fully resolved configuration for the node has the following order of precedence. 1) Node (config defined on the node itself) 2) Cluster (config defined on the cluster) 3) Default values (if no config exists for the node or cluster)
type VolumeSource ¶
type VolumeSource struct { Name string `json:"name,omitempty"` PVCSources map[string]v1.PersistentVolumeClaimVolumeSource `json:"pvcSources,omitempty"` Resources v1.ResourceRequirements `json:"resources,omitempty"` Placement Placement `json:"placement,omitempty"` PreparePlacement *Placement `json:"preparePlacement,omitempty"` Config map[string]string `json:"config,omitempty"` Portable bool `json:"portable,omitempty"` // Portable OSD portability across the hosts TuneSlowDeviceClass bool `json:"tuneDeviceClass,omitempty"` // TuneSlowDeviceClass Tune the OSD when running on a slow Device Class TuneFastDeviceClass bool `json:"tuneFastDeviceClass,omitempty"` // TuneFastDeviceClass Tune the OSD when running on a Fast Device Class SchedulerName string `json:"schedulerName,omitempty"` // Scheduler name for OSD pod placement CrushDeviceClass string `json:"crushDeviceClass,omitempty"` // CrushDeviceClass represents the crush device class for an OSD Size string `json:"size,omitempty"` // Size represents the size requested for the PVC Encrypted bool `json:"encrypted,omitempty"` // Whether to encrypt the deviceSet }
VolumeSource is a volume source spec for Rook
func (*VolumeSource) DeepCopy ¶
func (in *VolumeSource) DeepCopy() *VolumeSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VolumeSource.
func (*VolumeSource) DeepCopyInto ¶
func (in *VolumeSource) DeepCopyInto(out *VolumeSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.