redhat-developer / devconsole-operator

Enable a developer-focused view in OpenShift 4 web console
24 stars 28 forks source link

Add GitSourceAnalysis controller #117

Closed akashshinde closed 5 years ago

akashshinde commented 5 years ago

This PR copies GitSourceAnalysis controller from https://github.com/redhat-developer/devconsole-git repo, Since we have decided to have all controller in one place.

DhritiShikhar commented 5 years ago

@akashshinde since we deicided to have all controller in one place, shouldn't there be a following PR to remove GitSourceAnalysis controller from https://github.com/redhat-developer/devconsole-git ?

akashshinde commented 5 years ago

@akashshinde since we deicided to have all controller in one place, shouldn't there be a following PR to remove GitSourceAnalysis controller from https://github.com/redhat-developer/devconsole-git ?

@DhritiShikhar Yes, My plan is to get GitSourceAnalysis controller working here in devconsole-operator then remove all operated related code from devconsole-git repo.

MatousJobanek commented 5 years ago

/lgtm

openshift-ci-robot commented 5 years ago

New changes are detected. LGTM label has been removed.

pratikjagrut commented 5 years ago

@akashshinde I'm not able to run make local Getting this error.

operator-sdk up local --namespace=""
INFO[0000] Running the operator locally.                
INFO[0000] Using namespace .                            
{"level":"info","ts":1555494280.4851854,"logger":"cmd","msg":"Go Version: go1.11.5"}
{"level":"info","ts":1555494280.4853086,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
{"level":"info","ts":1555494280.4853516,"logger":"cmd","msg":"operator-sdk Version: v0.7.0"}
{"level":"info","ts":1555494280.4896007,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1555494280.4896433,"logger":"leader","msg":"Skipping leader election; not running in a cluster."}
{"level":"info","ts":1555494280.5351837,"logger":"cmd","msg":"Registering Components."}
{"level":"info","ts":1555494280.5355759,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"component-controller","source":"kind source: /, Kind="}
{"level":"info","ts":1555494280.535666,"logger":"kubebuilder.controller","msg":"Starting EventSource","controller":"gitsourceanalysis-controller","source":"kind source: /, Kind="}
{"level":"error","ts":1555494280.5356925,"logger":"kubebuilder.source","msg":"if kind is a CRD, it should be installed before calling Start","kind":"GitSourceAnalysis.devconsole.openshift.io","error":"no matches for kind \"GitSourceAnalysis\" in version \"devconsole.openshift.io/v1alpha1\"","stacktrace":"github.com/redhat-developer/devconsole-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/vendor/github.com/go-logr/zapr/zapr.go:128\ngithub.com/redhat-developer/devconsole-operator/vendor/sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/vendor/sigs.k8s.io/controller-runtime/pkg/source/source.go:89\ngithub.com/redhat-developer/devconsole-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Watch\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:122\ngithub.com/redhat-developer/devconsole-operator/pkg/controller/gitsourceanalysis.add\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/pkg/controller/gitsourceanalysis/gitsourceanalysis_controller.go:49\ngithub.com/redhat-developer/devconsole-operator/pkg/controller/gitsourceanalysis.Add\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/pkg/controller/gitsourceanalysis/gitsourceanalysis_controller.go:32\ngithub.com/redhat-developer/devconsole-operator/pkg/controller.AddToManager\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/pkg/controller/controller.go:13\nmain.main\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/cmd/manager/main.go:116\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:201"}
{"level":"error","ts":1555494280.5357444,"logger":"cmd","msg":"","error":"no matches for kind \"GitSourceAnalysis\" in version \"devconsole.openshift.io/v1alpha1\"","stacktrace":"github.com/redhat-developer/devconsole-operator/vendor/github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/vendor/github.com/go-logr/zapr/zapr.go:128\nmain.main\n\t/home/pjagrut/go/src/github.com/redhat-developer/devconsole-operator/cmd/manager/main.go:117\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:201"}
Error: failed to run operator locally: (failed to exec []string{"build/_output/bin/devconsole-operator-local"}: exit status 1)
Usage:
  operator-sdk up local [flags]

Flags:
      --go-ldflags string       Set Go linker options
  -h, --help                    help for local
      --kubeconfig string       The file path to kubernetes configuration file; defaults to location specified by $KUBECONFIG with a fallback to $HOME/.kube/config if not set
      --namespace string        The namespace where the operator watches for changes.
      --operator-flags string   The flags that the operator needs. Example: "--flag1 value1 --flag2=value2"

make: *** [make/deploy.mk:14: local] Error 1
sbose78 commented 5 years ago

@MatousJobanek & @DhritiShikhar After your 👍 , let's merge this.

MatousJobanek commented 5 years ago

/approve

sbose78 commented 5 years ago

/test e2e

openshift-ci-robot commented 5 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MatousJobanek, sbose78

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/redhat-developer/devconsole-operator/blob/master/OWNERS)~~ [sbose78] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment