appsody / appsody-operator

An Operator for deploying Appsody based applications to Kubernetes. This repo will be archived soon.
Apache License 2.0
18 stars 15 forks source link

Error in logs #224

Closed ianpartridge closed 4 years ago

ianpartridge commented 4 years ago

Bug Report

What did you do?

I examined the logs of my Appsody operator:

$ kubectl logs appsody-operator-7ff45fd6cc-sdn9l
{"level":"info","ts":1582650968.374018,"logger":"cmd","msg":"Go Version: go1.13.8"}
{"level":"info","ts":1582650968.3740768,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1582650968.3741,"logger":"cmd","msg":"Version of operator-sdk: v0.12.0"}
{"level":"info","ts":1582650968.3745914,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1582650968.891203,"logger":"leader","msg":"No pre-existing lock was found."}
{"level":"info","ts":1582650968.8952599,"logger":"leader","msg":"Became the leader."}
{"level":"info","ts":1582650969.3994713,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":"0.0.0.0:8383"}
{"level":"info","ts":1582650969.3999214,"logger":"cmd","msg":"Registering Components."}
{"level":"info","ts":1582650969.4003043,"logger":"controller_appsodyapplication","msg":"newReconciler","watchNamespaces":["default"]}
{"level":"info","ts":1582650969.4105973,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"appsodyapplication-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1582650969.4109929,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"appsodyapplication-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1582650969.411183,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"appsodyapplication-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1582650969.4113526,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"appsodyapplication-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1582650969.4115574,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"appsodyapplication-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1582650969.4117963,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"appsodyapplication-controller","source":"kind source: /, Kind="}
{"level":"error","ts":1582650971.3990278,"logger":"controller-runtime.source","msg":"if kind is a CRD, it should be installed before calling Start","kind":"Route.route.openshift.io","error":"no matches for kind \"Route\" in version \"route.openshift.io/v1\"","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tappsody-operator/vendor/github.com/go-logr/zapr/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start\n\tappsody-operator/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go:88\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Watch\n\tappsody-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:122\ngithub.com/appsody/appsody-operator/pkg/controller/appsodyapplication.add\n\tappsody-operator/pkg/controller/appsodyapplication/appsodyapplication_controller.go:200\ngithub.com/appsody/appsody-operator/pkg/controller/appsodyapplication.Add\n\tappsody-operator/pkg/controller/appsodyapplication/appsodyapplication_controller.go:44\ngithub.com/appsody/appsody-operator/pkg/controller.AddToManager\n\tappsody-operator/pkg/controller/controller.go:29\nmain.main\n\tappsody-operator/cmd/manager/main.go:111\nruntime.main\n\t/home/travis/.gimme/versions/go1.13.8.linux.amd64/src/runtime/proc.go:203"}
{"level":"info","ts":1582650971.3991494,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"appsodyapplication-controller","source":"kind source: /, Kind="}
{"level":"error","ts":1582650973.397299,"logger":"controller-runtime.source","msg":"if kind is a CRD, it should be installed before calling Start","kind":"Service.serving.knative.dev","error":"no matches for kind \"Service\" in version \"serving.knative.dev/v1alpha1\"","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tappsody-operator/vendor/github.com/go-logr/zapr/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start\n\tappsody-operator/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go:88\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Watch\n\tappsody-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:122\ngithub.com/appsody/appsody-operator/pkg/controller/appsodyapplication.add\n\tappsody-operator/pkg/controller/appsodyapplication/appsodyapplication_controller.go:205\ngithub.com/appsody/appsody-operator/pkg/controller/appsodyapplication.Add\n\tappsody-operator/pkg/controller/appsodyapplication/appsodyapplication_controller.go:44\ngithub.com/appsody/appsody-operator/pkg/controller.AddToManager\n\tappsody-operator/pkg/controller/controller.go:29\nmain.main\n\tappsody-operator/cmd/manager/main.go:111\nruntime.main\n\t/home/travis/.gimme/versions/go1.13.8.linux.amd64/src/runtime/proc.go:203"}
{"level":"info","ts":1582650973.3973947,"logger":"cmd","msg":"Starting the Cmd."}
{"level":"info","ts":1582650973.3980422,"logger":"controller-runtime.manager","msg":"starting metrics server","path":"/metrics"}
{"level":"info","ts":1582650973.498264,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"appsodyapplication-controller"}
{"level":"info","ts":1582650973.5986176,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"appsodyapplication-controller","worker count":1}

What did you expect to see?

No errors.

What did you see instead?

2 errors relating to Route.route.openshift.io and Service.serving.knative.dev

Environment

appsody 0.5.8

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:07:57Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

Additional context

I am running Kubernetes as part of Docker Desktop on macOS.

I do not have OpenShift or Knative installed.

ianpartridge commented 4 years ago

Note that the operator is functioning correctly - the errors in the logs do not seem to be causing a functional problem.

leochr commented 4 years ago

Thank you Ian. We'll look into outputting graceful messages, rather than errors, to notify users that OpenShift and Knative functionalities are not be available.

leochr commented 4 years ago

Now we check whether the CRD kind is available before watching/deleting or operating on it. So this error shouldn't be thrown.