util

package
v0.0.0-...-3430a5a Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildOwnerReferences

func BuildOwnerReferences(obj client.Object) (refs []metav1.OwnerReference)

func BuildOwnerReferencesWithParents

func BuildOwnerReferencesWithParents(obj client.Object) (refs []metav1.OwnerReference)

func CheckRule

func CheckRule(aclRules string) error

func CheckUserRuleUpdate

func CheckUserRuleUpdate(ruleSource string) error

func ConvertMemoryUnit

func ConvertMemoryUnit(p string) (string, error)

ConvertMemoryUnit

func GenerateObjectSig

func GenerateObjectSig(data interface{}, salt string) (string, error)

func GenerateRedisRandPassword

func GenerateRedisRandPassword() string

func GenerateRedisRebuildAnnotation

func GenerateRedisRebuildAnnotation() map[string]string

func GetClaimName

func GetClaimName(backupDestination string) string

split storage name, example: pvc/redisfailover-persistent-keep-data-rfr-redis-sentinel-demo-0

func GetContainerByName

func GetContainerByName(pod *corev1.PodSpec, name string) *corev1.Container

GetContainerByName

func GetPullPolicy

func GetPullPolicy(policies ...corev1.PullPolicy) corev1.PullPolicy

func GetServicePortByName

func GetServicePortByName(svc *corev1.Service, name string) *corev1.ServicePort

func GetVolumeByName

func GetVolumeByName(vols []corev1.Volume, name string) *corev1.Volume

GetVolumes

func GetVolumeClaimTemplatesByName

func GetVolumeClaimTemplatesByName(vols []corev1.PersistentVolumeClaim, name string) *corev1.PersistentVolumeClaim

GetVolumeClaimTemplatesByName

func LoadCertConfigFromSecret

func LoadCertConfigFromSecret(secret *corev1.Secret) (*tls.Config, error)

func ObjectKey

func ObjectKey(namespace, name string) client.ObjectKey

func ParsePodIndex

func ParsePodIndex(name string) (index int, err error)

func ParseRedisMemConf

func ParseRedisMemConf(p string) (string, error)

func RetryOnTimeout

func RetryOnTimeout(f func() error, step int) error

func UnifyValueUnit

func UnifyValueUnit(v string) string

UnifyValueUnit value convert, not care the config itself

Types

type AuthConfig

type AuthConfig struct {
	Password  string
	TLSConfig *tls.Config
}

type SignaturableObject

type SignaturableObject interface {
	string | []byte
}

Jump to

Keyboard shortcuts

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