util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 21 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 any, salt string) (string, error)

func GetContainerByName

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

GetContainerByName

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 IsPodTemplasteChanged

func IsPodTemplasteChanged(newTplSpec, oldTplSpec *corev1.PodTemplateSpec, logger logr.Logger) bool

func IsStatefulsetChanged

func IsStatefulsetChanged(newSts, sts *appsv1.StatefulSet, logger logr.Logger) bool

IsStatefulsetChanged

func LoadCertConfigFromSecret

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

func ObjectKey

func ObjectKey(namespace, name string) client.ObjectKey

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