tektoncd / operator

Kubernetes operator to manage installation, updation and uninstallation of tektoncd projects (pipeline, …)
Apache License 2.0
445 stars 197 forks source link

tekton operator fails to deploy dashboard #468

Closed githubcdr closed 3 years ago

githubcdr commented 3 years ago

Expected Behavior

The dashboard is not deployed via the operator with "all" profile

Actual Behavior

panic: open /var/run/ko/tekton-dashboard/tekton-dashboard-fullaccess: no such file or directory

Steps to Reproduce the Problem

Follow operator install instructions with "all" profile.

Additional Info

1.22.1

│ {"level":"debug","logger":"tekton-operator","caller":"controller/controller.go:526","msg":"Processing from queue dashboar │
│ d (depth: 0)","knative.dev/pod":"tekton-operator-7dd98cb7fc-2l4j9","knative.dev/controller":"github.com.tektoncd.operator │
│ .pkg.reconciler.kubernetes.tektondashboard.Reconciler","knative.dev/kind":"operator.tekton.dev.TektonDashboard"}          │
│ {"level":"info","logger":"tekton-operator","caller":"tektondashboard/tektondashboard.go:98","msg":"Reconciling TektonDash │
│ boards","knative.dev/pod":"tekton-operator-7dd98cb7fc-2l4j9","knative.dev/controller":"github.com.tektoncd.operator.pkg.r │
│ econciler.kubernetes.tektondashboard.Reconciler","knative.dev/kind":"operator.tekton.dev.TektonDashboard","knative.dev/tr │
│ aceid":"37da2fea-00ed-4675-a751-f986bac72a0c","knative.dev/key":"dashboard","status":{"observedGeneration":1,"conditions" │
│ :[{"type":"DependenciesInstalled","status":"Unknown","lastTransitionTime":"2021-10-26T21:47:42Z"},{"type":"DeploymentsAva │
│ ilable","status":"Unknown","lastTransitionTime":"2021-10-26T21:47:42Z"},{"type":"InstallSucceeded","status":"Unknown","la │
│ stTransitionTime":"2021-10-26T21:47:42Z"},{"type":"Ready","status":"Unknown","lastTransitionTime":"2021-10-26T21:47:42Z"} │
│ ]}}                                                                                                                       │
│ panic: open /var/run/ko/tekton-dashboard/tekton-dashboard-fullaccess: no such file or directory                           │
│ goroutine 856 [running]:                                                                                                  │
│ github.com/tektoncd/operator/pkg/reconciler/common.latestRelease(...)                                                     │
│     github.com/tektoncd/operator/pkg/reconciler/common/releases.go:170                                                    │
│ github.com/tektoncd/operator/pkg/reconciler/common.TargetVersion(0x1932b88, 0x40003bfa00, 0x400035b020, 0x3)              │
│     github.com/tektoncd/operator/pkg/reconciler/common/releases.go:46 +0x90                                               │
│ github.com/tektoncd/operator/pkg/reconciler/common.TargetManifest(0x1932b88, 0x40003bfa00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,  │
│ 0x0, 0x146fc40, ...)                                                                                                      │
│     github.com/tektoncd/operator/pkg/reconciler/common/releases.go:51 +0x40                                               │
│ github.com/tektoncd/operator/pkg/reconciler/common.AppendTarget(0x19088d8, 0x4001512720, 0x4000a5ea00, 0x1932b88, 0x40003 │
│ bfa00, 0x1604ee0, 0x4001303528)                                                                                           │
│     github.com/tektoncd/operator/pkg/reconciler/common/stages.go:51 +0x48                                                 │
│ github.com/tektoncd/operator/pkg/reconciler/common.Stages.Execute(0x4001303680, 0x4, 0x4, 0x19088d8, 0x4001512720, 0x4000 │
│ a5ea00, 0x1932b88, 0x40003bfa00, 0x0, 0x0)                                                                                │
│     github.com/tektoncd/operator/pkg/reconciler/common/stages.go:36 +0x74                                                 │
│ github.com/tektoncd/operator/pkg/reconciler/kubernetes/tektondashboard.(*Reconciler).ReconcileKind(0x4000933e80, 0x19088d │
│ 8, 0x4001512720, 0x40003bfa00, 0x0, 0x0)                                                                                  │
│     github.com/tektoncd/operator/pkg/reconciler/kubernetes/tektondashboard/tektondashboard.go:133 +0xa80                  │
│ github.com/tektoncd/operator/pkg/client/injection/reconciler/operator/v1alpha1/tektondashboard.(*reconcilerImpl).Reconcil │
│ e(0x40004bed20, 0x19088d8, 0x4001512720, 0x4000895ca4, 0x9, 0x4000356e50, 0x19088d8)                                      │
│     github.com/tektoncd/operator/pkg/client/injection/reconciler/operator/v1alpha1/tektondashboard/reconciler.go:249 +0xe │
│ 50                                                                                                                        │
│ knative.dev/pkg/controller.(*Impl).processNextWorkItem(0x4000978b40, 0x0)                                                 │
│     knative.dev/pkg@v0.0.0-20210827184538-2bd91f75571c/controller/controller.go:555 +0x3fc                                │
│ knative.dev/pkg/controller.(*Impl).RunContext.func3(0x4000b0a5a0, 0x4000978b40)                                           │
│     knative.dev/pkg@v0.0.0-20210827184538-2bd91f75571c/controller/controller.go:491 +0x50                                 │
│ created by knative.dev/pkg/controller.(*Impl).RunContext                                                                  │
│     knative.dev/pkg@v0.0.0-20210827184538-2bd91f75571c/controller/controller.go:489 +0x130                                │

v0.28.2

qtheya commented 3 years ago

https://github.com/tektoncd/operator/pull/464

dennisfischer commented 3 years ago

The PR is merged, but it looks like the latest release did not contain the cherry-picked change? I'm still running into the same error as above with v0.50.1

Image used: gcr.io/tekton-releases/github.com/tektoncd/operator/cmd/kubernetes/operator:v0.50.1@sha256:17b929be5820848b7dea3bc80f6a257486c0a004e08768d56da936f50521ceff

However, when looking at the release notes it appears as if the changes were cherry-picked? Looks like something went wrong during one of the release steps or the change was (un)intentionally not included.

topijag commented 3 years ago

I don't see the error anymore on v0.50.1 but I don't see the dashboard installed either by using profile all. Is it somewhere else that it needs to be enabled?

vdemeester commented 3 years ago

I can reproduce with v0.50.1 indeed 🤔 Looking into this.

/assign

vdemeester commented 3 years ago

/var/run/ko/HEAD is missing too.. 🤔

vdemeester commented 3 years ago

Alright, there is a different way to fetch release payload from "in dev" and in the "release" script.. which is a problem. And we have either the fullaccess image or the readonly one in release, which is a problem too.

vdemeester commented 3 years ago

Few PR to fix.

I am doing a 0.50.2 and 0.51.1 releases 😉

topijag commented 3 years ago

Thanks @vdemeester for the fix, the same issue is for v0.51.0

vdemeester commented 3 years ago

@topijag yep, expect 0.50.2 and 0.51.1 releases in a few hours (if not earlier 😉 )

vdemeester commented 3 years ago

https://github.com/tektoncd/operator/releases/tag/v0.51.1 and https://github.com/tektoncd/operator/releases/tag/v0.50.2 released, we should be able to close this issue 👼🏼