Versions in this module Expand all Collapse all v4 v4.6.0 Dec 12, 2024 Changes in this version + const BackendStatus + const ClaimBoundFinalizer + const ConfigMapFinalizer + const ContentBoundFinalizer + const SecretFinalizer + var CreateLabel = func(pvName, volumeId string) + var CreatePVLabel = func(pvName, volumeId string) + var DeleteLabel = func(volName string) + var DeletePVLabel = func(volumeId string) + func CombineMap[K comparable, V any](dst map[K]V, src map[K]V) map[K]V + func ConvertMapString2MapInterface(param map[string]string) map[string]interface + func ConvertToMapValueX[T bool | string | int64 | map[string]interface{}](ctx context.Context, m map[string]interface{}) map[string]T + func ConvertToStringSlice(inputs []interface{}) []string + func CreateContent(ctx context.Context, client clientSet.Interface, ...) (*xuanwuv1.StorageBackendContent, error) + func DeleteContent(ctx context.Context, client clientSet.Interface, contentName string) error + func Errorf(ctx context.Context, format string, a ...interface{}) error + func Errorln(ctx context.Context, msg string) error + func GenDynamicContentName(storageBackend *xuanwuv1.StorageBackendClaim) string + func GenObjectMetaKey(obj interface{}) (string, error) + func GetBackendConfigmapByClaimName(ctx context.Context, claimNameMeta string) (*coreV1.ConfigMap, error) + func GetBackendSecret(ctx context.Context, secretMeta string) (*coreV1.Secret, error) + func GetCertMeta(ctx context.Context, claimNameMeta string) (bool, string, error) + func GetCertPool(ctx context.Context, useCert bool, secretMeta string) (bool, *x509.CertPool, error) + func GetCertSecretFromBackendID(ctx context.Context, backendID string) (bool, string, error) + func GetClaim(ctx context.Context, client clientSet.Interface, ...) (*xuanwuv1.StorageBackendClaim, error) + func GetClaimByMeta(ctx context.Context, claimNameMeta string) (*xuanwuv1.StorageBackendClaim, error) + func GetConfigMap(configmapMeta string) (*coreV1.ConfigMap, error) + func GetConfigMeta(ctx context.Context, claimNameMeta string) (string, string, error) + func GetContent(ctx context.Context, client clientSet.Interface, contentName string) (*xuanwuv1.StorageBackendContent, error) + func GetContentByClaimMeta(ctx context.Context, claimNameMeta string) (*xuanwuv1.StorageBackendContent, error) + func GetK8SAndCrdClient(ctx context.Context) (*kubernetes.Clientset, *clientSet.Clientset, error) + func GetNameSpaceFromEnv(namespaceEnv, defaultNamespace string) string + func GetPasswordFromBackendID(ctx context.Context, backendID string) (string, error) + func GetSBCTCapabilitiesByClaim(ctx context.Context, backendID string) (map[string]bool, error) + func GetSBCTOnlineStatusByClaim(ctx context.Context, backendID string) (bool, error) + func GetSBCTOnlineStatusByContent(ctx context.Context, content *xuanwuv1.StorageBackendContent) (bool, error) + func GetSecret(meta string) (*coreV1.Secret, error) + func GetTopoName(pvName string) string + func InitRecorder(client kubernetes.Interface, componentName string) record.EventRecorder + func IsBackendCapabilitySupport(ctx context.Context, backendID string, capability constants.BackendCapability) (bool, error) + func IsClaimBoundContent(storageBackend *xuanwuv1.StorageBackendClaim) bool + func IsClaimReady(storageBackend *xuanwuv1.StorageBackendClaim) bool + func IsContentReady(ctx context.Context, content *xuanwuv1.StorageBackendContent) bool + func IsSBCTExist(ctx context.Context, backendID string) bool + func IsSBCTOnline(ctx context.Context, backendID string) bool + func ListClaim(ctx context.Context, client clientSet.Interface, namespace string) (*xuanwuv1.StorageBackendClaimList, error) + func ListContent(ctx context.Context, client clientSet.Interface) (*xuanwuv1.StorageBackendContentList, error) + func MakeMetaWithNamespace(ns, name string) string + func NeedAddClaimBoundFinalizers(storageBackend *xuanwuv1.StorageBackendClaim) bool + func NeedAddContentBoundFinalizers(content *xuanwuv1.StorageBackendContent) bool + func NeedChangeContent(storageBackend *xuanwuv1.StorageBackendClaim) bool + func NeedRemoveClaimBoundFinalizers(storageBackend *xuanwuv1.StorageBackendClaim) bool + func NeedRemoveContentBoundFinalizers(content *xuanwuv1.StorageBackendContent) bool + func Publish(ctx context.Context, key string, args ...interface{}) + func RunWithLeaderElection(ctx context.Context, leaderElection LeaderElectionConf, ...) + func SetSBCTOnlineStatus(ctx context.Context, content *xuanwuv1.StorageBackendContent, status bool) error + func SetStorageBackendContentOnlineStatus(ctx context.Context, backendID string, online bool) error + func SplitMetaNamespaceKey(obj string) (namespace, name string, err error) + func StorageBackendClaimKey(storageBackend *xuanwuv1.StorageBackendClaim) string + func StoreObjectUpdate(ctx context.Context, store cache.Store, obj interface{}, className string) (bool, error) + func Subscribe(topic string, fn interface{}) + func UpdateClaim(ctx context.Context, client clientSet.Interface, ...) (*xuanwuv1.StorageBackendClaim, error) + func UpdateClaimStatus(ctx context.Context, client clientSet.Interface, ...) (*xuanwuv1.StorageBackendClaim, error) + func UpdateConfigMap(configmap *coreV1.ConfigMap) (*coreV1.ConfigMap, error) + func UpdateContent(ctx context.Context, client clientSet.Interface, ...) (*xuanwuv1.StorageBackendContent, error) + func UpdateContentStatus(ctx context.Context, client clientSet.Interface, ...) (*xuanwuv1.StorageBackendContent, error) + func WaitExitSignal(ctx context.Context, components string) + type LeaderElectionConf struct + LeaderName string + LeaseDuration time.Duration + RenewDeadline time.Duration + RetryPeriod time.Duration