Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-9296

Possible to create MSS operator in namespace other than operator namespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • None

      As noted in https://issues.jboss.org/browse/AEROGEAR-9257:

      Noting however that it is possible to deploy the operator into a namespace other than mobile-security-service. To replicate:

      make delete-all
      make create-oper
      oc new-project duplicate-operator
      make create-oper
      

      Operator pod in new namespace will keep crashing with below logs, but it can be created.

      {"level":"info","ts":1559137432.795124,"logger":"cmd","msg":"Go Version: go1.10.8"}
      {"level":"info","ts":1559137432.7951972,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
      {"level":"info","ts":1559137432.7952087,"logger":"cmd","msg":"Version of operator-sdk: v0.8.1"}
      {"level":"info","ts":1559137432.795446,"logger":"leader","msg":"Trying to become the leader."}
      {"level":"error","ts":1559137432.8720748,"logger":"k8sutil","msg":"Failed to get Pod","Pod.Namespace":"test-op","Pod.Name":"mobile-security-service-operator-785cbdbf46-sp9lj","error":"pods \"mobile-security-service-operator-785cbdbf46-sp9lj\" is forbidden: User \"system:serviceaccount:test-op:mobile-security-service-operator\" cannot get pods in the namespace \"test-op\": no RBAC policy matched","stacktrace":"github.com/aerogear/mobile-security-service-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/aerogear/mobile-security-service-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/aerogear/mobile-security-service-operator/vendor/github.com/operator-framework/operator-sdk/pkg/k8sutil.GetPod\n\t/go/src/github.com/aerogear/mobile-security-service-operator/vendor/github.com/operator-framework/operator-sdk/pkg/k8sutil/k8sutil.go:105\ngithub.com/aerogear/mobile-security-service-operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader.myOwnerRef\n\t/go/src/github.com/aerogear/mobile-security-service-operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader/leader.go:142\ngithub.com/aerogear/mobile-security-service-operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader.Become\n\t/go/src/github.com/aerogear/mobile-security-service-operator/vendor/github.com/operator-framework/operator-sdk/pkg/leader/leader.go:67\nmain.main\n\t/go/src/github.com/aerogear/mobile-security-service-operator/cmd/manager/main.go:70\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:198"}
      {"level":"error","ts":1559137432.8722248,"logger":"cmd","msg":"","error":"pods \"mobile-security-service-operator-785cbdbf46-sp9lj\" is forbidden: User \"system:serviceaccount:test-op:mobile-security-service-operator\" cannot get pods in the namespace \"test-op\": no RBAC policy matched","stacktrace":"github.com/aerogear/mobile-security-service-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/go/src/github.com/aerogear/mobile-security-service-operator/vendor/github.com/go-logr/zapr/zapr.go:128\nmain.main\n\t/go/src/github.com/aerogear/mobile-security-service-operator/cmd/manager/main.go:72\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:198"}
      

              rh-ee-cmacedo Camila Macedo
              damurphy@redhat.com Damien Murphy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: