Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-5952

Operator can not start if only cluster role is created for namespace

XMLWordPrintable

    • False
    • False

      If operator is installed only with cluster_role (not role) then Operator crashes on start:

       

      Executing entrypoint exec /home/amq-broker-operator/bin/amq-broker-operator 2021-12-21T11:41:35.860Z INFO package environments Detect if openshift is running 2021-12-21T11:41:35.913Z INFO cmd environment is openshift 2021-12-21T11:41:35.913Z INFO cmd Go Version: go1.13.15 2021-12-21T11:41:35.913Z INFO cmd Go OS/Arch: linux/amd64 2021-12-21T11:41:35.913Z INFO cmd Version of operator-sdk: v0.8.2 2021-12-21T11:41:35.913Z INFO cmd Version of the operator: 7.9.0 2021-12-21T11:41:35.913Z INFO cmd Product Version: 7.9.0 2021-12-21T11:41:35.913Z INFO cmd Supported AMQ Broker Product Versions: 7.9.0 7.8.2 7.7.0 2021-12-21T11:41:35.913Z INFO cmd Got operator namespace {"operator ns": "openshift-operators"} 2021-12-21T11:41:35.913Z INFO cmd Setting up to watch all namespaces 2021-12-21T11:41:35.913Z INFO cmd Wating namespace {"namespace": ""} 2021-12-21T11:41:35.914Z INFO leader Trying to become the leader. 2021-12-21T11:41:36.452Z ERROR k8sutil Failed to get Pod {"Pod.Namespace": "openshift-operators", "Pod.Name": "amq-broker-operator-76c6b78644-wbw4c", "error": "pods \"amq-broker-operator-76c6b78644-wbw4c\" is forbidden: User \"system:serviceaccount:openshift-operators:amq-broker-operator\" cannot get resource \"pods\" in API group \"\" in the namespace \"openshift-operators\": RBAC: role.rbac.authorization.k8s.io \"amq-broker-operator\" not found"} github.com/go-logr/zapr.(*zapLogger).Error /remote-source/app/vendor/github.com/go-logr/zapr/zapr.go:128 github.com/operator-framework/operator-sdk/pkg/k8sutil.GetPod /remote-source/app/vendor/github.com/operator-framework/operator-sdk/pkg/k8sutil/k8sutil.go:105 github.com/operator-framework/operator-sdk/pkg/leader.myOwnerRef /remote-source/app/vendor/github.com/operator-framework/operator-sdk/pkg/leader/leader.go:142 github.com/operator-framework/operator-sdk/pkg/leader.Become /remote-source/app/vendor/github.com/operator-framework/operator-sdk/pkg/leader/leader.go:67 main.main /remote-source/app/cmd/manager/main.go:138 runtime.main /opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/proc.go:203 2021-12-21T11:41:36.452Z ERROR cmd {"error": "pods \"amq-broker-operator-76c6b78644-wbw4c\" is forbidden: User \"system:serviceaccount:openshift-operators:amq-broker-operator\" cannot get resource \"pods\" in API group \"\" in the namespace \"openshift-operators\": RBAC: role.rbac.authorization.k8s.io \"amq-broker-operator\" not found"} github.com/go-logr/zapr.(*zapLogger).Error /remote-source/app/vendor/github.com/go-logr/zapr/zapr.go:128 main.main /remote-source/app/cmd/manager/main.go:140 runtime.main /opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/proc.go:203

            gaohoward Howard Gao
            mkrutov Mikhail Krutov
            Mikhail Krutov Mikhail Krutov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: