kubernetes

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNamespacedNameSplit = errors.New("unable to decode string into NamespacedName")

Functions

func AddFinalizerIfNeeded

func AddFinalizerIfNeeded(ctx context.Context, c client.Client, object client.Object, finalizer string) error

AddFinalizerIfNeeded adds a finalizer via patch if is not present in the object

func RemoveFinalizerIfNeeded

func RemoveFinalizerIfNeeded(ctx context.Context, c client.Client, object client.Object, finalizer string) error

RemoveFinalizerIfNeeded removes a finalizer via patch if is present in the object

func SendErrorAsEvent

func SendErrorAsEvent(r record.EventRecorder, err error, objects ...runtime.Object) error

SendErrorAsEvent sends an event for an error to the given objects and returns the error. It cast some openstack errors to send more information of the error in the event.

func ToNamespacedName added in v0.12.0

func ToNamespacedName(nnString string) (types.NamespacedName, error)

Types

type Version added in v0.12.0

type Version struct {
	Major int
	Minor int
}

func GetVersion added in v0.12.0

func GetVersion(client *discovery.DiscoveryClient) (*Version, error)

func (*Version) IsEqual added in v0.12.0

func (v *Version) IsEqual(version *Version) bool

func (*Version) IsGreater added in v0.12.0

func (v *Version) IsGreater(version *Version) bool

func (*Version) IsLower added in v0.12.0

func (v *Version) IsLower(version *Version) bool

Jump to

Keyboard shortcuts

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