helper

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToString

func BoolToString(b bool) string

BoolToString returns a string depending on the given boolean value.

func CreateSpecHash added in v0.3.6

func CreateSpecHash(spec *helmclient.ChartSpec) (string, error)

CreateSpecHash returns a hash string constructed with the helm chart spec.

func GetValueFromSecret added in v0.3.4

func GetValueFromSecret(sec *corev1.Secret, key string) (string, error)

GetValueFromSecret returns a specific value of a secret key.

func NewRandomPassword

func NewRandomPassword(passwordStrength int32) (string, error)

NewRandomPassword returns a random secret string with a given length.

func ObjExists

func ObjExists(ctx context.Context, client client.Client, name, namespace string, obj runtime.Object) (bool, error)

ObjExists returns a boolean value based on the existence of a runtime object.

func PullFinalizer

func PullFinalizer(o metav1.Object, finalizer string)

func PushFinalizer

func PushFinalizer(o metav1.Object, finalizer string)

Types

type InterfaceHash

type InterfaceHash []byte

func GenerateHashFromInterfaces

func GenerateHashFromInterfaces(interfaces []interface{}) (InterfaceHash, error)

GenerateHashFromInterfaces returns a hash sum based on a slice of given interfaces.

func (*InterfaceHash) Short

func (hash *InterfaceHash) Short() string

Short returns the first 8 characters of an interface hash.

func (*InterfaceHash) String

func (hash *InterfaceHash) String() string

String returns the string value of an interface hash.

type JSONPatch

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

func (*JSONPatch) AddOp

func (p *JSONPatch) AddOp(op, path string, value interface{})

func (*JSONPatch) Data

func (p *JSONPatch) Data(obj runtime.Object) ([]byte, error)

func (*JSONPatch) Type

func (p *JSONPatch) Type() types.PatchType

Jump to

Keyboard shortcuts

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