validations

package
v5.14.5 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinimumVolumeSize       int64 = 16 * 1024 * 1024 * 1024 // 16Gi
	MaximumPvpoolNameLength       = 43
	MaximumVolumeCount            = 20
)

const configuration values for the validation checks

View Source
const (
	MaximumMountPathLength = 63
)

const configuration values for the validation checks

Variables

This section is empty.

Functions

func GetBucketclassNamespaceStoreArray

func GetBucketclassNamespaceStoreArray(namespacePolicy *nbv1.NamespacePolicy) []string

GetBucketclassNamespaceStoreArray returns an array of namespacestores of the provided bc

func ValidateAWSSTSARN

func ValidateAWSSTSARN(bs nbv1.BackingStore) error

ValidateAWSSTSARN validates the existence of the AWS STS ARN string

func ValidateBSEmptySecretName

func ValidateBSEmptySecretName(bs nbv1.BackingStore) error

ValidateBSEmptySecretName validates a secret name is provided for cloud backingstores

func ValidateBSEmptyTargetBucket

func ValidateBSEmptyTargetBucket(bs nbv1.BackingStore) error

ValidateBSEmptyTargetBucket validates a target bucket name is provided for cloud backingstores

func ValidateBackingStore

func ValidateBackingStore(bs nbv1.BackingStore) error

ValidateBackingStore validates create validations on resource Backinstore

func ValidateBackingstoreDeletion

func ValidateBackingstoreDeletion(bs nbv1.BackingStore, systemInfo nb.SystemInfo) error

ValidateBackingstoreDeletion validates the deleted backingstore not containing data buckets

func ValidateBucketClass

func ValidateBucketClass(bc *nbv1.BucketClass) error

ValidateBucketClass bucket class

func ValidateEndPoint

func ValidateEndPoint(endPointPointer *string) error

ValidateEndPoint Endpoint validation and sets default

func ValidateImmutLabelChange added in v5.13.0

func ValidateImmutLabelChange(bc *nbv1.BucketClass, oldBC *nbv1.BucketClass, immuts map[string]struct{}) error

ValidateImmutLabelChange validates that immutable labels are not changed

func ValidateMaxVolumeCount

func ValidateMaxVolumeCount(bs nbv1.BackingStore) error

ValidateMaxVolumeCount validates pvpool backingstore volume count is under 20

func ValidateMinVolumeCount

func ValidateMinVolumeCount(bs nbv1.BackingStore) error

ValidateMinVolumeCount validates pvpool backingstore volume count is above 0

func ValidateNSEmptyAWSARN

func ValidateNSEmptyAWSARN(ns nbv1.NamespaceStore) error

ValidateNSEmptyAWSARN validates if ARN is present in the NamespaceStore Spec

func ValidateNSEmptySecretName

func ValidateNSEmptySecretName(ns nbv1.NamespaceStore) error

ValidateNSEmptySecretName validates a secret name is provided for cloud namespacestore

func ValidateNSEmptyTargetBucket

func ValidateNSEmptyTargetBucket(ns nbv1.NamespaceStore) error

ValidateNSEmptyTargetBucket validates a target bucket name is provided for cloud namespacestore

func ValidateNSFSConfig

func ValidateNSFSConfig(na nbv1.NooBaaAccount) error

ValidateNSFSConfig validates that the NSFS config files were set properly

func ValidateNSFSSingleBC

func ValidateNSFSSingleBC(bc *nbv1.BucketClass) error

ValidateNSFSSingleBC validates that bucketclass configured to NS of type NSFS it will only be of type Single.

func ValidateNamespacePolicy added in v5.13.0

func ValidateNamespacePolicy(namespacePolicy *nbv1.NamespacePolicy, namespace string) error

ValidateNamespacePolicy validates namespacestores existance and readiness

func ValidateNamespaceStore

func ValidateNamespaceStore(nsStore *nbv1.NamespaceStore) error

ValidateNamespaceStore validates namespacestore configuration

func ValidateNamespacestoreDeletion

func ValidateNamespacestoreDeletion(ns nbv1.NamespaceStore, systemInfo nb.SystemInfo) error

ValidateNamespacestoreDeletion validates the deleted namespacestore not containing data buckets

func ValidateNoobaaCreation added in v5.12.4

func ValidateNoobaaCreation(nb nbv1.NooBaa) error

ValidateNoobaaCreation validates that the created Noobaa CR is valid

func ValidateNoobaaDeletion added in v5.11.0

func ValidateNoobaaDeletion(nb nbv1.NooBaa) error

ValidateNoobaaDeletion check the existence of AllowNoobaaDeletion in Noobaa CR

func ValidateNoobaaUpdate added in v5.12.4

func ValidateNoobaaUpdate(nb nbv1.NooBaa) error

ValidateNoobaaUpdate validates that the updated Noobaa CR is valid

func ValidateNsStoreIBMCos

func ValidateNsStoreIBMCos(nsStore *nbv1.NamespaceStore) error

ValidateNsStoreIBMCos validates namespacestore IBMCos type configuration

func ValidateNsStoreNSFS

func ValidateNsStoreNSFS(nsStore *nbv1.NamespaceStore) error

ValidateNsStoreNSFS validates namespacestore nsfs type configuration

func ValidateNsStoreS3Compatible

func ValidateNsStoreS3Compatible(nsStore *nbv1.NamespaceStore) error

ValidateNsStoreS3Compatible validates namespacestore S3Compatible type configuration

func ValidatePlacementPolicy added in v5.13.0

func ValidatePlacementPolicy(placementPolicy *nbv1.PlacementPolicy, namespace string) error

ValidatePlacementPolicy validates backingstore existance and readiness

func ValidatePvpoolMinVolSize

func ValidatePvpoolMinVolSize(bs nbv1.BackingStore) error

ValidatePvpoolMinVolSize validates pvpool volume size is above 16GB

func ValidatePvpoolNameLength

func ValidatePvpoolNameLength(bs nbv1.BackingStore) error

ValidatePvpoolNameLength validates the name of pvpool backingstore is under 43 characters

func ValidatePvpoolScaleDown

func ValidatePvpoolScaleDown(bs nbv1.BackingStore, oldBs nbv1.BackingStore) error

ValidatePvpoolScaleDown validates an operation of scaling down node in pvpool backingstore

func ValidateQuotaConfig

func ValidateQuotaConfig(bcName string, quota *nbv1.Quota) error

ValidateQuotaConfig validates the quota values

func ValidateRemoveNSFSConfig

func ValidateRemoveNSFSConfig(na nbv1.NooBaaAccount, oldNa nbv1.NooBaaAccount) error

ValidateRemoveNSFSConfig validates that the NSFS config was not removed

func ValidateReplicationPolicy added in v5.13.0

func ValidateReplicationPolicy(bucketName string, replicationPolicy string, update bool, isCLI bool) error

ValidateReplicationPolicy validates and replication params and returns the replication policy object

func ValidateSigVersion

func ValidateSigVersion(sigver nbv1.S3SignatureVersion) error

ValidateSigVersion validates backingstore provided with a supported signature version

func ValidateSignatureVersion

func ValidateSignatureVersion(signature nbv1.S3SignatureVersion, nsStoreName string) error

ValidateSignatureVersion validation, must be empty or v2 or v4

func ValidateTargetBSBucketChange

func ValidateTargetBSBucketChange(bs nbv1.BackingStore, oldBs nbv1.BackingStore) error

ValidateTargetBSBucketChange validates the user is not trying to update the backingstore target bucket

func ValidateTargetNSBucketChange

func ValidateTargetNSBucketChange(ns nbv1.NamespaceStore, oldNs nbv1.NamespaceStore) error

ValidateTargetNSBucketChange validates the user is not trying to update the namespacestore target bucket

func ValidateTiersNumber

func ValidateTiersNumber(tiers []nbv1.Tier) error

ValidateTiersNumber validates the provided number of tiers is 1 or 2

Types

This section is empty.

Jump to

Keyboard shortcuts

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