dashboard: Switch to Go modules breaks ko apply under certain conditions
Describe the bug
Since the switch, I (anyone else?) can’t ko resolve/ko apply Dashboard resources.
Adams-MBP:dashboard aroberts$ echo $GOPATH
/Users/aroberts/go
Adams-MBP:dashboard aroberts$ pwd
/Users/aroberts/go/src/github.com/tektoncd/dashboard
Adams-MBP:dashboard aroberts$ echo $KO_DOCKER_REPO
docker.io/adamroberts
Adams-MBP:dashboard aroberts$ docker login
Authenticating with existing credentials...
Login Succeeded
Expected behaviour
I’d love for ko apply to work again
Steps to reproduce the bug
Tried with ko 0.2, 0.5. Go 1.13.x, Go 1.14.0.
Checkout master of the dashboard. Do the usual command pointing to Docker Desktop or OpenShift (so kustomize build overlays/dev | ko apply -f - or kustomize build overlays/dev-openshift --load_restrictor=LoadRestrictionsNone | ko resolve -f - | kubectl apply -f - --validate=false).
Environment details
- Kubernetes Platform:
Docker Desktop
- Kubernetes or OpenShift version: 1.16.6 (latest Docker Desktop)
- Install mode (if on OpenShift):
- Cloud-provider/provisioner:
- Versions:
-
Tekton Dashboard: master
-
Tekton Pipelines:
- Tekton Triggers:
-
- Install namespaces:
-
Tekton Dashboard: tekton-pipelines or openshift-pipelines
-
Tekton Pipelines:
- Tekton Triggers:
-
Additional Info
(base) Adams-MBP:dashboard aroberts$ ko version
0.5.0
(base) Adams-MBP:dashboard aroberts$ kustomize build overlays/dev | ko apply -f -customresourcedefinition.apiextensions.k8s.io/extensions.dashboard.tekton.dev unchanged
serviceaccount/tekton-dashboard unchanged
clusterrole.rbac.authorization.k8s.io/tekton-dashboard-backend unchanged
clusterrole.rbac.authorization.k8s.io/tekton-dashboard-extensions unchanged
clusterrole.rbac.authorization.k8s.io/tekton-dashboard-pipelines unchanged
clusterrole.rbac.authorization.k8s.io/tekton-dashboard-tenant unchanged
clusterrole.rbac.authorization.k8s.io/tekton-dashboard-triggers unchanged
rolebinding.rbac.authorization.k8s.io/tekton-dashboard-pipelines unchanged
rolebinding.rbac.authorization.k8s.io/tekton-dashboard-triggers unchanged
clusterrolebinding.rbac.authorization.k8s.io/tekton-dashboard-backend unchanged
clusterrolebinding.rbac.authorization.k8s.io/tekton-dashboard-extensions unchanged
clusterrolebinding.rbac.authorization.k8s.io/tekton-dashboard-tenant unchanged
service/tekton-dashboard unchanged
deployment.apps/tekton-dashboard configured
(image coordinates remain github.com ones, nothing built)
Checkout commit immediately before Go modules change
(base) Adams-MBP:dashboard aroberts$ git checkout d7ed18a609f7f4c93f6c8c5667078838c8a8a099
Note: checking out 'd7ed18a609f7f4c93f6c8c5667078838c8a8a099'.
HEAD is now at d7ed18a Add frontend support for single namespace visibility support
(base) Adams-MBP:dashboard aroberts$ kustomize build overlays/dev | ko apply -f -2020/06/09 10:46:22 NOTICE!
-----------------------------------------------------------------
We will start requiring ko:// in a coming release. Please prefix
the following import path for things to continue working:
github.com/tektoncd/dashboard/cmd/dashboard
For more information see:
https://github.com/google/ko/issues/158
-----------------------------------------------------------------
2020/06/09 10:46:22 Using base gcr.io/distroless/base:nonroot for github.com/tektoncd/dashboard/cmd/dashboard
This errors too with
error: no objects passed to apply
2020/06/09 10:48:56 error processing import paths in "-": error resolving image references: Get https://gcr.io/v2/: dial tcp: i/o timeout
but at least it tried. 🤔
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (19 by maintainers)
That was it, thank you! For anyone else who may find this - that means I end up using ko 0.5.1. Outside of the Dashboard repository meant I no longer had any errors with the
command.
kustomize build overlays/dev | ko apply -f -for this project now works./meow party
There are some strange ko issues like this one https://github.com/google/ko/issues/106
When updating Go