utils

package
v0.0.0-...-f0ef8f0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterValues

func FilterValues(vs []string, f func(string) bool) []string

FilterValues Takes a slice of strings and returns a new slice that is filtered by the passed function

func IsEmptyPatch

func IsEmptyPatch(b []byte) bool

IsEmptyPatch returns true if a generate patch is empty

func NodeTargetingHasChanged

func NodeTargetingHasChanged(oldNode *corev1.Node, newNode *corev1.Node) bool

NodeTargetingHasChanged checks for changes in targetable aspects between two nodes

func TargetableLabelsAreDifferent

func TargetableLabelsAreDifferent(m1 map[string]string, m2 map[string]string) bool

TargetableLabelsAreDifferent compares two maps and looks for changes, But ignores any keys that are applied by kube-valet to avoid loops.

Types

type JsonPatchOperation

type JsonPatchOperation struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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