Operator should wait after subscription for openshift-pipelines operator to get ready and in succeed phase.
acmenezes opened this issue · 5 comments
Bug Description
After creating the subscription to the openshift-pipelines operator the certification operator doesn't wait for the first operator to get ready. An error can occur without being notified and/or it may take more time than expected to fully install and break subsequent tasks.
Steps to Reproduce:
It's an intermittent problem may not be always reproducible.
Expected Result
Expect it to make sure that the openshift-pipelines is fully installed and ready to be used.
Actual Result
Although it is intermittent and doesn't happen always.
ERROR controller-runtime.source if kind is a CRD, it should be installed before calling Start {"kind": "Pipeline.tekton.dev", "error": "no matches for kind \"Pipeline\" in version \"tekton.dev/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.2/pkg/source/source.go:127
2021-11-18T20:42:53.084Z ERROR controller-runtime.source if kind is a CRD, it should be installed before calling Start {"kind": "Task.tekton.dev", "error": "no matches for kind \"Task\" in version \"tekton.dev/v1beta1\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.9.2/pkg/source/source.go:127
2021-11-18T20:42:53.084Z ERROR controller-runtime.manager.controller.operatorpipeline Could not wait for Cache to sync {"reconciler group": "certification.redhat.com", "reconciler kind": "OperatorPipeline", "error": "failed to wait for operatorpipeline caches to sync: no matches for kind \"Pipeline\" in version \"tekton.dev/v1beta1\""}
DeployableByOLM contains the logic to ensure that the CSV status is Succeeded. Here is the link: https://github.com/redhat-openshift-ecosystem/openshift-preflight/blob/46fa5bbd095366b69864edbe4718aecdb7c271e4/certification/internal/policy/operator/deployable_by_olm.go#L76
Thanks @samira-barouti ! Do you know if we are still keeping that install method? Or we are going to move towards setting the openshift-pipelines operator as an external dependency with OLM? I would like to see what the team has decided on that. Otherwise I can assign this one to myself and just use your suggestion.
I guess they come from the same problem. But they are different. Yet I think going with the OLM dependency way we may solve both issues.
- Relates #90