argoproj / argo-helm

ArgoProj Helm Charts
https://argoproj.github.io/argo-helm/
Apache License 2.0
1.62k stars 1.82k forks source link

Installing Argo Workflows using Helm results in an error indicating no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1" #2751

Open JMusana1 opened 4 weeks ago

JMusana1 commented 4 weeks ago

Describe the bug

The bug occurs when attempting to install the Argo Workflows Helm chart. The installation fails with the error message indicating that the CRD clusterworkflowtemplates.argoproj.io cannot be found because the API version apiextensions.k8s.io/v1beta1 is not recognized. This suggests that the CRD definitions in the Helm chart are outdated and still using the deprecated v1beta1 API version, which is incompatible with newer Kubernetes versions that require apiextensions.k8s.io/v1.

Related helm chart

argo-workflows

Helm chart version

1.0.0

To Reproduce

  1. Download the Helm chart for Argo Workflows.
  2. Attempt to install the chart using Helm.
  3. Observe the error message below
**Error: failed to install CRD crds/cluster-workflow-template-crd.yaml: resource mapping not found for name: "clusterworkflowtemplates.argoproj.io" namespace: "" from "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"
│ ensure CRDs are installed first**

Expected behavior

The Helm chart should install successfully without errors related to CRD versions.

Screenshots

No response

Additional context

Kubernetes version: v1.29.4 Helm version: v3.5.0

yu-croco commented 4 weeks ago

Hi @JMusana1 , thank you for opening the issue.

Helm chart version 1.0.0

Which Helm Chart version do you use? The latest one for argo-workflows is 0.41.7 .

Error: failed to install CRD crds/cluster-workflow-template-crd.yaml: resource mapping not found for name: "clusterworkflowtemplates.argoproj.io" namespace: "" from "": no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1" │ ensure CRDs are installed first

I wonder why the file path (crds/cluster-workflow-template-crd.yaml) is different from latest one. Also there is no apiextensions.k8s.io/v1beta1 in latest one CRD, so I wonder you use very old version of argo-workflows Helm Chart.

I tested on my local environment with kind (cluster version 1.30) and I could installed argo-workflow Helm Chart properly with default value.

$ helm version
version.BuildInfo{Version:"v3.15.1", GitCommit:"e211f2aa62992bd72586b395de50979e31231829", GitTreeState:"clean", GoVersion:"go1.22.3"}

$ kubectl version
Client Version: v1.30.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.30.0

$ helm install argo .
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /Users/aikawa/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /Users/aikawa/.kube/config
NAME: argo
LAST DEPLOYED: Sat Jun  8 19:53:37 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

$ kubectl get crd
NAME                                   CREATED AT
clusterworkflowtemplates.argoproj.io   2024-06-08T10:53:37Z
cronworkflows.argoproj.io              2024-06-08T10:53:37Z
workflowartifactgctasks.argoproj.io    2024-06-08T10:53:37Z
workfloweventbindings.argoproj.io      2024-06-08T10:53:37Z
workflows.argoproj.io                  2024-06-08T10:53:37Z
workflowtaskresults.argoproj.io        2024-06-08T10:53:37Z
workflowtasksets.argoproj.io           2024-06-08T10:53:37Z
workflowtemplates.argoproj.io          2024-06-08T10:53:37Z

$ kubectl get po
NAME                                                       READY   STATUS    RESTARTS   AGE
argo-argo-workflows-server-797684df97-cqq4w                1/1     Running   0          7m
argo-argo-workflows-workflow-controller-5dc5b67d64-k5jlz   1/1     Running   0          7m