Documentation ¶
Index ¶
Constants ¶
View Source
const (
AnnotationKeyHubWorkflowUID = "workflows.argoproj.io/ocm-hub-workflow-uid"
)
Variables ¶
View Source
var WorkflowPredicateFunctions = predicate.Funcs{ UpdateFunc: func(e event.UpdateEvent) bool { newWf := e.ObjectNew.(*argov1alpha1.Workflow) oldWf := e.ObjectOld.(*argov1alpha1.Workflow) return containsValidOCMAnnotation(*newWf) && !reflect.DeepEqual(newWf.Status, oldWf.Status) }, CreateFunc: func(e event.CreateEvent) bool { workflow := e.Object.(*argov1alpha1.Workflow) return containsValidOCMAnnotation(*workflow) }, DeleteFunc: func(e event.DeleteEvent) bool { return false }, }
Functions ¶
Types ¶
type AgentOptions ¶
type AgentOptions struct { Log logr.Logger HubKubeconfigFile string SpokeClusterName string AddonName string AddonNamespace string }
AgentOptions defines the flags for workload agent
func NewAgentOptions ¶
func NewAgentOptions(addonName string, logger logr.Logger) *AgentOptions
NewWorkloadAgentOptions returns the flags with default value set
func (*AgentOptions) AddFlags ¶
func (o *AgentOptions) AddFlags(cmd *cobra.Command)
type ArgoWorkflowStatusController ¶
type ArgoWorkflowStatusController struct {
// contains filtered or unexported fields
}
func (*ArgoWorkflowStatusController) Reconcile ¶
func (c *ArgoWorkflowStatusController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile Workflow status changes and create/update a Workflow CR in the hub cluster's managed cluster namespace This agent only has permission to create/update in that particular namespace so the hub cluster will need another controller that sync the Workflow status from hub's managed cluster namespace to the original dormant Workflow.
func (*ArgoWorkflowStatusController) SetupWithManager ¶
func (c *ArgoWorkflowStatusController) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.