storageos

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SchedulerExtenderName is the name of StorageOS scheduler.
	SchedulerExtenderName = "storageos-scheduler"
	// IntreeProvisionerName is the name of the k8s native provisioner.
	IntreeProvisionerName = "kubernetes.io/storageos"
	// CSIProvisionerName is the name of the CSI provisioner.
	CSIProvisionerName = "storageos"
	// StorageOSProvisionerName is the new CSI provisioner name.
	StorageOSProvisionerName = "csi.storageos.com"
)
View Source
const (
	DaemonsetSA   = "storageos-daemonset-sa"
	StatefulsetSA = "storageos-statefulset-sa"
	CSIHelperSA   = "storageos-csi-helper-sa"
	SchedulerSA   = "storageos-scheduler-sa"

	CSIProvisionerClusterRoleName    = "storageos:csi-provisioner"
	CSIProvisionerClusterBindingName = "storageos:csi-provisioner"

	CSIAttacherClusterRoleName    = "storageos:csi-attacher"
	CSIAttacherClusterBindingName = "storageos:csi-attacher"

	CSIResizerClusterRoleName    = "storageos:csi-resizer"
	CSIResizerClusterBindingName = "storageos:csi-resizer"

	CSIDriverRegistrarClusterRoleName       = "storageos:driver-registrar"
	CSIDriverRegistrarClusterBindingName    = "storageos:driver-registrar"
	CSIK8SDriverRegistrarClusterBindingName = "storageos:k8s-driver-registrar"

	// OpenShift Security Context Constraints role and role binding names.
	OpenShiftSCCClusterRoleName    = "storageos:openshift-scc"
	OpenShiftSCCClusterBindingName = "storageos:openshift-scc"

	KeyManagementRoleName    = "storageos:key-management"
	KeyManagementBindingName = "storageos:key-management"

	FencingClusterRoleName    = "storageos:pod-fencer"
	FencingClusterBindingName = "storageos:pod-fencer"

	NFSClusterRoleName    = "storageos:nfs-provisioner"
	NFSClusterBindingName = "storageos:nfs-provisioner"

	SchedulerClusterRoleName    = "storageos:scheduler-extender"
	SchedulerClusterBindingName = "storageos:scheduler-extender"

	InitClusterRoleName    = "storageos:init"
	InitClusterBindingName = "storageos:init"
)

Exported role, binding and service account resource names.

View Source
const (

	// K8SDistroOpenShift is k8s distribution name for OpenShift.
	K8SDistroOpenShift = "openshift"
)
View Source
const TLSEtcdSecretName = "storageos-tls-etcd"

TLSEtcdSecretName is the name of secret resource that contains etcd TLS secrets.

Variables

This section is empty.

Functions

func CSIExternalAttacherV2Supported

func CSIExternalAttacherV2Supported(version string) bool

CSIExternalAttacherV2Supported returns true for k8s 1.14+.

func CSIExternalResizerSupported

func CSIExternalResizerSupported(version string) bool

CSIExternalResizerSupported returns true for k8s 1.16+.

func CSIV1Supported added in v0.0.6

func CSIV1Supported(version string) bool

CSIV1Supported returns true for k8s versions that support CSI v1.

func GetFirstAddress

func GetFirstAddress(addresses []corev1.NodeAddress) string

GetFirstAddress returns the first address from a slice of addresses.

func GetNodeIPs

func GetNodeIPs(nodes []corev1.Node) []string

GetNodeIPs returns a slice of IPs, given a slice of nodes.

func GetNodeInternalIP

func GetNodeInternalIP(addresses []corev1.NodeAddress) string

GetNodeInternalIP the InternaIP from a slice of addresses, if it exists.

func HasCSIDriverKind

func HasCSIDriverKind(dc kdiscovery.DiscoveryInterface) (bool, error)

HasCSIDriverKind checks if CSIDriver built-in resource is supported in the k8s cluster.

func NodeList

func NodeList() *corev1.NodeList

NodeList returns an empty NodeList object.

func NodeV2Image

func NodeV2Image(image string) bool

NodeV2Image returns true if the image tag starts with "2." "v2", or "c2".

Types

type Deployment

type Deployment struct {
	// contains filtered or unexported fields
}

Deployment stores all the resource configuration and performs resource creation and update.

func NewDeployment

func NewDeployment(
	client client.Client,
	discoveryClient discovery.DiscoveryInterface,
	stos *storageosv1.StorageOSCluster,
	labels map[string]string,
	recorder record.EventRecorder,
	scheme *runtime.Scheme,
	version string,
	update bool) *Deployment

NewDeployment creates a new Deployment given a k8c client, storageos manifest and an event broadcast recorder.

func (*Deployment) Delete added in v0.0.9

func (s *Deployment) Delete() error

Delete deletes all the storageos resources. This explicit delete is implemented instead of depending on the garbage collector because sometimes the garbage collector deletes the resources with owner reference as a CRD without the parent being deleted. This happens especially when a cluster reboots. Althrough the operator re-creates the resources, we want to avoid this behavior by implementing an explcit delete.

func (*Deployment) Deploy

func (s *Deployment) Deploy() error

Deploy deploys storageos by creating all the resources needed to run storageos.

Jump to

Keyboard shortcuts

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