util

package
v0.0.0-...-d46a6ae Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OAMObjectCurrentSpecAnnotationKey = v1alpha1.Group + v1alpha1.Separator + "oam-object-current-spec"
)

Variables

This section is empty.

Functions

func SpecEqual

func SpecEqual(object runtime.Object, curSpec interface{}, update bool) bool

SpecEqual compare object (such as *deployment, need to be pointer) and spec (such as DeploymentSpec) If flag update is set, the input object will change annotation if current spec is not equal to target spec. This function assumes object has field `ObjectMeta` which must be satisfied to use it. This function is designed to reduce traffic in EDAS reconcile. Other controller (such as rollout-controller) should not make assumption that object with same spec would not be updated repetitively although this function should filter these situations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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