v1

package
v1.6.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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

View Source
const (
	KeyAll = "all"
)
View Source
const (
	Version = "v1"
)

Variables

View Source
var (
	// SchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)

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

type Annotations map[string]string

Annotations are 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 is the main spec annotation for all daemons +kubebuilder:pruning:PreserveUnknownFields +nullable

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 {
	// +optional
	Name string `json:"name,omitempty"`
	// +optional
	FullPath string `json:"fullpath,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Config map[string]string `json:"config,omitempty"`
}

Device represents a disk to use in the cluster

func (*Device) DeepCopy

func (in *Device) DeepCopy() *Device

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Device.

func (*Device) DeepCopyInto

func (in *Device) DeepCopyInto(out *Device)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeyType

type KeyType string

KeyType type safety

type Labels added in v1.4.2

type Labels map[string]string

Labels are label for a given daemons

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

func (in Labels) DeepCopy() Labels

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Labels.

func (Labels) DeepCopyInto added in v1.4.2

func (in Labels) DeepCopyInto(out *Labels)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Labels) Merge added in v1.4.2

func (a Labels) Merge(with Labels) Labels

Merge returns a Labels which results from merging the attributes of the original Labels with the attributes of the supplied one. The supplied Labels attributes will override the original ones if defined.

type LabelsSpec added in v1.4.2

type LabelsSpec map[KeyType]Labels

LabelsSpec is the main spec label for all daemons

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"
	// +nullable
	// +optional
	Provider string `json:"provider,omitempty"`

	// 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.
	// +nullable
	// +optional
	Selectors map[string]string `json:"selectors,omitempty"`
}

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 {
	// +optional
	Name string `json:"name,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Config    map[string]string `json:"config,omitempty"`
	Selection `json:",inline"`
}

Node is a storage nodes +nullable

func (*Node) DeepCopy

func (in *Node) DeepCopy() *Node

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.

func (*Node) DeepCopyInto

func (in *Node) DeepCopyInto(out *Node)

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 is a group of node affinity scheduling rules
	// +optional
	NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"`
	// PodAffinity is a group of inter pod affinity scheduling rules
	// +optional
	PodAffinity *v1.PodAffinity `json:"podAffinity,omitempty"`
	// PodAntiAffinity is a group of inter pod anti affinity scheduling rules
	// +optional
	PodAntiAffinity *v1.PodAntiAffinity `json:"podAntiAffinity,omitempty"`
	// The pod this Toleration is attached to tolerates any taint that matches
	// the triple <key,value,effect> using the matching operator <operator>
	// +optional
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`
	// TopologySpreadConstraint specifies how to spread matching pods among the given topology
	// +optional
	TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
}

Placement is the placement for an object

func (Placement) ApplyToPodSpec

func (p Placement) ApplyToPodSpec(t *v1.PodSpec)

ApplyToPodSpec adds placement to a pod spec

func (*Placement) DeepCopy

func (in *Placement) DeepCopy() *Placement

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.

func (*Placement) DeepCopyInto

func (in *Placement) DeepCopyInto(out *Placement)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Placement) Merge

func (p Placement) Merge(with Placement) Placement

Merge returns a Placement which results from merging the attributes of the original Placement with the attributes of the supplied one. The supplied Placement's attributes will override the original ones if defined.

type PlacementSpec

type PlacementSpec map[KeyType]Placement

PlacementSpec is the placement for core ceph daemons part of the CephCluster CRD

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

type PriorityClassNamesSpec map[KeyType]string

PriorityClassNamesSpec is a map of priority class names to be assigned to components

func (PriorityClassNamesSpec) All

All returns the priority class name defined for 'all' daemons in the Ceph cluster CRD.

func (PriorityClassNamesSpec) DeepCopy

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 determines whether probe is disable or not
	// +optional
	Disabled bool `json:"disabled,omitempty"`
	// Probe describes a health check to be performed against a container to determine whether it is
	// alive or ready to receive traffic.
	// +optional
	Probe *v1.Probe `json:"probe,omitempty"`
}

ProbeSpec is a wrapper around Probe so it can be enabled or disabled for a Ceph daemon

func (*ProbeSpec) DeepCopy added in v1.4.0

func (in *ProbeSpec) DeepCopy() *ProbeSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeSpec.

func (*ProbeSpec) DeepCopyInto added in v1.4.0

func (in *ProbeSpec) DeepCopyInto(out *ProbeSpec)

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

ResourceSpec is a collection of ResourceRequirements that describes the compute resource requirements

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
	// +optional
	UseAllDevices *bool `json:"useAllDevices,omitempty"`
	// A regular expression to allow more fine-grained selection of devices on nodes across the cluster
	// +optional
	DeviceFilter string `json:"deviceFilter,omitempty"`
	// A regular expression to allow more fine-grained selection of devices with path names
	// +optional
	DevicePathFilter string `json:"devicePathFilter,omitempty"`
	// List of devices to use as storage devices
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Devices []Device `json:"devices,omitempty"`
	// PersistentVolumeClaims to use as storage
	// +optional
	VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates,omitempty"`
}

func (*Selection) DeepCopy

func (in *Selection) DeepCopy() *Selection

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selection.

func (*Selection) DeepCopyInto

func (in *Selection) DeepCopyInto(out *Selection)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Selection) GetUseAllDevices

func (s *Selection) GetUseAllDevices() bool

GetUseAllDevices return if all devices should be used.

type StorageClassDeviceSet

type StorageClassDeviceSet struct {
	// Name is a unique identifier for the set
	Name string `json:"name"`
	// Count is the number of devices in this set
	// +kubebuilder:validation:Minimum=1
	Count int `json:"count"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"` // Requests/limits for the devices
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Placement Placement `json:"placement,omitempty"` // Placement constraints for the device daemons
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	PreparePlacement *Placement `json:"preparePlacement,omitempty"` // Placement constraints for the device preparation
	// Provider-specific device configuration
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Config map[string]string `json:"config,omitempty"`
	// VolumeClaimTemplates is a list of PVC templates for the underlying storage devices
	VolumeClaimTemplates []v1.PersistentVolumeClaim `json:"volumeClaimTemplates"`
	// Portable represents OSD portability across the hosts
	// +optional
	Portable bool `json:"portable,omitempty"`
	// TuneSlowDeviceClass Tune the OSD when running on a slow Device Class
	// +optional
	TuneSlowDeviceClass bool `json:"tuneDeviceClass,omitempty"`
	// TuneFastDeviceClass Tune the OSD when running on a fast Device Class
	// +optional
	TuneFastDeviceClass bool `json:"tuneFastDeviceClass,omitempty"`
	// Scheduler name for OSD pod placement
	// +optional
	SchedulerName string `json:"schedulerName,omitempty"`
	// Whether to encrypt the deviceSet
	// +optional
	Encrypted bool `json:"encrypted,omitempty"`
}

StorageClassDeviceSet is a storage class device set +nullable

func (*StorageClassDeviceSet) DeepCopy

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 {
	// +nullable
	// +optional
	Nodes []Node `json:"nodes,omitempty"`
	// +optional
	UseAllNodes bool `json:"useAllNodes,omitempty"`
	// +optional
	OnlyApplyOSDPlacement bool `json:"onlyApplyOSDPlacement,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +nullable
	// +optional
	Config    map[string]string `json:"config,omitempty"`
	Selection `json:",inline"`
	// +nullable
	// +optional
	StorageClassDeviceSets []StorageClassDeviceSet `json:"storageClassDeviceSets,omitempty"`
}

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) IsOnPVCEncrypted added in v1.5.0

func (s *StorageScopeSpec) IsOnPVCEncrypted() bool

IsOnPVCEncrypted returns whether a Ceph Cluster on PVC will be encrypted

func (*StorageScopeSpec) NodeExists added in v1.6.0

func (s *StorageScopeSpec) NodeExists(nodeName string) bool

NodeExists returns true if the node exists in the storage spec. False otherwise.

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL