-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package kn in a container image #80
Comments
We can directly run the command "ko publish github.com/knative/client/cmd/kn -B -t ${tag}" to name the image <KO_DOCKER_REPO>/kn in the image registry. No need of crane copy. We can define <KO_DOCKER_REPO> as gcr.io/[gcloud-project], docker.io/, etc. So where do we put this image officially for knative client? Do we have a public directory somewhere to host knative images? |
I have succeeded in creating the image in my own dockerhub repository, docker.io/houshengbo/kn:latest, with the command:
When I pulled the image, and did the taskrun run for the following section:
I have got:
I was wondering what I have done wrong or I am missing. @imjasonh Do you have any ideas? Thx. |
@houshengbo just shot in the dark, but could you use |
It looks like I need to install crane first to check the path of kn. This is what I have done:
crane should be install under $GOPATH/bin. Then run
Here is the output for the image of kn:
The most important thing we need to look up is Entrypoint":["/ko-app/kn"], which tells us the path of the command. I will try /ko-app/kn instead of kn to see how it goes. Thanks to @imjasonh. |
/assign @houshengbo |
@houshengbo: GitHub didn't allow me to assign the following users: houshengbo. Note that only knative members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
We have it now! |
That's |
Yes. With the gotcha that |
…to let the tool magically download kubernetes and start the cluster. (knative#86) To ensure that our tests don't unexpectedly break, we don't pin the kubernetes version to a particular one (knative/serving#1294) but always use `latest`. However, the concept of `latest` for kubetests means "kubernetes head", which can be broken (didn't happen so far) or doesn't support all platforms (OS X is the most common case). Unfortunately, switching to `default` or `release/stable` translates to kubernetes 1.9, which is not recommended for Knative according to the docs. This PR adds the function `download_k8s()`: it will download the latest public, stable GKE binary supported by the test cluster and the client machine. As a bonus, the function knocks out the `kubernetes-test.tar.gz` package; this 1.2GB package is not used by Knative tests, and is a severe burden on slower connections (anedoctal evidence: 20+ min download on my home network). Fixes knative#40. Bonus: fixes knative#80.
This would enable users of Tekton and Google Cloud Build to more easily invoke
kn
, e.g.:Assuming
kn
doesn't depend on any other tools, you could build and push the image usingko publish
(andcrane copy
to shorten the image name):The text was updated successfully, but these errors were encountered: