Closed joaomlneto closed 2 years ago
@joaomlneto Anything in the OLM operator container logs that would help explain why the PackageServer CSV is stuck in an Installing state?
Indeed, found the issue in the logs of olm-operator
:
I0511 16:13:01.213718 1 event.go:285] Event(v1.ObjectReference{Kind:"ClusterServiceVersion", Namespace:"olm", Name:"packageserver", UID:"7ad0ebf6-e82b-467f-81a0-7d5a6905284d", APIVersion:"operators.coreos.com/v1alpha1", ResourceVersion:"11286", FieldPath:""}): type: 'Normal' reason: 'InstallSucceeded' install strategy completed with no errors
time="2022-05-11T16:13:01Z" level=warning msg="could not retrieve Role extension-apiserver-authentication-reader" apiservice=v1.packages.operators.coreos.com csv=packageserver namespace=olm
I0511 16:13:01.257885 1 event.go:285] Event(v1.ObjectReference{Kind:"ClusterServiceVersion", Namespace:"olm", Name:"packageserver", UID:"7ad0ebf6-e82b-467f-81a0-7d5a6905284d", APIVersion:"operators.coreos.com/v1alpha1", ResourceVersion:"11301", FieldPath:""}): type: 'Warning' reason: 'APIServiceResourceIssue' role.rbac.authorization.k8s.io "extension-apiserver-authentication-reader" not found
time="2022-05-11T16:13:01Z" level=warning msg="could not retrieve Role extension-apiserver-authentication-reader" apiservice=v1.packages.operators.coreos.com csv=packageserver namespace=olm
microk8s
does not have Role-Based Access Control by default.
Enabling it via microk8s enable rbac
(docs) solves the issue:
# kubectl get csv -A
NAMESPACE NAME DISPLAY VERSION REPLACES PHASE
olm packageserver Package Server 0.21.1 Succeeded
Should this be documented somewhere?
Pod olm-operator-745fb9c45-w5ggb
:
Pod catalog-operator-7bfdc86d78-clhfq
Pod operaturhubio-catalog-6dffd
Pod packageserver-69f7948b9d-2q9k7
@joaomlneto Awesome - should we close this out, or do you think this is worth documenting? We mainly dev/test on kind and OCP clusters, although we have a daily action that runs OLM's quickstart instructions on minikube clusters. It might be possible to also extend those tests to microk8s clusters, but it's unclear whether this is worth the extra maintenance over time.
@joaomlneto good to see that you got it working. This issue can serve as documentation for any other users that look to install OLM onto microk8s
. They would have to enable RBAC on the cluster via microk8s enable rbac
for packageserver to install successfully.
Bug Report
Operator Lifecycle Manager
install.sh
script fails to install on a newmicrok8s
cluster on a clean Ubuntu 20.04 installation.Some observations
CSV "packageserver" failed to reach phase succeeded
.kubectl get csv -n "olm" packageserver -o jsonpath='{.status.phase}'
returnsInstalling
.Additionally, CPU usage hangs at 100% (1 full CPU core).(seems to be overall cluster CPU utilization; not tied to any container in particular)dns
,storage
,metallb
,helm3
.microk8s
/machine reboots.Steps to reproduce:
apt update && apt upgrade -y && apt install snapd -y && snap install microk8s --classic && snap install kubectl --classic
mkdir ~/.kube && microk8s config > .kube/config
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.20.0/install.sh | bash -s v0.20.0
v0.21.1:This fails because of https://github.com/operator-framework/operator-lifecycle-manager/issues/2767curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.21.1/install.sh | bash -s v0.21.1
curl -sL https://raw.githubusercontent.com/exdx/operator-lifecycle-manager/33e86c2850975a793e121b200476a95511179dc6/scripts/install.sh | bash -s v0.21.1
Expected
Actual Result
Environment
Kubernetes version information:
(Checked
microk8s
versionv1.23
andv1.24
)Kubernetes cluster kind: single-node
microk8s
Additional context Installing operators works fine, even if
packageserver
staysInstalling
(e.g. runningkubectl create -f https://operatorhub.io/install/strimzi-kafka-operator.yaml
)