-
Notifications
You must be signed in to change notification settings - Fork 171
doc/tutorial/kubernetes: tidy up the tutorial #824
Comments
A Go module is, as of a616925, required in order for cue get go to resolve package arguments. This step is currently missing from the Kubernetes tutorial. There are more issues that need to be fixed as part of the Kubernetes tutorial, but these are covered in #824. Change-Id: I703f8159c79cd28cf2e27117b23c200518c2aee5
A Go module is, as of a616925, required in order for cue get go to resolve package arguments. This step is currently missing from the Kubernetes tutorial. There are more issues that need to be fixed as part of the Kubernetes tutorial, but these are covered in #824. Change-Id: I703f8159c79cd28cf2e27117b23c200518c2aee5 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/8962 Reviewed-by: Marcel van Lohuizen <mpvl@google.com>
This is a temporary sticking plaster that allows go test to be run on the Kubernetes tutorial once again when CUE_UPDATE=1 is set. We allow the running of go get under the same conditions as cue get. The main work to fix up this tutorial is still captured in #824. Change-Id: Ia05dc40fae96891145ff2da0ba2c0db6a908fd1e Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9182 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
Add missing "^EOF$" in cue help import, and the cmd/cue reference. Also, correct the output for a step in the Kubernetes tutorial. The ultimate fix to prevent such stale output will land as part of #824. Closes #868 #868 GitOrigin-RevId: 743aae4 Change-Id: I98df683b2a329bc4bb75607817417066f5949bd4 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/9281 Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
Hey, I'm not sure if this is the right place to post but I recently completed the tutorial (this weekend) and ran into a few issues. Let me know if I should create a separate issue instead. There are the ones I remember, I looked at a few commits above and didn't see them sorry if I missed them. The dump command uses After generating definitions from the go code and adding k8s_defs.cue I couldn't dump anymore (i.e.
|
Thanks @pfiaux. One of the challenges with the tutorial is that we do not, currently, faithfully execute each command as the user would. This issue is precisely about fixing it so that we do, in order that we don't run into problems of the sort you have reported. One way of achieving that would be to re-run the tutorial within a docker container that has |
From what I remember with dry run you don't actually need much from the cluster itself, just a connection (I think at the time I ran it against an empty minikube cluster i had locally). I've had some luck getting k3s/k3d (https://github.com/rancher/k3d) running locally, I haven't tried in a pipeline tho. I'm not familiar with github actions would https://github.com/AbsaOSS/k3d-action be a possible solution? There's also https://kind.sigs.k8s.io/ but image looks bigger and I have no idea how easy it is. |
Thanks, this is useful. I just managed to get
I'm sure something like that works, yes, but we need something that will work client side here, in case changes need to be made to the tutorial. The Appreciate your suggestions! |
Whilst waiting at the dentist (random, I realise) I made a bit more progress on this using The Docker image I am using is defined here: https://github.com/play-with-go/docker/tree/cue-kubernetes-tutorial/cue-kubernetes-tutorial A partially converted guide can be found here: As an aide memoire, that guide can be regenerated via:
Proof that this setup works with |
This issue has been migrated to cue-lang/cue#824. For more details about CUE's migration to a new home, please see cue-lang/cue#1078. |
Here are the remaining TODOs following a recent review of the Kubernetes tutorial as part of https://cue-review.googlesource.com/c/cue/+/8961:
doc/tutorial/kubernetes
pass even when critical files are missing (again because we ignore the exit code of all commands we run)The tutorial still "works" it's just that a user following along might well, understandably, be thrown by discrepancies.
Fundamentally we need to fix the scenario where today, running
CUE_UPDATE=1 go test ./...
using Go 1.16 breaks by removing a series of files indoc/tutorial/kubernetes/quick/**/*.cue
.Ideally we fix this by making the tutorial a guide that is re-run with an appropriate Docker image using
preguide
. That however raises the question of whether the tutorial should continue to live as part of the main repo:We could/should use something like https://github.com/thetirefire/badidea for a minimal Kubernetes setup so that the guide can run
kubectl
The text was updated successfully, but these errors were encountered: