Documentation ¶
Index ¶
- func GetGitTrackObjectCondition(status farosv1alpha1.GitTrackObjectStatus, ...) *farosv1alpha1.GitTrackObjectCondition
- func NewGitTrackObjectCondition(condType farosv1alpha1.GitTrackObjectConditionType, status v1.ConditionStatus, ...) *farosv1alpha1.GitTrackObjectCondition
- func RemoveGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, ...)
- func SetGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, ...)
- type ConditionReason
- type EnqueueRequestForOwner
- func (e *EnqueueRequestForOwner) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForOwner) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForOwner) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
- func (e *EnqueueRequestForOwner) InjectScheme(s *runtime.Scheme) error
- func (e *EnqueueRequestForOwner) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
- type UpdateStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitTrackObjectCondition ¶
func GetGitTrackObjectCondition(status farosv1alpha1.GitTrackObjectStatus, condType farosv1alpha1.GitTrackObjectConditionType) *farosv1alpha1.GitTrackObjectCondition
GetGitTrackObjectCondition returns the condition with the provided type.
func NewGitTrackObjectCondition ¶
func NewGitTrackObjectCondition(condType farosv1alpha1.GitTrackObjectConditionType, status v1.ConditionStatus, reason ConditionReason, message string) *farosv1alpha1.GitTrackObjectCondition
NewGitTrackObjectCondition creates a new GitTrackObject condition.
func RemoveGitTrackObjectCondition ¶
func RemoveGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, condType farosv1alpha1.GitTrackObjectConditionType)
RemoveGitTrackObjectCondition removes the GitTrackObject condition with the provided type.
func SetGitTrackObjectCondition ¶
func SetGitTrackObjectCondition(status *farosv1alpha1.GitTrackObjectStatus, condition farosv1alpha1.GitTrackObjectCondition)
SetGitTrackObjectCondition updates the GitTrackObject to include the provided condition. If the condition that we are about to add already exists and has the same status and reason then we are not going to update.
Types ¶
type ConditionReason ¶
type ConditionReason string
ConditionReason represents a valid condition reason
const ( // ChildAppliedSuccess represents the condition reason when no error occurs // applying the child object ChildAppliedSuccess ConditionReason = "ChildAppliedSuccess" // ErrorAddingOwnerReference represents the condition reason when the child's // Owner reference cannot be set ErrorAddingOwnerReference ConditionReason = "ErrorAddingOwnerReference" // ErrorUnmarshallingData represents the condition reason when the object's // data cannot be unmarshalled ErrorUnmarshallingData ConditionReason = "ErrorUnmarshallingData" // ErrorCreatingChild represents the condition reason when the controller // hits an error trying to create the child ErrorCreatingChild ConditionReason = "ErrorCreatingChild" // ErrorGettingChild represents the condition reason when the controller // hits an error trying to get the child ErrorGettingChild ConditionReason = "ErrorGettingChild" // ErrorUpdatingChild represents the condition reason when the controller // hits an error trying to update the child ErrorUpdatingChild ConditionReason = "ErrorUpdatingChild" // ErrorWatchingChild represents the condition reason when the controller // cannot create an informer for the child's kind ErrorWatchingChild ConditionReason = "ErrorWatchingChild" )
type EnqueueRequestForOwner ¶
type EnqueueRequestForOwner struct { NamespacedEnqueueRequestForOwner *handler.EnqueueRequestForOwner NonNamespacedEnqueueRequestForOwner *handler.EnqueueRequestForOwner RestMapper meta.RESTMapper }
EnqueueRequestForOwner enqueues Requests for the Owners of an object. E.g. the object that created the object that was the source of the Event.
This implementation handles both namespaced and non-namespaced resources
func (*EnqueueRequestForOwner) Create ¶
func (e *EnqueueRequestForOwner) Create(evt event.CreateEvent, q workqueue.RateLimitingInterface)
Create implements EventHandler
func (*EnqueueRequestForOwner) Delete ¶
func (e *EnqueueRequestForOwner) Delete(evt event.DeleteEvent, q workqueue.RateLimitingInterface)
Delete implements EventHandler
func (*EnqueueRequestForOwner) Generic ¶
func (e *EnqueueRequestForOwner) Generic(evt event.GenericEvent, q workqueue.RateLimitingInterface)
Generic implements EventHandler
func (*EnqueueRequestForOwner) InjectScheme ¶
func (e *EnqueueRequestForOwner) InjectScheme(s *runtime.Scheme) error
InjectScheme is called by the Controller to provide a singleton scheme to the EnqueueRequestForOwner.
func (*EnqueueRequestForOwner) Update ¶
func (e *EnqueueRequestForOwner) Update(evt event.UpdateEvent, q workqueue.RateLimitingInterface)
Update implements EventHandler
type UpdateStrategy ¶
type UpdateStrategy string
UpdateStrategy represents a valid update strategy
const ( // DefaultUpdateStrategy represents the default update strategy where a // resource should be updated in-place DefaultUpdateStrategy UpdateStrategy = "update" // NeverUpdateStrategy represents the update strategy where a resource should // never be updated NeverUpdateStrategy UpdateStrategy = "never" // RecreateUpdateStrategy represents the update strategy where a resource should // first be deleted and then created again, rather than updated in-place RecreateUpdateStrategy UpdateStrategy = "recreate" )
func GetUpdateStrategy ¶
func GetUpdateStrategy(obj *unstructured.Unstructured) (UpdateStrategy, error)
GetUpdateStrategy returns the value of the `faros.pusher.com/update-strategy` annotation, or the default value if one doesn't exist