aerogear-attic / keycloak-operator

operates keycloaks
4 stars 2 forks source link

Deploying the Operator into OKD #15

Open mvazquezc opened 6 years ago

mvazquezc commented 6 years ago

Hi there!

I've bee trying to deploy your operator on OKD:

oc version
oc v3.10.0+dd10d17
kubernetes v1.10.0+b81c8f8
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://127.0.0.1:8443
openshift v3.10.0+7eee6f8-2
kubernetes v1.10.0+b81c8f8

It's just a local cluster created with the command below:

oc cluster up --enable=service-catalog,router,registry,web-console,persistent-volumes,rhel-imagestreams,automation-service-broker

I know that this operator needs the managed-services-broker in order to work, but I was wondering if it possible to run this operator using the automation service broker deployed with OKD.

Following the steps here, using the namespace openshift-automation-service-broker, the operator panics when the SharedService object is created (stacktrace below).

Can I use the service broker already deployed with OKD or should I deploy the managed-services-broker?

The managed-service-broker operator seems to be missing the crd definitions on its repo, I have tried to deploy it using the definitions found here. Which ones should I use in case it's needed?

Thanks!

time="2018-08-10T14:44:42Z" level=info msg="initialise shared service: &{{SharedService aerogear.org/v1alpha1} {example  openshift-automation-service-broker /apis/aerogear.org/v1alpha1/namespaces/openshift-automation-service-broker/sharedservices/example ea8fa61c-9cab-11e8-a1c5-c85b76cd062f 46147 1 2018-08-10 14:44:42 +0000 UTC <nil> <nil> map[] map[] [] nil [] } {3 1 3 0 keycloak} {{ false}}}"
E0810 14:44:42.401241       1 runtime.go:66] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:72
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/usr/lib/golang/src/runtime/asm_amd64.s:573
/usr/lib/golang/src/runtime/panic.go:502
/usr/lib/golang/src/runtime/panic.go:63
/usr/lib/golang/src/runtime/signal_unix.go:388
/usr/lib/golang/src/runtime/duff_amd64.s:302
/home/mario/go/src/github.com/aerogear/keycloak-operator/pkg/keycloak/keycloak.go:112
/home/mario/go/src/github.com/aerogear/keycloak-operator/pkg/dispatch/handler.go:30
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer-sync.go:84
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer-sync.go:51
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer-sync.go:35
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer.go:88
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134
/home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88
/usr/lib/golang/src/runtime/asm_amd64.s:2361
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x455ca2]

goroutine 133 [running]:
github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x107
panic(0x1003360, 0x199ebf0)
    /usr/lib/golang/src/runtime/panic.go:502 +0x229
github.com/aerogear/keycloak-operator/pkg/keycloak.(*Handler).Handle(0xc42030f4a0, 0x1247080, 0xc4200ac018, 0x1232500, 0xc4202d51e0, 0xf18800, 0x8, 0x0)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/pkg/keycloak/keycloak.go:112 +0x1564
github.com/aerogear/keycloak-operator/pkg/dispatch.(*Handler).Handle(0xc42030f440, 0x1247080, 0xc4200ac018, 0x1232500, 0xc4202d51e0, 0xc4204e6400, 0x0, 0x0)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/pkg/dispatch/handler.go:30 +0x112
github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk.(*informer).sync(0xc4200ea9c0, 0xc4200c8800, 0x3a, 0xfa5ca0, 0xc4201ffaa0)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer-sync.go:84 +0x11a
github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk.(*informer).processNextItem(0xc4200ea9c0, 0xc42002d900)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer-sync.go:51 +0xd2
github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk.(*informer).runWorker(0xc4200ea9c0)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer-sync.go:35 +0x2b
github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk.(*informer).(github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk.runWorker)-fm()
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer.go:88 +0x2a
github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc42029e780)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 +0x54
github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc42029e780, 0x3b9aca00, 0x0, 0x10001, 0x0)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 +0xbd
github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc42029e780, 0x3b9aca00, 0x0)
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 +0x4d
created by github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk.(*informer).Run
    /home/mario/go/src/github.com/aerogear/keycloak-operator/vendor/github.com/operator-framework/operator-sdk/pkg/sdk/informer.go:88 +0x209
rpc error: code = Unknown desc = Error: No such container: af6dff44fac80ed8eeb6514fde293705f54b8a623b048825a85156a81490626d
maleck13 commented 6 years ago

have you tried again recently? We removed the sharedservice resource. We now just have a keycloak resource. If you take a look at the readme you should be able to get it working without a broker. If you want to created the resource via a Automation Broker bundle you could also do that but you may need to ensure the RBAC is set up correctly