Conditional install by OLM
Type of question
Are you asking about community best practices, how to implement a specific feature, or about general context and help around the operator-sdk?
How-to
Question
What did you do? When installing Operator through OLM, is there a way to do conditional install? What I want to achive is that, duing Operator install time, check if some conditions are met. If they are, perform additional tasks or grant additional RBAC.
For example, when installing my Operator on a K8S cluster that cert-manager.io/v1 CRD exists, grant cert-manager.io/v1 RBAC access to my Operator service account.
What did you expect to see? A clear and concise description of what you expected to happen (or insert a code snippet).
What did you see instead? Under which circumstances? A clear and concise description of what you expected to happen (or insert a code snippet).
Environment
- operator-lifecycle-manager version:
- Kubernetes version information:
- Kubernetes cluster kind:
Additional context Add any other context about the question here.
Hi @zeusng-fast,
Could you provide some additional details around your use case? Is it more broadly around installing operators conditionally or simply to enable an operator install to work with cert-manager?
The OLM integration with cert-manager is something that has been on the roadmap for a while, although it has yet to be done we plan on providing first-class integration with cert-manager in the future.
APIs don't need to exist on the cluster for roles/role bindings to be created. To have access to cert manager resources if the CRD is installed, just request access. Your operator will need to react correctly if the API isn't available when talking to the kube api server.
I feel like there may be more to this issue though - did you have other use cases you were thinking of?