common

package
v0.0.0-...-46270a6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Asset paths
	AssetPathCsiDriver                 = "assets/csi-driver.yaml"
	AssetPathCsiControllerService      = "assets/csi-controller-service.yaml"
	AssetPathCsiNodeService            = "assets/csi-node-service.yaml"
	AssetPathCsiService                = "assets/csi-service.yaml"
	AssetPathCsiReconcileService       = "assets/csi-reconciler.yaml"
	AssetPathCsiWebhook                = "assets/csi-webhook.yaml"
	AssetPathStorageClass              = "assets/storage-class.yaml"
	AssetPathRbacServiceAccount        = "assets/rbac-service-account.yaml"
	AssetPathRbacCsiClusterRole        = "assets/rbac-csi-cluster-role.yaml"
	AssetPathRbacCsiClusterRoleBinding = "assets/rbac-csi-cluster-role-binding.yaml"
	AssetPathRbacCsiRole               = "assets/rbac-csi-role.yaml"
	AssetPathRbacCsiRoleBinding        = "assets/rbac-csi-role-binding.yaml"
	AssetPathRbacOlmClusterRole        = "assets/rbac-olm-dataset-cluster-role.yaml"
	AssetPathRbacOlmClusterRoleBinding = "assets/rbac-olm-dataset-cluster-role-binding.yaml"
	AssetPathRbacOlmRole               = "assets/rbac-olm-leader-role.yaml"
	AssetPathRbacOlmRoleBinding        = "assets/rbac-olm-leader-role-binding.yaml"
	AssetPathDatasetPVC                = "assets/dataset-pvc.yaml"
	AssetPathDriverEnvironment         = "assets/csi-driver-env.yaml"

	//Credential keys
	CredentialAccessKey       = "AccessKeyID"
	CredentialSecretAccessKey = "SecretAccessKey"
	CredentialPullSecret      = "PULL_SECRET"

	// Install condition types
	ConditionTypeInstall     status.ConditionType = "Install"
	ConditionTypeDriver      status.ConditionType = "DriverStatus"
	ConditionTypeHealthCheck status.ConditionType = "HealthCheck"

	DatasetPVCName          = "csi-rhm-cos-pvc"
	DatasetDefaultMountPath = "/var/rhm/datasets"

	LabelApp           = "app"
	LabelAppNode       = "csi-rhm-cos-ds"
	LabelAppRegister   = "csi-rhm-cos-ss"
	LabelAppReconcile  = "csi-rhm-cos-ctrl"
	LabelDatasetID     = "csi.marketplace.redhat.com/uid"
	LabelSelectorHash  = "csi.marketplace.redhat.com/selectorHash"
	LabelDriverVersion = "csi.marketplace.redhat.com/driverVersion"
	LabelUninstall     = "marketplace.redhat.com/uninstall"
	LabelUpdateTime    = "deploymentUpdateTime"
	LabelTimeFormat    = "20060102150405"

	// MarketplaceNamespace redhat marketplace namespace
	MarketplaceNamespace = "openshift-redhat-marketplace"

	NameNodeHealthCheck = "driver-health-check-"

	// Condition reason list
	ReasonInstalling        status.ConditionReason = "Installing"
	ReasonInstallComplete   status.ConditionReason = "InstallComplete"
	ReasonInstallFailed     status.ConditionReason = "InstallFailed"
	ReasonCredentialError   status.ConditionReason = "CredentialError"
	ReasonOperational       status.ConditionReason = "Operational"
	ReasonRepairInitiated   status.ConditionReason = "RepairInitiated"
	ReasonRepairComplete    status.ConditionReason = "RepairComplete"
	ReasonRepairInProgress  status.ConditionReason = "RepairInProgress"
	ReasonRepairFailed      status.ConditionReason = "RepairFailed"
	ReasonHealthCheckFailed status.ConditionReason = "DriverHealthCheckFailed"
	ReasonValidationError   status.ConditionReason = "ValidationFailed"

	// Resource names
	ResourceNameS3Driver = "marketplacecsidriver"
	ResourceNameDataset  = "marketplacedataset"
	ResourceNameVolume   = "redhat-marketplace-datasets"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ControllerHelper

type ControllerHelper struct{}

func (*ControllerHelper) Asset

func (ch *ControllerHelper) Asset(name string) ([]byte, error)

func (*ControllerHelper) DeepEqual

func (ch *ControllerHelper) DeepEqual(r1, r2 interface{}) bool

func (*ControllerHelper) GetCloudProviderType

func (ch *ControllerHelper) GetCloudProviderType(c client.Client, log logr.Logger) (string, error)

func (*ControllerHelper) Marshal

func (ch *ControllerHelper) Marshal(v interface{}) ([]byte, error)

type ControllerHelperInterface

type ControllerHelperInterface interface {
	Asset(name string) ([]byte, error)
	GetCloudProviderType(c client.Client, log logr.Logger) (string, error)
	Marshal(v interface{}) ([]byte, error)
	DeepEqual(r1, r2 interface{}) bool
}

func NewControllerHelper

func NewControllerHelper() ControllerHelperInterface

Jump to

Keyboard shortcuts

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