-
Notifications
You must be signed in to change notification settings - Fork 396
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
Publish a ko
builder with GCB's kubectl magic
#4
Comments
Unless we support Go modules (#269) this is going to be gross, along the lines of the go builder, which The |
Hmm, that issuing is using Go modules here. I thought Go modules worked with I'll play around with them on my kodemo repo... |
The naive change to support go modules makes |
Yeah, Go modules definitely work, but we should look at speeding up |
Hmm, watch isn't working for some reason. |
Ok, I know what the issue is, it's my hack for determining the enclosing package when we see things change, hopefully nbd. |
@imjasonh what does this have to do with go modules? Is this still relevant? |
The reason modules support was relevant is because without it the source
had to be made available in $GOPATH/src/<importpath>, which isn't going to
be the case in GCB or Tekton (or GitHub Actions).
gcr.io/cloud-builders/go did a bunch of funny business to symlink
`/workspace` into the correct location in GOPATH. But that won't be
necessary with modules.
Now that `ko` supports modules the source can be in `/workspace` and can
still be built. A `ko` image only needs to have `go` and `kubectl`, plus
the logic in kubectl.bash above to provide GKE creds.
We can get this done by having a base image that's `FROM golang`, installs
`kubectl`, renames it to `kubectl_real`, then has a `kubectl.bash` named
`kubectl` on PATH which sets up creds then calls `kubectl_real`. It's all a
terrible hack. Oh it also needs the GCR cred helper to push images. And
that's only enough to use ko against GKE/GCR.
|
This issue is stale because it has been open for 90 days with no |
fix curl modes to point to new repo
Basically this, but
ko
: https://github.com/GoogleCloudPlatform/cloud-builders/blob/master/kubectl/kubectl.bashcc @imjasonh
The text was updated successfully, but these errors were encountered: