diff --git a/README.md b/README.md index c4fcad4233..7471646010 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # `ko`: Easy Go Containers -[![GitHub Actions Build Status](https://github.com/google/ko/workflows/Build/badge.svg)](https://github.com/google/ko/actions?query=workflow%3ABuild) +[![GitHub Actions Build Status](https://github.com/ko-build/ko/workflows/Build/badge.svg)](https://github.com/ko-build/ko/actions?query=workflow%3ABuild) [![GoDoc](https://godoc.org/github.com/google/ko?status.svg)](https://godoc.org/github.com/google/ko) -[![Go Report Card](https://goreportcard.com/badge/google/ko)](https://goreportcard.com/report/google/ko) +[![Go Report Card](https://goreportcard.com/badge/ko-build/ko)](https://goreportcard.com/report/ko-build/ko) [![SLSA 3](https://slsa.dev/images/gh-badge-level3.svg)](https://slsa.dev/images/gh-badge-level3.svg) @@ -24,7 +24,7 @@ tool for Kubernetes applications ([See below](#Kubernetes-Integration)). ## Install -### Install from [Releases](https://github.com/google/ko/releases) +### Install from [GitHub Releases](https://github.com/ko-build/ko/releases) ``` $ VERSION=TODO # choose the latest version @@ -36,8 +36,8 @@ We generate [SLSA3 provenance](slsa.dev) using the OpenSSF's [slsa-framework/sls ```shell -$ curl -sL "https://github.com/google/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz" > ko.tar.gz -$ curl -sL https://github.com/google/ko/releases/download/v${VERSION}/attestation.intoto.jsonl > provenance.intoto.jsonl +$ curl -sL "https://github.com/ko-build/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz" > ko.tar.gz +$ curl -sL https://github.com/ko-build/ko/releases/download/v${VERSION}/attestation.intoto.jsonl > provenance.intoto.jsonl $ slsa-verifier -artifact-path ko.tar.gz -provenance provenance.intoto.jsonl -source github.com/google/ko -tag "v${VERSION}" PASSED: Verified SLSA provenance ``` diff --git a/docs/advanced/faq.md b/docs/advanced/faq.md index 4566dc7348..84d6ad43de 100644 --- a/docs/advanced/faq.md +++ b/docs/advanced/faq.md @@ -92,7 +92,7 @@ Oh, you betcha. Here's a partial list: - `ko` extension for [Tilt](https://github.com/tilt-dev/tilt-extensions/tree/master/ko) - `ko` support for [goreleaser](https://github.com/goreleaser/goreleaser/pull/2564) (proposed) -## Does `ko` work with [OpenShift Internal Registry](https://docs.openshift.com/container-platform/latest/registry/registry-options.html#registry-integrated-openshift-registry_registry-options)? +## Does `ko` work with [OpenShift Internal Registry](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.11/html/registry/registry-overview#registry-integrated-openshift-registry_registry-overview)? Yes! Follow these steps: diff --git a/docs/advanced/limitations.md b/docs/advanced/limitations.md index c3cde8c206..631479a44c 100644 --- a/docs/advanced/limitations.md +++ b/docs/advanced/limitations.md @@ -4,7 +4,7 @@ This means `ko` is ideal when you don't require [cgo](https://pkg.go.dev/cmd/cgo), and builds are executed with `CGO_ENABLED=0` by default. -To install other OS packages, make those available in your [configured base image](./../configuration). +To install other OS packages, make those available in your [configured base image](../../configuration). `ko` only supports Go applications. For a similar tool targeting Java applications, try [Jib](https://github.com/GoogleContainerTools/jib). diff --git a/docs/advanced/migrating-from-dockerfile.md b/docs/advanced/migrating-from-dockerfile.md index af6058f818..267b3f8383 100644 --- a/docs/advanced/migrating-from-dockerfile.md +++ b/docs/advanced/migrating-from-dockerfile.md @@ -53,11 +53,11 @@ After running `docker build` on this `Dockerfile`, don't forget to push that ima ## Migrating to `ko` -If your Go source is laid out as described in the tutorial, and you've [installed](./../install) and [set up your environment](./../get-started), you can simply run `ko build ./` to build and push the container image to your registry. +If your Go source is laid out as described in the tutorial, and you've [installed](../../install) and [set up your environment](../../get-started), you can simply run `ko build ./` to build and push the container image to your registry. You're done. You can delete your `Dockerfile` and uninstall `docker`. -`ko` takes advantage of your local [Go build cache](./../features/build-cache) without needing to be told to, and it sets the `ENTRYPOINT` and uses a nonroot distroless base image by default. +`ko` takes advantage of your local [Go build cache](../../features/build-cache) without needing to be told to, and it sets the `ENTRYPOINT` and uses a nonroot distroless base image by default. To build a multi-arch image, simply add `--platform=all`. Compare this to the [equivalent Docker instructions](https://docs.docker.com/desktop/multi-arch/). diff --git a/docs/deployment.md b/docs/deployment.md index 913a40e5a7..df4ec130f8 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -1,6 +1,6 @@ # Deployment -_See [Kubernetes Integration](./features/k8s) for information about deploying to Kubernetes._ +_See [Kubernetes Integration](../features/k8s) for information about deploying to Kubernetes._ Because the output of `ko build` is an image reference, you can easily pass it to other tools that expect to take an image reference. diff --git a/docs/features/k8s.md b/docs/features/k8s.md index 928ee1cd62..739bb8fd7e 100644 --- a/docs/features/k8s.md +++ b/docs/features/k8s.md @@ -81,6 +81,11 @@ using `ko apply`: ko apply -f config/ ``` +Also, any flags passed after `--` are passed to `kubectl apply` directly, for example to specify context and kubeconfig: +``` +ko apply -f config -- --context=foo --kubeconfig=cfg.yaml +``` + **NB:** This requires that `kubectl` is available. ## `ko delete` diff --git a/docs/features/multi-platform.md b/docs/features/multi-platform.md index f18c3beedd..77589a1d11 100644 --- a/docs/features/multi-platform.md +++ b/docs/features/multi-platform.md @@ -8,5 +8,5 @@ This will instruct `ko` to look up all the supported platforms in the base image You can also select specific platforms, for example, `--platform=linux/amd64,linux/arm64`. `ko` also has experimental support for building for Windows images. -See [FAQ](./../advanced/faq#can-i-build-windows-containers). +See [FAQ](../../advanced/faq#can-i-build-windows-containers). diff --git a/docs/install.md b/docs/install.md index 8a4e6e7d3f..d687c28361 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,13 +1,26 @@ # Installation -### Install from [GitHub Releases](https://github.com/google/ko/releases) +### Install from [GitHub Releases](https://github.com/ko-build/ko/releases) -```plaintext -VERSION=TODO # choose the latest version -OS=Linux # or Darwin, Windows -ARCH=x86_64 # or arm64, i386, s390x -curl -L https://github.com/google/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz | tar xzf - ko -chmod +x ./ko +``` +$ VERSION=TODO # choose the latest version +$ OS=Linux # or Darwin +$ ARCH=x86_64 # or arm64, i386, s390x +``` + +We generate [SLSA3 provenance](slsa.dev) using the OpenSSF's [slsa-framework/slsa-github-generator](https://github.com/slsa-framework/slsa-github-generator). To verify our release, install the verification tool from [slsa-framework/slsa-verifier#installation](https://github.com/slsa-framework/slsa-verifier#installation) and verify as follows: + + +```shell +$ curl -sL "https://github.com/ko-build/ko/releases/download/v${VERSION}/ko_${VERSION}_${OS}_${ARCH}.tar.gz" > ko.tar.gz +$ curl -sL https://github.com/ko-build/ko/releases/download/v${VERSION}/attestation.intoto.jsonl > provenance.intoto.jsonl +$ slsa-verifier -artifact-path ko.tar.gz -provenance provenance.intoto.jsonl -source github.com/google/ko -tag "v${VERSION}" + PASSED: Verified SLSA provenance +``` + +```shell +$ tar xzf ko.tar.gz ko +$ chmod +x ./ko ``` ### Install using [Homebrew](https://brew.sh) diff --git a/internal/sbom/sbom.go b/internal/sbom/sbom.go index bb44f87432..e75fd9c822 100644 --- a/internal/sbom/sbom.go +++ b/internal/sbom/sbom.go @@ -60,7 +60,7 @@ func massageGoVersionM(b []byte) ([]byte, error) { if !scanner.Scan() { // Input was malformed, and doesn't contain any newlines (it // may even be empty). This seems to happen on Windows - // (https://github.com/google/ko/issues/535) and in unit tests. + // (https://github.com/ko-build/ko/issues/535) and in unit tests. // Just proceed with an empty output for now, and SBOMs will be empty. // TODO: This should be an error. return nil, nil diff --git a/pkg/build/build.go b/pkg/build/build.go index 9e5e7dec61..5a4526665f 100644 --- a/pkg/build/build.go +++ b/pkg/build/build.go @@ -28,8 +28,8 @@ import ( type Interface interface { // QualifyImport turns relative importpath references into complete importpaths. // It also adds the ko scheme prefix if necessary. - // E.g., "github.com/google/ko/test" => "ko://github.com/google/ko/test" - // and "./test" => "ko://github.com/google/ko/test" + // E.g., "github.com/ko-build/ko/test" => "ko://github.com/ko-build/ko/test" + // and "./test" => "ko://github.com/ko-build/ko/test" QualifyImport(string) (string, error) // IsSupportedReference determines whether the given reference is to an diff --git a/pkg/build/gobuild.go b/pkg/build/gobuild.go index bf58887805..d8f41c19a7 100644 --- a/pkg/build/gobuild.go +++ b/pkg/build/gobuild.go @@ -889,7 +889,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl updatePath(cfg, appDir) cfg.Config.Env = append(cfg.Config.Env, "KO_DATA_PATH="+kodataRoot) } - cfg.Author = "github.com/google/ko" + cfg.Author = "github.com/ko-build/ko" if cfg.Config.Labels == nil { cfg.Config.Labels = map[string]string{} diff --git a/pkg/commands/resolver.go b/pkg/commands/resolver.go index 1783e9fbfa..9f47d3e220 100644 --- a/pkg/commands/resolver.go +++ b/pkg/commands/resolver.go @@ -386,7 +386,7 @@ func ResolveFilesToWriter( } // Make sure we exit with an error. - // See https://github.com/google/ko/issues/84 + // See https://github.com/ko-build/ko/issues/84 return errs.Wait() } diff --git a/test/main.go b/test/main.go index af9ffe5c30..1f38b8ef92 100644 --- a/test/main.go +++ b/test/main.go @@ -49,7 +49,7 @@ func main() { // with the go build tag `timetzdata`. Since we want to test // loading tzdata provided by the base image below, we'll just // skip that for Windows here. - // See https://github.com/google/ko/issues/739 + // See https://github.com/ko-build/ko/issues/739 log.Println("skipping timezone conversion on Windows") } else { // Exercise timezone conversions, which demonstrates tzdata is provided