Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Getting Kubeclient in OpenShift Extension of Pipeline
There is an issue introduced in PR: tektoncd#1530 (https://github.com/tektoncd/operator/pull/1530/files#diff-7f51fd839c96e48ad11d43ad6e8e502cccfb00405087d1c8e116fc6245fad615R92) ``` panic: Unable to fetch k8s.io/client-go/kubernetes.Interface from context. This context is not the application context (which is typically given to constructors via sharedmain). goroutine 2705 [running]: go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x0?, 0x1e4bde2?, {0x0?, 0x0?, 0xc0023ea000?}) /go/src/github.com/tektoncd/operator/vendor/go.uber.org/zap/zapcore/entry.go:198 +0x65 go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000335ad0, {0x0, 0x0, 0x0}) /go/src/github.com/tektoncd/operator/vendor/go.uber.org/zap/zapcore/entry.go:264 +0x3ec go.uber.org/zap.(*SugaredLogger).log(0xc001166940, 0x4, {0x0?, 0x1ac1701?}, {0xc000e25450?, 0x40dc07?, 0x3497c2e1ffdc0d75?}, {0x0, 0x0, 0x0}) /go/src/github.com/tektoncd/operator/vendor/go.uber.org/zap/sugar.go:295 +0xee go.uber.org/zap.(*SugaredLogger).Panic(...) /go/src/github.com/tektoncd/operator/vendor/go.uber.org/zap/sugar.go:153 knative.dev/pkg/client/injection/kube/client.Get({0x2149358, 0xc0017f2bd0}) /go/src/github.com/tektoncd/operator/vendor/knative.dev/pkg/client/injection/kube/client/client.go:201 +0x1b7 github.com/tektoncd/operator/pkg/reconciler/openshift/tektonpipeline.openshiftExtension.PreReconcile({0xc0007d4320?}, {0x2149358, 0xc0017f2bd0}, {0x2163a08?, 0xc000d89180?}) /go/src/github.com/tektoncd/operator/pkg/reconciler/openshift/tektonpipeline/extension.go:92 +0x426 github.com/tektoncd/operator/pkg/reconciler/kubernetes/tektonpipeline.(*Reconciler).ReconcileKind(0xc0009a1100, {0x2149358, 0xc0017f2bd0}, 0xc000d89180) /go/src/github.com/tektoncd/operator/pkg/reconciler/kubernetes/tektonpipeline/reconcile.go:87 +0x687 github.com/tektoncd/operator/pkg/client/injection/reconciler/operator/v1alpha1/tektonpipeline.(*reconcilerImpl).Reconcile(0xc000410280, {0x2149358, 0xc0017f2ba0}, {0xc00188d1f8, 0x8}) /go/src/github.com/tektoncd/operator/pkg/client/injection/reconciler/operator/v1alpha1/tektonpipeline/reconciler.go:236 +0x582 knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc0008ed1a0) /go/src/github.com/tektoncd/operator/vendor/knative.dev/pkg/controller/controller.go:542 +0x58d knative.dev/pkg/controller.(*Impl).RunContext.func3() /go/src/github.com/tektoncd/operator/vendor/knative.dev/pkg/controller/controller.go:491 +0x68 created by knative.dev/pkg/controller.(*Impl).RunContext /go/src/github.com/tektoncd/operator/vendor/knative.dev/pkg/controller/controller.go:489 +0x312 ```
- Loading branch information