Skip to content
This repository was archived by the owner on Sep 21, 2020. It is now read-only.

OLM cannot update memcached operator CSV #31

Closed
smanpathak opened this issue Dec 4, 2018 · 5 comments
Closed

OLM cannot update memcached operator CSV #31

smanpathak opened this issue Dec 4, 2018 · 5 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@smanpathak
Copy link
Contributor

I followed guides to deploy upstream olm on minikube. Then created a memcached operator. I applied the CRD and role, sa and sa-binding from deploy directory of memcached scaffold.

Now, OLM cannot update CSV status with error:
level=info msg="error updating ClusterServiceVersion status: the server could not find the requested resource (put clusterserviceversions.operators.coreos.com memcachedoperator.v0.0.1)" csv=memcachedoperator.v0.0.1 namespace=default phase=

Strange thing is, it can list the CSVs using same client and that list contains memcachedoperator

@smanpathak
Copy link
Contributor Author

@smanpathak
Copy link
Contributor Author

I removed subresource from updatestatus call --
result = &v1alpha1.ClusterServiceVersion{}
err = c.client.Put().
Namespace(c.ns).
Resource("clusterserviceversions").
Name(clusterServiceVersion.Name).
//SubResource("status").
Body(clusterServiceVersion).
Do().
Into(result)

And then it started working.

@smanpathak
Copy link
Contributor Author

Another issue is that the CSV specifies policyrule as '*' for API groups, resources and verbs while the operator creates a finer RBAC policy for memcached-operator. They don't match and CSV remains in pending state.

@dongwenjuan
Copy link

dongwenjuan commented Feb 20, 2019

Does the issue resolved? It also happend to me, error log from olm-operator:

  1. time="2019-02-20T06:59:38Z" level=info msg="not in operatorgroup namespace, skipping" csv=memcachedoperator.v0.0.1 namespace=olm phase=
    solution: modify the namespace to olm for memcached-operator

2)time="2019-02-20T06:59:38Z" level=warning msg="installmodes not supported" csv=memcachedoperator.v0.0.1 err="SingleNamespace InstallModeType not supported, cannot configure to watch one namespace" namespace=olm opgroup=olm-operators phase=
solution:add installModes in csv file
installModes:

  • type: SingleNamespace
    supported: true

3)time="2019-02-20T07:13:35Z" level=info msg="requirements were not met" csv=memcachedoperator.v0.0.1 namespace=olm phase=Pending
Use kubectl get csv memcachedoperator.v0.0.1 -o yaml -n olm to get the detail:

  • dependents:
    • group: rbac.authorization.k8s.io
      kind: PolicyRule
      message: namespaced rule:{"verbs":[""],"apiGroups":[""],"resources":["*"]}
      status: NotSatisfied
      version: v1beta1
      group: ""
      kind: ServiceAccount
      message: Policy rule not satisfied for service account
      name: memcached-operator
      status: PresentNotSatisfied
      version: v1

So how do I modify the policyrule? I tried many policyrule configuration, but all failed. Can anybody help? Thanks~

@camilamacedo86 camilamacedo86 self-assigned this Nov 5, 2019
@camilamacedo86 camilamacedo86 added the kind/bug Categorizes issue or PR as related to a bug. label Nov 5, 2019
@camilamacedo86
Copy link
Contributor

The OLM steps in the Getting Started as its example was updated in the #57 in order to address this issue as well. Then, I am closing this task. However, please, feel free to re-open if you see that still required.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants