apis

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	// ObservedGeneration is the 'Generation' of the resource that
	// was last processed by the controller.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions the latest available observations of a resource's current state.
	// +optional
	// +patchMergeKey=type
	// +patchStrategy=merge
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}

Status is the minimally expected status subresource. +k8s:deepcopy-gen=true

func (*Status) ConditionIsTrue

func (s *Status) ConditionIsTrue(t string) bool

ConditionIsTrue return true if the condition of specified type has status 'True'

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Status) GetCondition

func (s *Status) GetCondition(t string) *metav1.Condition

GetCondition fetches the condition of the specified type.

func (*Status) SetCondition

func (s *Status) SetCondition(newCondition metav1.Condition)

SetCondition sets the newCondition in conditions.

  1. if the condition of the specified type already exists, all fields of the existing condition are updated to newCondition, LastTransitionTime is set to now if the new status differs from the old status
  2. if a condition of the specified type does not exist, LastTransitionTime is set to now() if unset and newCondition is appended

Jump to

Keyboard shortcuts

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