comparators

package
v0.0.0-...-81cd6e7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreResourceRequementsSame

func AreResourceRequementsSame(lhs, rhs v1.ResourceRequirements) bool

func AreSelectorsSame

func AreSelectorsSame(lhs, rhs map[string]string) bool

func AreStringMapsSame

func AreStringMapsSame(lhs, rhs map[string]string) bool

AreStringMapsSame compares two maps which are string key/value

func AreTolerationsSame

func AreTolerationsSame(lhs, rhs []v1.Toleration) bool

AreTolerationsSame compares two lists of tolerations for equality

func CompareVersionArrays

func CompareVersionArrays(lhs, rhs []int) int

CompareVersionArrays will return one of: -1 : if lhs > rhs 0 : if lhs == rhs 1 : if rhs > lhs

func ContainsSameTolerations

func ContainsSameTolerations(lhs, rhs []v1.Toleration) bool

containsSameTolerations checks that the tolerations in rhs are all contained within lhs this follows our other patterns of "current, desired"

func ContainsSameVolumeMounts

func ContainsSameVolumeMounts(lhs, rhs []corev1.VolumeMount) bool

check that all of rhs (desired) are contained within lhs (current)

func EnvFieldRefEqual

func EnvFieldRefEqual(lhs, rhs v1.ObjectFieldSelector) bool

func EnvResourceFieldRefEqual

func EnvResourceFieldRefEqual(lhs, rhs v1.ResourceFieldSelector) bool

func EnvValueEqual

func EnvValueEqual(lhs, rhs []v1.EnvVar) bool

* EnvValueEqual - check if 2 EnvValues are equal or not Notes: - reflect.DeepEqual does not return expected results if the to-be-compared value is a pointer. - needs to adjust with k8s.io/api/core/v#/types.go when the types are updated. *

func EnvVarEqual

func EnvVarEqual(lhs, rhs v1.EnvVar) bool

func EnvVarSourceEqual

func EnvVarSourceEqual(lhs, rhs v1.EnvVarSource) bool

Types

type Version

type Version string

func (Version) ToArray

func (v Version) ToArray() ([]int, error)

Jump to

Keyboard shortcuts

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