k8stools

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareObjectMeta

func CompareObjectMeta(t *testing.T, got, want metav1.ObjectMeta)

func GetTestClientWithObjects

func GetTestClientWithObjects(predefinedObjects []runtime.Object) client.Client

func ListClusterWideObjects

func ListClusterWideObjects(ctx context.Context, rclient client.Client, objectType client.ObjectList, cb func(r runtime.Object)) error

ListClusterWideObjects helper func, default client cannot get objects at cluster scope, this func retrieves objects and applies given callback to it.

func MergePatchContainers

func MergePatchContainers(base, patches []v1.Container) ([]v1.Container, error)

MergePatchContainers adds patches to base using a strategic merge patch and iterating by container name, failing on the first error

func SanitizeVolumeName

func SanitizeVolumeName(name string) string

func UpdatePodAnnotations

func UpdatePodAnnotations(ctx context.Context, rclient client.Client, selector map[string]string, ns string) error

UpdatePodAnnotations - updates configmap-sync-time annotation it triggers config rules reload for vmalert

Types

This section is empty.

Jump to

Keyboard shortcuts

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