v1

package
Version: v0.0.0-...-74642d7 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package v1 contains API Schema definitions for the storageos.com v1 API group +kubebuilder:object:generate=true +groupName=storageos.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "storageos.com", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ContainerImages

type ContainerImages struct {
	NodeContainer                      string `json:"nodeContainer,omitempty"`
	InitContainer                      string `json:"initContainer,omitempty"`
	CSINodeDriverRegistrarContainer    string `json:"csiNodeDriverRegistrarContainer,omitempty"`
	CSIClusterDriverRegistrarContainer string `json:"csiClusterDriverRegistrarContainer,omitempty"`
	CSIExternalProvisionerContainer    string `json:"csiExternalProvisionerContainer,omitempty"`
	CSIExternalAttacherContainer       string `json:"csiExternalAttacherContainer,omitempty"`
	CSIExternalResizerContainer        string `json:"csiExternalResizerContainer,omitempty"`
	CSIExternalSnapshotterContainer    string `json:"csiExternalSnapshotterContainer,omitempty"`
	CSILivenessProbeContainer          string `json:"csiLivenessProbeContainer,omitempty"`
	HyperkubeContainer                 string `json:"hyperkubeContainer,omitempty"`
	KubeSchedulerContainer             string `json:"kubeSchedulerContainer,omitempty"`
	NFSContainer                       string `json:"nfsContainer,omitempty"`
	APIManagerContainer                string `json:"apiManagerContainer,omitempty"`
	NodeManagerContainer               string `json:"nodeManagerContainer,omitempty"`
	UpgradeGuardContainer              string `json:"upgradeGuardContainer,omitempty"`
	PortalManagerContainer             string `json:"portalManagerContainer,omitempty"`
	MetricsExporterContainer           string `json:"metricsExporterContainer,omitempty"`
}

ContainerImages contains image names of all the containers used by the operator.

func (*ContainerImages) DeepCopy

func (in *ContainerImages) DeepCopy() *ContainerImages

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

func (*ContainerImages) DeepCopyInto

func (in *ContainerImages) DeepCopyInto(out *ContainerImages)

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

type MembersStatus

type MembersStatus struct {
	// Ready are the storageos cluster members that are ready to serve requests.
	// The member names are the same as the node IPs.
	Ready []string `json:"ready,omitempty"`
	// Unready are the storageos cluster nodes not ready to serve requests.
	Unready []string `json:"unready,omitempty"`
}

MembersStatus stores the status details of cluster member nodes.

func (*MembersStatus) DeepCopy

func (in *MembersStatus) DeepCopy() *MembersStatus

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

func (*MembersStatus) DeepCopyInto

func (in *MembersStatus) DeepCopyInto(out *MembersStatus)

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

type Metrics

type Metrics struct {
	Enabled bool `json:"enabled,omitempty"`
}

Metrics contains the configuration for metrics.

func (*Metrics) DeepCopy

func (in *Metrics) DeepCopy() *Metrics

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

func (*Metrics) DeepCopyInto

func (in *Metrics) DeepCopyInto(out *Metrics)

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

type NodeHealth

type NodeHealth struct {
	DirectfsInitiator string `json:"directfsInitiator,omitempty"`
	Director          string `json:"director,omitempty"`
	KV                string `json:"kv,omitempty"`
	KVWrite           string `json:"kvWrite,omitempty"`
	Nats              string `json:"nats,omitempty"`
	Presentation      string `json:"presentation,omitempty"`
	Rdb               string `json:"rdb,omitempty"`
}

NodeHealth contains health status of a node.

func (*NodeHealth) DeepCopy

func (in *NodeHealth) DeepCopy() *NodeHealth

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

func (*NodeHealth) DeepCopyInto

func (in *NodeHealth) DeepCopyInto(out *NodeHealth)

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

type StorageOSCluster

type StorageOSCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   StorageOSClusterSpec   `json:"spec,omitempty"`
	Status StorageOSClusterStatus `json:"status,omitempty"`
}

StorageOSCluster is the Schema for the storageosclusters API +operator-sdk:csv:customresourcedefinitions:displayName="StorageOS Cluster",resources={{DaemonSet,apps/v1,storageos-node},{Deployment,apps/v1,storageos-api-manager},{Deployment,apps/v1,storageos-csi-helper},{Deployment,apps/v1,storageos-scheduler}}

func (*StorageOSCluster) DeepCopy

func (in *StorageOSCluster) DeepCopy() *StorageOSCluster

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

func (*StorageOSCluster) DeepCopyInto

func (in *StorageOSCluster) DeepCopyInto(out *StorageOSCluster)

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

func (*StorageOSCluster) DeepCopyObject

func (in *StorageOSCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*StorageOSCluster) GetCSIEndpoint

func (s *StorageOSCluster) GetCSIEndpoint() string

GetCSIEndpoint returns the CSI endpoint for the cluster.

func (*StorageOSCluster) GetLogLevel

func (s *StorageOSCluster) GetLogLevel() string

GetLogLevel returns the log level of the cluster.

func (*StorageOSCluster) GetSharedDir

func (s *StorageOSCluster) GetSharedDir() string

GetSharedDir returns the shared directory of the cluster.

type StorageOSClusterCSI

type StorageOSClusterCSI struct {
	Enable                       bool   `json:"enable,omitempty"`
	Version                      string `json:"version,omitempty"`
	Endpoint                     string `json:"endpoint,omitempty"`
	EnableProvisionCreds         bool   `json:"enableProvisionCreds,omitempty"`
	EnableControllerPublishCreds bool   `json:"enableControllerPublishCreds,omitempty"`
	EnableNodePublishCreds       bool   `json:"enableNodePublishCreds,omitempty"`
	EnableControllerExpandCreds  bool   `json:"enableControllerExpandCreds,omitempty"`
	RegistrarSocketDir           string `json:"registrarSocketDir,omitempty"`
	KubeletDir                   string `json:"kubeletDir,omitempty"`
	PluginDir                    string `json:"pluginDir,omitempty"`
	DeviceDir                    string `json:"deviceDir,omitempty"`
	RegistrationDir              string `json:"registrationDir,omitempty"`
	KubeletRegistrationPath      string `json:"kubeletRegistrationPath,omitempty"`
	DriverRegistrationMode       string `json:"driverRegisterationMode,omitempty"`
	DriverRequiresAttachment     string `json:"driverRequiresAttachment,omitempty"`
	DeploymentStrategy           string `json:"deploymentStrategy,omitempty"`
}

StorageOSClusterCSI contains CSI configurations.

func (*StorageOSClusterCSI) DeepCopy

func (in *StorageOSClusterCSI) DeepCopy() *StorageOSClusterCSI

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

func (*StorageOSClusterCSI) DeepCopyInto

func (in *StorageOSClusterCSI) DeepCopyInto(out *StorageOSClusterCSI)

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

type StorageOSClusterIngress

type StorageOSClusterIngress struct {
	Enable      bool              `json:"enable,omitempty"`
	Hostname    string            `json:"hostname,omitempty"`
	TLS         bool              `json:"tls,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

StorageOSClusterIngress contains Ingress configurations.

func (*StorageOSClusterIngress) DeepCopy

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

func (*StorageOSClusterIngress) DeepCopyInto

func (in *StorageOSClusterIngress) DeepCopyInto(out *StorageOSClusterIngress)

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

type StorageOSClusterKVBackend

type StorageOSClusterKVBackend struct {
	Address string `json:"address"`
	Backend string `json:"backend,omitempty"`
}

StorageOSClusterKVBackend stores key-value store backend configurations.

func (*StorageOSClusterKVBackend) DeepCopy

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

func (*StorageOSClusterKVBackend) DeepCopyInto

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

type StorageOSClusterList

type StorageOSClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []StorageOSCluster `json:"items"`
}

StorageOSClusterList contains a list of StorageOSCluster

func (*StorageOSClusterList) DeepCopy

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

func (*StorageOSClusterList) DeepCopyInto

func (in *StorageOSClusterList) DeepCopyInto(out *StorageOSClusterList)

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

func (*StorageOSClusterList) DeepCopyObject

func (in *StorageOSClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type StorageOSClusterService

type StorageOSClusterService struct {
	Name         string            `json:"name"`
	Type         string            `json:"type"`
	ExternalPort int               `json:"externalPort,omitempty"`
	InternalPort int               `json:"internalPort,omitempty"`
	Annotations  map[string]string `json:"annotations,omitempty"`
}

StorageOSClusterService contains Service configurations.

func (*StorageOSClusterService) DeepCopy

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

func (*StorageOSClusterService) DeepCopyInto

func (in *StorageOSClusterService) DeepCopyInto(out *StorageOSClusterService)

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

type StorageOSClusterSpec

type StorageOSClusterSpec struct {

	// Join is the join token used for service discovery.
	// Deprecated: Not used any more.
	Join string `json:"join,omitempty"`

	// CSI defines the configurations for CSI.
	CSI StorageOSClusterCSI `json:"csi,omitempty"`

	// Namespace is the kubernetes Namespace where storageos resources are
	// provisioned.
	// Deprecated: StorageOS uses namespace of storageosclusters.storageos.com resource.
	Namespace string `json:"namespace,omitempty"`

	// StorageClassName is the name of default StorageClass created for
	// StorageOS volumes.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	StorageClassName string `json:"storageClassName,omitempty"`

	// Service is the Service configuration for the cluster nodes.
	Service StorageOSClusterService `json:"service,omitempty"`

	// SecretRefName is the name of the secret object that contains all the
	// sensitive cluster configurations.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	SecretRefName string `json:"secretRefName"`

	// SecretRefNamespace is the namespace of the secret reference.
	// Deprecated: StorageOS uses namespace of storageosclusters.storageos.com resource.
	SecretRefNamespace string `json:"secretRefNamespace,omitempty"`

	// SharedDir is the shared directory to be used when the kubelet is running
	// in a container.
	// Typically: "/var/lib/kubelet/plugins/kubernetes.io~storageos".
	// If not set, defaults will be used.
	SharedDir string `json:"sharedDir,omitempty"`

	// Ingress defines the ingress configurations used in the cluster.
	// Deprecated: Not used any more, please create your ingress for dashboard on your own.
	Ingress StorageOSClusterIngress `json:"ingress,omitempty"`

	// Images defines the various container images used in the cluster.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	Images ContainerImages `json:"images,omitempty"`

	// KVBackend defines the key-value store backend used in the cluster.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	KVBackend StorageOSClusterKVBackend `json:"kvBackend"`

	// Pause is to pause the operator for the cluster.
	// Deprecated: Not used any more, operator is always running.
	Pause bool `json:"pause,omitempty"`

	// Debug is to set debug mode of the cluster.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	Debug bool `json:"debug,omitempty"`

	// NodeSelectorTerms is to set the placement of storageos pods using
	// node affinity requiredDuringSchedulingIgnoredDuringExecution.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	NodeSelectorTerms []corev1.NodeSelectorTerm `json:"nodeSelectorTerms,omitempty"`

	// Tolerations is to set the placement of storageos pods using
	// pod toleration.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Resources is to set the resource requirements of the storageos containers.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Disable Pod Fencing.  With StatefulSets, Pods are only re-scheduled if
	// the Pod has been marked as killed.  In practice this means that failover
	// of a StatefulSet pod is a manual operation.
	//
	// By enabling Pod Fencing and setting the `storageos.com/fenced=true` label
	// on a Pod, StorageOS will enable automated Pod failover (by killing the
	// application Pod on the failed node) if the following conditions exist:
	//
	// - Pod fencing has not been explicitly disabled.
	// - StorageOS has determined that the node the Pod is running on is
	//   offline.  StorageOS uses Gossip and TCP checks and will retry for 30
	//   seconds.  At this point all volumes on the failed node are marked
	//   offline (irrespective of whether fencing is enabled) and volume
	//   failover starts.
	// - The Pod has the label `storageos.com/fenced=true` set.
	// - The Pod has at least one StorageOS volume attached.
	// - Each StorageOS volume has at least 1 healthy replica.
	//
	// When Pod Fencing is disabled, StorageOS will not perform any interaction
	// with Kubernetes when it detects that a node has gone offline.
	// Additionally, the Kubernetes permissions required for Fencing will not be
	// added to the StorageOS role.
	// Deprecated: Not used any more, fencing is enabled/disabled by storageos.com/fenced label on pod.
	DisableFencing bool `json:"disableFencing,omitempty"`

	// Disable Telemetry.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	DisableTelemetry bool `json:"disableTelemetry,omitempty"`

	// Disable TCMU can be set to true to disable the TCMU storage driver.  This
	// is required when there are multiple storage systems running on the same
	// node and you wish to avoid conflicts.  Only one TCMU-based storage system
	// can run on a node at a time.
	//
	// Disabling TCMU will degrade performance.
	// Deprecated: Not used any more.
	DisableTCMU bool `json:"disableTCMU,omitempty"`

	// Force TCMU can be set to true to ensure that TCMU is enabled or
	// cause StorageOS to abort startup.
	//
	// At startup, StorageOS will automatically fallback to non-TCMU mode if
	// another TCMU-based storage system is running on the node.  Since non-TCMU
	// will degrade performance, this may not always be desired.
	// Deprecated: Not used any more.
	ForceTCMU bool `json:"forceTCMU,omitempty"`

	// TLSEtcdSecretRefName is the name of the secret object that contains the
	// etcd TLS certs. This secret is shared with etcd, therefore it's not part
	// of the main storageos secret.
	//+operator-sdk:csv:customresourcedefinitions:type=spec
	TLSEtcdSecretRefName string `json:"tlsEtcdSecretRefName,omitempty"`

	// TLSEtcdSecretRefNamespace is the namespace of the etcd TLS secret object.
	// Deprecated: StorageOS uses namespace of storageosclusters.storageos.com resource.
	TLSEtcdSecretRefNamespace string `json:"tlsEtcdSecretRefNamespace,omitempty"`

	// K8sDistro is the name of the Kubernetes distribution where the operator
	// is being deployed.  It should be in the format: `name[-1.0]`, where the
	// version is optional and should only be appended if known.  Suitable names
	// include: `openshift`, `rancher`, `aks`, `gke`, `eks`, or the deployment
	// method if using upstream directly, e.g `minishift` or `kubeadm`.
	//
	// Setting k8sDistro is optional, and will be used to simplify cluster
	// configuration by setting appropriate defaults for the distribution.  The
	// distribution information will also be included in the product telemetry
	// (if enabled), to help focus development efforts.
	K8sDistro string `json:"k8sDistro,omitempty"`

	// Disable StorageOS scheduler extender.
	// Deprecated: Not used any more, scheduler is always enabled on Kubernetes.
	DisableScheduler bool `json:"disableScheduler,omitempty"`

	// EnablePortalManager enables Portal Manager.
	EnablePortalManager bool `json:"enablePortalManager,omitempty"`

	// Environment contains environment variables that are passed to StorageOS.
	Environment map[string]string `json:"environment,omitempty"`

	// Node manager feature list with optional configurations.
	NodeManagerFeatures map[string]string `json:"nodeManagerFeatures,omitempty"`

	// Metrics feature configuration.
	Metrics Metrics `json:"metrics,omitempty"`

	// VolumeSnapshotClassName is the name of default VolumeSnapshotClass created for
	// StorageOS volumes.
	VolumeSnapshotClassName string `json:"volumeSnapshotClassName,omitempty"`
}

StorageOSClusterSpec defines the desired state of StorageOSCluster

func (*StorageOSClusterSpec) DeepCopy

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

func (*StorageOSClusterSpec) DeepCopyInto

func (in *StorageOSClusterSpec) DeepCopyInto(out *StorageOSClusterSpec)

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

type StorageOSClusterStatus

type StorageOSClusterStatus struct {

	// Phase is the phase of the StorageOS cluster.
	//+operator-sdk:csv:customresourcedefinitions:type=status
	Phase string `json:"phase,omitempty"`

	NodeHealthStatus map[string]NodeHealth `json:"nodeHealthStatus,omitempty"`
	Nodes            []string              `json:"nodes,omitempty"`

	// Ready is the ready status of the StorageOS control-plane pods.
	//+operator-sdk:csv:customresourcedefinitions:type=status
	Ready string `json:"ready,omitempty"`

	// Members is the list of StorageOS nodes in the cluster.
	//+operator-sdk:csv:customresourcedefinitions:type=status
	Members MembersStatus `json:"members,omitempty"`
	// Conditions is a list of status of all the components of StorageOS.
	//+operator-sdk:csv:customresourcedefinitions:type=status
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

StorageOSClusterStatus defines the observed state of StorageOSCluster

func (*StorageOSClusterStatus) DeepCopy

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

func (*StorageOSClusterStatus) DeepCopyInto

func (in *StorageOSClusterStatus) DeepCopyInto(out *StorageOSClusterStatus)

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

Jump to

Keyboard shortcuts

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