-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Use WorkflowTemplate/ClusterWorkflowTemplate Informers when validating CronWorkflows #11470
Conversation
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
@@ -135,7 +135,7 @@ kind: ClusterWorkflowTemplate | |||
metadata: | |||
name: cluster-workflow-template-submittable | |||
spec: | |||
entryPoint: whalesay-template | |||
entrypoint: whalesay-template | |||
arguments: | |||
parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related but this is a typo
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
} | ||
|
||
func NewClusterWorkflowTemplateFromInformerGetter(cwftmplInformer wfextvv1alpha1.ClusterWorkflowTemplateInformer) templateresolution.ClusterWorkflowTemplateGetter { | ||
return &ClusterWorkflowTemplateFromInformerGetter{cwftmplInformer: cwftmplInformer} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me know if there's a better place to put this struct...
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you!
…idating CronWorkflows (#11470) Signed-off-by: Julie Vogelman <julievogelman0@gmail.com>
…idating CronWorkflows (argoproj#11470) Signed-off-by: Julie Vogelman <julievogelman0@gmail.com> Signed-off-by: Dillen Padhiar <dillen_padhiar@intuit.com>
Fixes #11372
Motivation
When a CronWorkflow gets run it first gets validated. If it contains a WorkflowTemplate or CronWorkflowTemplate, it goes to the K8S API to get the spec to do the validation, rather than using what's already been stored locally in the Informer caches.
Modifications
Uses the WorkflowTemplate Informer and ClusterWorkflowTemplate Informer instead.
Verification