Documentation ¶
Index ¶
- Constants
- func GetDeletePropagationPolicyAnnotation(obj KubernetesObject) *metav1.DeletionPropagation
- func IsObjectTaggedToDelete(obj KubernetesObject) bool
- func NewAPIClientReader(mgr manager.Manager) (client.Client, error)
- func ObjectInfo(obj KubernetesObject) string
- func ObjectKey(obj KubernetesObject) types.NamespacedName
- func TagObjectToDelete(obj KubernetesObject)
- func TagToObjectDeleteWithPropagationPolicy(obj KubernetesObject, deletionPropagationPolicy metav1.DeletionPropagation)
- type Condition
- type ConditionReason
- type ConditionType
- type Conditions
- func (conditions Conditions) Copy() Conditions
- func (conditions Conditions) GetCondition(t ConditionType) *Condition
- func (conditions Conditions) IsFalseFor(t ConditionType) bool
- func (conditions Conditions) IsTrueFor(t ConditionType) bool
- func (conditions Conditions) IsUnknownFor(t ConditionType) bool
- func (conditions Conditions) MarshalJSON() ([]byte, error)
- func (conditions *Conditions) RemoveCondition(t ConditionType) bool
- func (conditions *Conditions) SetCondition(newCond Condition) bool
- type KubernetesObject
Constants ¶
const ( DeleteTagAnnotation = "apps.3scale.net/delete" DeletePropagationPolicyTagAnnotation = "apps.3scale.net/delete-propagation-policy" )
const (
MonitoringKey = "middleware"
)
Constants
Variables ¶
This section is empty.
Functions ¶
func GetDeletePropagationPolicyAnnotation ¶ added in v0.6.0
func GetDeletePropagationPolicyAnnotation(obj KubernetesObject) *metav1.DeletionPropagation
func IsObjectTaggedToDelete ¶ added in v0.6.0
func IsObjectTaggedToDelete(obj KubernetesObject) bool
func NewAPIClientReader ¶ added in v0.6.0
We create an Client Reader that directly queries the API server without going to the Cache provided by the Manager's Client because there are some resources that do not implement Watch (like ImageStreamTag) and the Manager's Client always tries to use the Cache when reading
func ObjectInfo ¶ added in v0.6.0
func ObjectInfo(obj KubernetesObject) string
func ObjectKey ¶ added in v0.6.0
func ObjectKey(obj KubernetesObject) types.NamespacedName
func TagObjectToDelete ¶ added in v0.6.0
func TagObjectToDelete(obj KubernetesObject)
func TagToObjectDeleteWithPropagationPolicy ¶ added in v0.6.0
func TagToObjectDeleteWithPropagationPolicy(obj KubernetesObject, deletionPropagationPolicy metav1.DeletionPropagation)
Types ¶
type Condition ¶ added in v0.6.0
type Condition struct { Type ConditionType `json:"type"` Status corev1.ConditionStatus `json:"status"` // +optional Reason ConditionReason `json:"reason,omitempty"` // +optional Message string `json:"message,omitempty"` // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
Condition represents an observation of an object's state. Conditions are an extension mechanism intended to be used when the details of an observation are not a priori known or would not apply to all instances of a given Kind.
Conditions should be added to explicitly convey properties that users and components care about rather than requiring those properties to be inferred from other observations. Once defined, the meaning of a Condition can not be changed arbitrarily - it becomes part of the API, and has the same backwards- and forwards-compatibility concerns of any other part of the API.
func (*Condition) DeepCopyInto ¶ added in v0.6.0
DeepCopyInto copies in into out.
type ConditionReason ¶ added in v0.6.0
type ConditionReason string
ConditionReason is intended to be a one-word, CamelCase representation of the category of cause of the current status. It is intended to be used in concise output, such as one-line kubectl get output, and in summarizing occurrences of causes.
type ConditionType ¶ added in v0.6.0
type ConditionType string
ConditionType is the type of the condition and is typically a CamelCased word or short phrase.
Condition types should indicate state in the "abnormal-true" polarity. For example, if the condition indicates when a policy is invalid, the "is valid" case is probably the norm, so the condition should be called "Invalid".
type Conditions ¶ added in v0.6.0
type Conditions []Condition
Conditions is a set of Condition instances.
func NewConditions ¶ added in v0.6.0
func NewConditions(conds ...Condition) Conditions
NewConditions initializes a set of conditions with the given list of conditions.
func (Conditions) Copy ¶ added in v0.6.0
func (conditions Conditions) Copy() Conditions
func (Conditions) GetCondition ¶ added in v0.6.0
func (conditions Conditions) GetCondition(t ConditionType) *Condition
GetCondition searches the set of conditions for the condition with the given ConditionType and returns it. If the matching condition is not found, GetCondition returns nil.
func (Conditions) IsFalseFor ¶ added in v0.6.0
func (conditions Conditions) IsFalseFor(t ConditionType) bool
IsFalseFor searches the set of conditions for a condition with the given ConditionType. If found, it returns `condition.IsFalse()`. If not found, it returns false.
func (Conditions) IsTrueFor ¶ added in v0.6.0
func (conditions Conditions) IsTrueFor(t ConditionType) bool
IsTrueFor searches the set of conditions for a condition with the given ConditionType. If found, it returns `condition.IsTrue()`. If not found, it returns false.
func (Conditions) IsUnknownFor ¶ added in v0.6.0
func (conditions Conditions) IsUnknownFor(t ConditionType) bool
IsUnknownFor searches the set of conditions for a condition with the given ConditionType. If found, it returns `condition.IsUnknown()`. If not found, it returns true.
func (Conditions) MarshalJSON ¶ added in v0.6.0
func (conditions Conditions) MarshalJSON() ([]byte, error)
MarshalJSON marshals the set of conditions as a JSON array, sorted by condition type.
func (*Conditions) RemoveCondition ¶ added in v0.6.0
func (conditions *Conditions) RemoveCondition(t ConditionType) bool
RemoveCondition removes the condition with the given ConditionType from the conditions set. If no condition with that type is found, RemoveCondition returns without performing any action. If the passed condition type is not found in the set of conditions, RemoveCondition returns false.
func (*Conditions) SetCondition ¶ added in v0.6.0
func (conditions *Conditions) SetCondition(newCond Condition) bool
SetCondition adds (or updates) the set of conditions with the given condition. It returns a boolean value indicating whether the set condition is new or was a change to the existing condition with the same type.