utils

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0, MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessModeIterator

func AccessModeIterator(element interface{}) string

func CheckEtcdOwnerReference

func CheckEtcdOwnerReference(refs []metav1.OwnerReference, etcd *druidv1alpha1.Etcd) bool

func ClientServiceIsCorrectlyReconciled

func ClientServiceIsCorrectlyReconciled(c client.Client, timeout time.Duration, instance *druidv1alpha1.Etcd, svc *corev1.Service) error

func CmdIterator

func CmdIterator(element interface{}) string

func ConfigMapIsCorrectlyReconciled

func ConfigMapIsCorrectlyReconciled(c client.Client, timeout time.Duration, instance *druidv1alpha1.Etcd, cm *corev1.ConfigMap) error

func ContainerIterator

func ContainerIterator(element interface{}) string

func CreateEtcdCopyBackupsJob

func CreateEtcdCopyBackupsJob(taskName, namespace string) *batchv1.Job

CreateEtcdCopyBackupsJob creates an instance of a Job owned by a EtcdCopyBackupsTask with the given name.

func CreateEtcdCopyBackupsTask

func CreateEtcdCopyBackupsTask(name, namespace string, provider druidv1alpha1.StorageProvider, withOptionalFields bool) *druidv1alpha1.EtcdCopyBackupsTask

CreateEtcdCopyBackupsTask creates an instance of EtcdCopyBackupsTask for the given provider and optional fields boolean.

func CreateLease

func CreateLease(name, namespace, etcdName string, etcdUID types.UID) *coordinationv1.Lease

CreateLease creates a lease with its owner reference set to etcd.

func CreateSecrets

func CreateSecrets(ctx context.Context, c client.Client, namespace string, secrets ...string) []error

CreateSecrets creates all the given secrets

func CreateStatefulSet

func CreateStatefulSet(name, namespace string, etcdUID types.UID, replicas int32) *appsv1.StatefulSet

CreateStatefulSet creates a statefulset with its owner reference set to etcd.

func EnvIterator

func EnvIterator(element interface{}) string

func HostAliasIterator

func HostAliasIterator(element interface{}) string

func IsEtcdRemoved

func IsEtcdRemoved(c client.Client, name, namespace string, timeout time.Duration) error

IsEtcdRemoved checks if the given etcd object is removed

func IsLeaseRemoved

func IsLeaseRemoved(c client.Client, name, namespace string, timeout time.Duration) error

IsLeaseRemoved checks if the given etcd object is removed

func IsStatefulSetCorrectlyReconciled

func IsStatefulSetCorrectlyReconciled(ctx context.Context, c client.Client, instance *druidv1alpha1.Etcd, ss *appsv1.StatefulSet) (bool, error)

func KeyIterator

func KeyIterator(element interface{}) string

func MatchFinalizer

func MatchFinalizer(finalizer string) gomegatypes.GomegaMatcher

func OwnerRefIterator

func OwnerRefIterator(element interface{}) string

func PVCIterator

func PVCIterator(element interface{}) string

func ParseQuantity

func ParseQuantity(q string) resource.Quantity

func PeerServiceIsCorrectlyReconciled

func PeerServiceIsCorrectlyReconciled(c client.Client, timeout time.Duration, instance *druidv1alpha1.Etcd, svc *corev1.Service) error

func RoleBindingIsCorrectlyReconciled

func RoleBindingIsCorrectlyReconciled(c client.Client, timeout time.Duration, instance *druidv1alpha1.Etcd, rb *rbacv1.RoleBinding) error

func RoleIsCorrectlyReconciled

func RoleIsCorrectlyReconciled(c client.Client, timeout time.Duration, instance *druidv1alpha1.Etcd, role *rbacv1.Role) error

func RuleIterator

func RuleIterator(element interface{}) string

func ServiceAccountIsCorrectlyReconciled

func ServiceAccountIsCorrectlyReconciled(c client.Client, timeout time.Duration, instance *druidv1alpha1.Etcd, sa *corev1.ServiceAccount) error

func ServicePortIterator

func ServicePortIterator(element interface{}) string

func SetStatefulSetReady

func SetStatefulSetReady(s *appsv1.StatefulSet)

SetStatefulSetReady updates the status sub-resource of the passed in StatefulSet with ObservedGeneration, Replicas and ReadyReplicas ensuring that the StatefulSet ready check will succeed.

func StringArrayIterator

func StringArrayIterator(element interface{}) string

func SwitchDirectory

func SwitchDirectory(path string) func()

SwitchDirectory sets the working directory and returns a function to revert to the previous one.

func VolumeIterator

func VolumeIterator(element interface{}) string

func VolumeMountIterator

func VolumeMountIterator(element interface{}) string

Types

type EtcdBuilder

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

func EtcdBuilderWithDefaults

func EtcdBuilderWithDefaults(name, namespace string) *EtcdBuilder

func EtcdBuilderWithoutDefaults

func EtcdBuilderWithoutDefaults(name, namespace string) *EtcdBuilder

func (*EtcdBuilder) Build

func (eb *EtcdBuilder) Build() *druidv1alpha1.Etcd

func (*EtcdBuilder) WithProviderABS

func (eb *EtcdBuilder) WithProviderABS() *EtcdBuilder

func (*EtcdBuilder) WithProviderGCS

func (eb *EtcdBuilder) WithProviderGCS() *EtcdBuilder

func (*EtcdBuilder) WithProviderLocal added in v0.21.0

func (eb *EtcdBuilder) WithProviderLocal() *EtcdBuilder

func (*EtcdBuilder) WithProviderOSS

func (eb *EtcdBuilder) WithProviderOSS() *EtcdBuilder

func (*EtcdBuilder) WithProviderS3

func (eb *EtcdBuilder) WithProviderS3() *EtcdBuilder

func (*EtcdBuilder) WithProviderSwift

func (eb *EtcdBuilder) WithProviderSwift() *EtcdBuilder

func (*EtcdBuilder) WithReadyStatus

func (eb *EtcdBuilder) WithReadyStatus() *EtcdBuilder

func (*EtcdBuilder) WithReplicas

func (eb *EtcdBuilder) WithReplicas(replicas int32) *EtcdBuilder

func (*EtcdBuilder) WithStorageProvider

func (eb *EtcdBuilder) WithStorageProvider(provider druidv1alpha1.StorageProvider) *EtcdBuilder

func (*EtcdBuilder) WithTLS

func (eb *EtcdBuilder) WithTLS() *EtcdBuilder

Jump to

Keyboard shortcuts

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