Skip to content
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

argo-workflows controller fails to process jobs if ClusterWorkflowTemplate CRD is not present #3038

Open
dmerrick opened this issue Nov 15, 2024 · 3 comments
Labels
argo-workflows awaiting-upstream Is waiting for a change upstream to be completed before it can be merged. bug Something isn't working

Comments

@dmerrick
Copy link

dmerrick commented Nov 15, 2024

Describe the bug

If you set clusterWorkflowTemplates.enabled=false, the corresponding CRD will not get installed

The issue is, the argo-workflows controller will still try to look for that CRD on startup, which leads to a controller failure with a confusingly-terse error message:

W1115 18:02:15.645866       1 reflector.go:324] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:167: failed to list *unstructured.Unstructured: the server could not find the requested resource
E1115 18:02:15.645922       1 reflector.go:138] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:167: Failed to watch *unstructured.Unstructured: failed to list *unstructured.Unstructured: the server could not find the requested resource

To make matters worse, the controller does not gracefully progress beyond this error. It will continue to attempt to fetch ClusterWorkflowTemplate CRD objects instead of moving on to process workflows. This leaves all workflows stuck in a pending state.

To get around this, you can set clusterWorkflowTemplates.enabled=true and apply the chart, which will create the corresponding CRD. You can then revert that change and the controller will function as expected.

Related helm chart

argo-workflows

Helm chart version

0.42.7

To Reproduce

On a new install:

  1. Set controller.clusterWorkflowTemplates.enabled=false and crds.install=true
  2. Apply the helm chart
  3. Launch a workflow

Expected behavior

I would expect that the controller would be able to function without the ClusterWorkflowTemplate CRD if clusterWorkflowTemplates.enabled=false

Screenshots

No response

Additional context

No response

@dmerrick dmerrick added the bug Something isn't working label Nov 15, 2024
@dmerrick dmerrick changed the title argo-workflows deployment fails if clusterWorkflowTemplates is disabled argo-workflows controller fails to process jobs if clusterWorkflowTemplates CRD is not present Nov 15, 2024
@dmerrick dmerrick changed the title argo-workflows controller fails to process jobs if clusterWorkflowTemplates CRD is not present argo-workflows controller fails to process jobs if ClusterWorkflowTemplate CRD is not present Nov 15, 2024
@yu-croco
Copy link
Collaborator

According to the condition in CRD, I wonder .Values.server.clusterWorkflowTemplates.enabled = false will help you?
Ref: https://github.com/argoproj/argo-helm/blob/main/charts/argo-workflows/templates/crds/argoproj.io_clusterworkflowtemplates.yaml#L1-L2

@dmerrick
Copy link
Author

Upon reflection, I believe this is a bug in argo-workflows itself and not necessarily the helm chart. I could see two fixes:

  1. update argo-workflows controller process to take a flag that disables clusterworkflowtemplate CRD lookups
  2. update this helm chart to create the clusterworkflowtemplate CRD even if it's set to be disabled

@yu-croco
Copy link
Collaborator

I believe this is a bug in argo-workflows itself and not necessarily the helm chart.

Please open an issue in upstream since argo-helm focuses on providing Helm Chart, instead of handling the specific behavior of Argo.

@yu-croco yu-croco added the awaiting-upstream Is waiting for a change upstream to be completed before it can be merged. label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argo-workflows awaiting-upstream Is waiting for a change upstream to be completed before it can be merged. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants