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

need ossmconsole CRD even for non-openshift environs #6788

Closed
jmazzitelli opened this issue Oct 27, 2023 · 2 comments · Fixed by kiali/kiali-operator#709
Closed

need ossmconsole CRD even for non-openshift environs #6788

jmazzitelli opened this issue Oct 27, 2023 · 2 comments · Fixed by kiali/kiali-operator#709
Assignees
Labels
backlog Triaged Issue added to backlog bug Something isn't working

Comments

@jmazzitelli
Copy link
Collaborator

This is happening in master builds - not affecting any releases (yet - it will affect the next release when the operator handles ossmc installs).

I was hoping we did not have to install the OSSMConsole CRD on non-OpenShift environments, but right now there isn't a way. The operator watches.yaml declares to the operator it should watch for OSSMConsole CRs. So if the CRD does not exist (and it won't if you install the Operator using OLM - the upstream OLM metadata doesn't include the CRD - only the Kiali CRD exists) then this error will occur and the operator exits:

{"level":"error","ts":"2023-10-26T23:57:33Z","logger":"controller-runtime.source","msg":
"if kind is a CRD, it should be installed before calling Start","kind":"OSSMConsole.kiali.io",
"error":"no matches for kind \"OSSMConsole\" in version \"kiali.io/v1alpha1\"","stacktrace":
...
{"level":"error","ts":"2023-10-27T00:05:14Z","logger":"cmd","msg":"Proxy or operator exited with error.","Namespace":"","error":"failed to wait for ossmconsole-controller caches to sync: timed out waiting for cache to be synced"
...

We need to add the CRD to the upstream metadata so this error is avoided. The operator helm chart includes this OSSMConsole CRD already, so that isn't an issue when helm installed

In the future it would be nice to not have the operator require this CRD to be installed on non-OpenShift environments, but I don't know how to make the watches.yaml declare to the operator that it is OPTIONAL.

@jmazzitelli jmazzitelli added the bug Something isn't working label Oct 27, 2023
@jmazzitelli jmazzitelli self-assigned this Oct 27, 2023
@jmazzitelli jmazzitelli added the backlog Triaged Issue added to backlog label Oct 27, 2023
@jmazzitelli jmazzitelli moved this from 📋 Backlog to 🏗 In progress in Kiali Sprint 25-01 | Kiali v2.4 Oct 27, 2023
@jmazzitelli
Copy link
Collaborator Author

jmazzitelli commented Oct 27, 2023

These are the replication steps that I used to see the issue.

  1. Start up minikube (you don't need Istio for this test). You can do this via the hack scripts:
hack/k8s-minikube.sh start
  1. Use this one command to (1) install OLM into the cluster, (2) build the operator image, (3) push the operator image into the cluster, and (4) deploy the operator via OLM:
make -e CLUSTER_TYPE=minikube -e OLM_BUNDLE_PACKAGE=kiali -e OC=$(which kubectl) olm-install cluster-push-operator olm-operator-create
  1. Eventually the error appears and the operator will stop (and restart)

jmazzitelli added a commit to jmazzitelli/kiali-operator that referenced this issue Oct 27, 2023
This can be useful if OpenShift users want to use the
upstream OLM metadata when installing the Kiali Operator.
fixes: kiali/kiali#6788
@jmazzitelli jmazzitelli moved this from 🏗 In progress to 👀 In review in Kiali Sprint 25-01 | Kiali v2.4 Oct 27, 2023
jmazzitelli added a commit to kiali/kiali-operator that referenced this issue Oct 27, 2023
This can be useful if OpenShift users want to use the
upstream OLM metadata when installing the Kiali Operator.
fixes: kiali/kiali#6788
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Kiali Sprint 25-01 | Kiali v2.4 Oct 27, 2023
@jmazzitelli
Copy link
Collaborator Author

The solution to this was redone via this issue and its PR (essentially, the OSSMConsole CRD will not be installed on non-OpenShift environments).

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

Successfully merging a pull request may close this issue.

1 participant