operator-framework / operator-lifecycle-manager

A management framework for extending Kubernetes with Operators
https://olm.operatorframework.io
Apache License 2.0
1.72k stars 545 forks source link

Install Operator from operator hub on OCP/Z failed with common user #1779

Open zhengxiaomei123 opened 4 years ago

zhengxiaomei123 commented 4 years ago

Bug Report

What did you do? The project common user can't create service with error:

Deploying service of type: EtcdCluster
 ✗  Deploying service [1ms]
 ✗  etcdclusters.etcd.database.coreos.com is forbidden: User "developer" cannot create resource "etcdclusters" in API group "etcd.database.coreos.com" in the namespace "default"

The kubeadm cluster-admin user can create service with operator-hub:

./odo service create etcdoperator.v0.9.4-clusterwide/EtcdCluster
Deploying service of type: EtcdCluster
 ✓  Deploying service [7ms]
 ✓  Service '' was created

Progress of the provisioning will not be reported and might take a long time
You can see the current status by executing 'odo service list'
Optionally, link etcdoperator.v0.9.4-clusterwide to your component by running: 'odo link <component-name>'

./odo service list
NAME                    AGE
EtcdCluster/example     29s

But the operator status is failed due to exec format error

oc get csv -n openshift-operators
NAME                                     DISPLAY                           VERSION             REPLACES                              PHASE
etcdoperator.v0.9.4-clusterwide          etcd                              0.9.4-clusterwide                                         Failed
percona-server-mongodb-operator.v1.4.0   Percona Server MongoDB Operator   1.4.0                                                     Failed
service-binding-operator.v0.1.1-352      Service Binding Operator          0.1.1-352                                                 Failed
service-binding-operator.v0.1.1-354      Service Binding Operator          0.1.1-354  

It seems there is no support for opeartors working on IBM Z, even though the service is created by kubeadmin user . What did you expect to see? A clear and concise description of what you expected to happen (or insert a code snippet). For OCP on IBM Z, the common user can create operator from operator hub 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

Possible Solution

Additional context Add any other context about the problem here.

sarveshtamba commented 4 years ago

Installed 'etcdoperator.v0.9.4' using support scripts 'scripts/setup-operators.sh' provided by odo as oc kube:admin user.

Issues:- 1.) Was able to deploy service of type: EtcdCluster using the kube:admin user. However operator fails due to no support for P.

    [root@ghatwala-odo-1-abef-bastion odo]# oc whoami
    kube:admin
    [root@ghatwala-odo-1-abef-bastion odo]# ./odo service create etcdoperator.v0.9.4-clusterwide/EtcdCluster
    Deploying service of type: EtcdCluster
     ✓  Deploying service [7ms]
     ✓  Service '' was created

    Progress of the provisioning will not be reported and might take a long time
    You can see the current status by executing 'odo service list'
    Optionally, link etcdoperator.v0.9.4-clusterwide to your component by running: 'odo link <component-name>'
    [root@ghatwala-odo-1-abef-bastion odo]# ./odo service list
    NAME                    AGE
    EtcdCluster/example     7s
    [root@ghatwala-odo-1-abef-bastion odo]# oc get csv -n openshift-operators
    NAME                                  DISPLAY                    VERSION             REPLACES   PHASE
    etcdoperator.v0.9.4-clusterwide       etcd                       0.9.4-clusterwide              Failed
    service-binding-operator.v0.1.1-364   Service Binding Operator   0.1.1-364                      Failed

2.) Not able to deploy service of type: EtcdCluster using the regular/common user 'developer'.

    [root@ghatwala-odo-1-abef-bastion odo]# ./odo service create etcdoperator.v0.9.4-clusterwide/EtcdCluster
    Deploying service of type: EtcdCluster
     ✗  Deploying service [1ms]
     ✗  etcdclusters.etcd.database.coreos.com is forbidden: User "developer" cannot create resource "etcdclusters" in API group "etcd.database.coreos.com" in the namespace "myproject"
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.