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
Labels
bug
Milestone

Comments

@alexmt
Copy link
Contributor

@alexmt 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

This comment has been minimized.

Copy link
Contributor

@alexec alexec commented Jul 23, 2019

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

alexmt added a commit to alexmt/argo-cd that referenced this issue Jul 24, 2019
@alexmt alexmt added this to the v1.2 milestone Jul 24, 2019
alexmt added a commit to alexmt/argo-cd that referenced this issue Jul 24, 2019
@alexmt alexmt closed this in #1999 Jul 24, 2019
alexmt added a commit that referenced this issue Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.