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 CD sync might fail to create if app contains CRD and instance of the same CRD #1940

Closed
alexmt opened this issue Jul 15, 2019 · 1 comment · Fixed by #1999
Closed

Argo CD sync might fail to create if app contains CRD and instance of the same CRD #1940

alexmt opened this issue Jul 15, 2019 · 1 comment · Fixed by #1999
Labels
bug Something isn't working
Milestone

Comments

@alexmt
Copy link
Collaborator

alexmt commented Jul 15, 2019

Describe the bug
Argo CD sync might fail to create if app contains CRD and instance of the same CRD. Although Argo CD creates resources in the right order( CRD first then everything else ) sync still might fail because Kubernetes needs some time after CRD creation.

To Reproduce
Existing e2e test TestCRDs is flaky. Controller has logs which prove that CRD got successfully created but creation of the instance of the same CRD fails:

INFO[0084] Applying resource ClusterDummy/cluster-dummy-crd-instance in cluster: https://default-8993bb99-b78b-496c-b705-f99154b61c88:6443, namespace: argocd-e2e-test-cr-ds-yteju 
DEBU[0084] {"apiVersion":"argoproj.io/v1alpha1","kind":"ClusterDummy","metadata":{"labels":{"app.kubernetes.io/instance":"test-cr-ds"},"name":"cluster-dummy-crd-instance","namespace":"argocd-e2e-test-cr-ds-yteju"}} 
INFO[0084] kubectl --kubeconfig /dev/shm/443155372 -f - apply -n argocd-e2e-test-cr-ds-yteju  dir= execID=g8B4v
DEBU[0085] Start watch Dummy.argoproj.io on https://kubernetes.default.svc 
DEBU[0085]                                               duration=499.710968ms execID=g8B4v
ERRO[0085] `kubectl --kubeconfig /dev/shm/443155372 -f - apply -n argocd-e2e-test-cr-ds-yteju` failed exit status 1: error: unable to recognize "STDIN": no matches for kind "ClusterDummy" in version "argoproj.io/v1alpha1"  execID=g8B4v
INFO[0085] adding resource result, status: 'SyncFailed', phase: 'Failed', message: '`kubectl --kubeconfig /dev/shm/443155372 -f - apply -n argocd-e2e-test-cr-ds-yteju` failed exit status 1: error: no matches for kind "ClusterDummy" in version "argoproj.io/v1alpha1"'  application=test-cr-ds kind=ClusterDummy name=cluster-dummy-crd-instance namespace=argocd-e2e-test-cr-ds-yteju phase=Sync

Version*: v1.2.0

@alexec
Copy link
Contributor

alexec commented Jul 23, 2019

Could we work-around by running CRDs in PreSync phase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants