Commit Graph
385 Commits
Author SHA1 Message Date
Jason Hall 3fc720f912 Update ecr-login dependency to allow us to avoid logspam (#586) 2022-02-16 15:33:47 -05:00
Jason Hall a41529ebf4 Fix Windows e2e test (#599)
Use nanoserver:ltsc2022 and correct osversion
2022-02-16 14:48:14 -05:00
Jason Hall 0187841b16 Sign image using cosign (#595)
Annotate signature with run information
2022-02-13 15:58:38 -08:00
Jason Hall 98ff104f1a Generate CycloneDX SBOMs using our own JSON generation (#587)
* Generate CycloneDX SBOMs using our own JSON generation

* fix some errors

* Add support to ko deps

* Add e2e SBOM validation

* ignore empty hashes (why are hashes empty?)
2022-02-11 16:49:53 -05:00
Jason Hall f8d0aca1ab Log base image@digest when building (#592)
* Log base image@digest when building

* Only log full digest if the original base wasn't already specified by digest

* Remove redundant image ref
2022-02-11 10:39:19 -05:00
Jason Hall 89ede9110a Include cred helpers in keychain (#581)
This adds implicit support for Google, Amazon, Azure and GitHub
container registries if the environment provides credentials.

Binary size increases from 22 MB -> 26 MB
2022-02-08 15:20:31 -05:00
Nghia Tran 3e5ee5b718 Validate KO_CONFIG_PATH (#471)
* Validate KO_CONFIG_PATH to avoid ignored options

* Remove dup
2022-02-08 11:28:53 -08:00
Jason Hall 1425e4be74 Add a mutex to map writing when using KOCACHE (#580) 2022-02-02 14:34:57 -05:00
Jason Hall e961890072 Set GOAMD64 if variant is set (#578)
This change also changes behavior of GOARM, since docs suggest that it's
only used when the GOARCH=arm, and not arm64.
2022-02-01 16:46:32 -05:00
dependabot[bot] 64fa5edc8e Bump k8s.io/apimachinery from 0.23.1 to 0.23.3 (#576)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.1 to 0.23.3.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.23.1...v0.23.3)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-30 20:54:42 -05:00
dependabot[bot] 5565544d07 Bump golang.org/x/tools from 0.1.8 to 0.1.9 (#575)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.8 to 0.1.9.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.8...v0.1.9)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-30 20:54:20 -05:00
dependabot[bot] 32490da3e8 Bump github.com/containerd/stargz-snapshotter/estargz (#577)
Bumps [github.com/containerd/stargz-snapshotter/estargz](https://github.com/containerd/stargz-snapshotter) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/containerd/stargz-snapshotter/releases)
- [Commits](https://github.com/containerd/stargz-snapshotter/compare/v0.10.1...v0.11.0)

---
updated-dependencies:
- dependency-name: github.com/containerd/stargz-snapshotter/estargz
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-30 20:53:59 -05:00
Jason Hall 5f733f9ac6 Support partial platform matching for osversion only (#572)
* Support partial platform matching for osversion only

* Add doc comment

* lint fixes

* pick up Platform.String and v1.ParsePlatform

* go mod tidy && go mod vendor
2022-01-27 17:06:35 -05:00
dependabot[bot] 70b671c602 Bump github.com/google/go-cmp from 0.5.6 to 0.5.7 (#567)
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.6...v0.5.7)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 08:35:13 -05:00
dependabot[bot] 64df1a7ec5 Bump github.com/google/go-containerregistry from 0.7.0 to 0.8.0 (#565)
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-10 11:22:09 -05:00
Wilson E. Husin c67fb03b79 Pre-parse platform string with StringSliceVar (#551)
* Pre-parse platform string with StringSliceVar

This allows users to declare --platform multiple times and have the
values appended, i.e.:
  ko build --platform=linux/amd64 --platform=linux/arm64
is equivalent to
  ko build --platform=linux/amd64,linux/arm64

As a side effect, platformMatcher.spec and gobuildOpener.platforms are
now of type []string (instead of string) to maintain structure of
information from flag parsing.

* Adjust comments and styling for clarity.

* The flag --platform is now of type strings.

Internally cobra/pflag defines StringSliceVar as "strings" whereas
StringVar is defined as "string".

This change is updated by running hack/update-codegen.sh script.

* Add backwards compatibility for WithPlatforms function signature

Update comments to reflect implementation as well.

* Fix syntax failure on unit test
2022-01-04 14:19:52 -05:00
Kodai Sakabe da244de716 Add how to use Azure Container Apps (#561) 2021-12-27 12:27:26 -05:00
Matt Moore f5762bedf3 Add support for --image-refs (#555)
* Add support for `--image-refs`

This change adds a new `--image-refs=FILE` flag that can be used to
direct `ko` to write a file containing a `\n` delimited list of published
references.  In the common case, this will contain the list of digest
references, but if flags directing the use of tags are present this
will reflect the style of reference requested.

* Fix dates, interface check.
2021-12-20 09:51:43 -08:00
dependabot[bot] ddf9257efc Bump github.com/docker/docker (#559)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.11+incompatible to 20.10.12+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.11...v20.10.12)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-20 09:34:45 -05:00
dependabot[bot] 1a12a62b99 Bump k8s.io/apimachinery from 0.23.0 to 0.23.1 (#556)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.23.0 to 0.23.1.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.23.0...v0.23.1)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-19 21:51:17 -05:00
dependabot[bot] 815a59ab72 Bump github.com/spf13/viper from 1.10.0 to 1.10.1 (#558)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-19 21:36:51 -05:00
dependabot[bot] fd81c29922 Bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (#557)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-19 21:36:24 -05:00
Jon Johnson 73a4629033 Always clean Dir for packages.Load 2021-12-20 08:39:16 +11:00
Jason Hall 8135bf22e9 Set config creation time without mutating (#524)
* Set config creation time without mutating

* only set creation time if set

* drop creationTime from buildLayer entirely
2021-12-16 14:07:15 -05:00
Jason Hall 33fa766168 Support osversion when selecting base images (#536)
* Support osversion when selecting base images

Use this in e2e tests.

Also clean up usage of bo.Platform vs a new platform var.

* use correct osversion
2021-12-15 16:08:27 -05:00
Jason Hall b813b95379 Prepare for Go 1.18 by replacing all our forked code (#549)
* Prepare for Go 1.18 by replacing all our forked code

This hides our forked-from-gotip code behind a build tag so it's only
used when the build is run on Go <1.18. For builds >= 1.18, we'll use
the actual runtime/debug and debug/buildinfo packages.

Add preliminary support for building on Go 1.18beta1 to our Build
matrix, to ensure this code builds. It's all a terrible hack, but it'll
get less so when 1.18 is actually released.

* Fix lint and boilerplate
2021-12-15 14:52:36 -05:00
Steve Coffman 6cc2d7fc64 Fix #530 Hanging behavior with ASDF installed Go on Darwin (#548)
Signed-off-by: Steve Coffman <steve@khanacademy.org>
2021-12-15 11:38:01 -08:00
jonjohnsonjr 5a13603eef Fix tarball publisher ctx handling (#545)
Previously, we'd use the ctx from the Build invocation, but because
remote stashes the remote.WithContext option, when we later go to fetch
the actual base image to write it out to a tarball, it will fail because
the Build ctx was cancelled.

For whatever reason, NewGo takes a ctx, so this change propagates the
badness from remote so we can use the NewGo ctx when we fetch base
images.
2021-12-14 15:30:01 -08:00
Matt Moore 22c9a5229b Add coverage of --platform=a,b (#547) 2021-12-14 15:24:07 -08:00
Antoine Cotten 66a77a91e7 Fix handling of 'has' selectors (#473)
* Add tests to surface issue 467

* Fall back to empty map if object has no labels
2021-12-14 13:20:30 -08:00
Chris Suszynski 84e8ab637e Allow to customize publish.Namer (#477)
* Allow to customize publish.Namer

Fixes #476

* Removing a CLI flag for path separator

* Removing ImageNameSeparator option after review
2021-12-14 13:19:14 -08:00
Matt Moore a56047a2a1 Filter out nil addendum before constructing index. (#546)
In the PR where we added concurrency we used a fixed length array to store
addendum to preserve the ordering from the base image when constructing the
final index.  However, with `--platform=...` this list may be filtered, which
gives us `nil` entries in our addendum.

This filters `nil` entries prior to constructing the index.

Fixes: https://github.com/google/ko/issues/544
2021-12-14 11:00:18 -08:00
Jason Hall 96bedf16df Add .ko.yaml to base ko container image on golang:1.17 (#533)
* Add .ko.yaml to base ko container image on golang:1.17

Ignore this in e2e tests, since even though golang:1.17 provides a
Windows base image, ko's base image platform selection doesn't take
osversion into account. The e2e tests don't exercise golang usage at
all, so it shouldn't matter.

* Update README
2021-12-14 12:56:21 -05:00
dependabot[bot] 2ba70fc75b Bump k8s.io/apimachinery from 0.22.4 to 0.23.0 (#531)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.22.4 to 0.23.0.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.22.4...v0.23.0)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-13 06:50:31 -05:00
dependabot[bot] a1c871749f Bump github.com/spf13/viper from 1.9.0 to 1.10.0 (#529)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-12 22:39:32 -05:00
jonjohnsonjr 2502eb9d47 Build each platform concurrently (#527)
* Build each platform concurrently

At least on my machine, this is slightly faster on a cold build and
saves significant time on a warm build.

* Plumb --jobs down to multi-arch

* Add deprecation warning for build.Limiter
2021-12-09 11:02:14 -08:00
Jason Hallandjonjohnsonjr a8c0773790 Add a workflow to push a :latest ko image to ghcr.io (#528)
* Add a workflow to push a :latest ko image to ghcr.io

This also tags images with the commit SHA

* Update .github/workflows/image.yaml

Co-authored-by: jonjohnsonjr <jonjohnson@google.com>

* Update .github/workflows/image.yaml

Co-authored-by: jonjohnsonjr <jonjohnson@google.com>

* Update .github/workflows/image.yaml

Co-authored-by: jonjohnsonjr <jonjohnson@google.com>

Co-authored-by: jonjohnsonjr <jonjohnson@google.com>
2021-12-09 13:51:28 -05:00
jonjohnsonjr ad0607f0a1 Cache base image metadata in-memory (#525)
This saves a roundtrip to the registry if we ever use the same base
image for multiple builds in a single invocation.

This also sets us up for using an on-disk cache for image metadata to
speed things up even further.
2021-12-08 09:28:15 -05:00
jonjohnsonjr 54cddccd1c Introduce KOCACHE (#269)
* Introduce KOCACHE

Cache binaries under $KOCACHE/<import path>/<platform>

Cache metdata mapping buildid to diffid and diffid to descriptor.

* Point TODO at issue

* Split layerCache into separate file

This makes things a little cleaner by having a single place that calls
buildLayer and passing a thunk down into the cache logic to call that on
a cache miss.

Also, remove the debug logging to make the code easier to follow (if you
need to recompile anyway, it's easy enough to add log lines).

* Move cached output to $KOCACHE/bin
2021-12-08 08:47:26 -05:00
darklore 6ff346909c Use default completion command provided by cobra. (#522)
* Use default `completion` command provided by cobra.

`cobra` provides default `completion` subcommand.
It supports bash, zsh, fish, and powershell by default.

* update docs
2021-12-05 09:00:38 -05:00
Markus Thömmes 5640c334df Run golangci-lint before tool setup to fix tar errors (#518) 2021-11-25 10:44:40 -05:00
Markus Thömmes d91d7a45e8 Update golangci-lint and fix issues (#519) 2021-11-25 10:27:40 -05:00
Matt Moore 5787600e92 Normalize the package hash to hex. (#512)
We were emitting package checksum hashes as `h1:{base64}`.  `h1:` is a prefix that indicates "Hash 1", which is a SHA-256 based hash of the files, which is then base64 encoded as the suffix.

This change detects/strips the `h1:` prefix and re-encodes the base64 data as hex.
2021-11-23 09:34:43 -05:00
Matt Moore 3edb68b273 Connect SBOMs with SPDX support. (#511)
* Connect SBOMs with SPDX support.

This combines Jason's SPDX stuff and my SBOM stuff to support
SPDX-based SBOMs by default instead of our `go version -m`
invention.

* Make ko deps use SPDX by default
2021-11-22 17:19:43 -05:00
Jason Hall af2ff52a11 Generate ko deps in SPDX format (#507)
* WIP: generate ko deps in SPDX format

- copy out a bunch of BuildInfo stuff that will land in 1.18

* review comments

* have deps take --sbom flag more like Matt's new publish-time flag
2021-11-22 15:32:29 -05:00
Matt Moore 6d0691330a Add support for writing SBOMs when the build.Result is oci.Signed*. (#506)
This adds functionality that enables the default publisher to
publish SBOMs (and later signatures and attestations) when the
`build.Result` is an `oci.SignedEntity`.

This also changes the `gobuild` logic to start producing
`oci.Signed*` as its `build.Result`s, so when executed we get an
SBOM for each architecture image.

For example, see the "Published SBOM" lines below:

```shell
2021/11/19 19:24:50 Using base gcr.io/distroless/static:nonroot for github.com/google/ko
2021/11/19 19:24:51 Building github.com/google/ko for linux/amd64
2021/11/19 19:24:52 Building github.com/google/ko for linux/arm64
2021/11/19 19:24:57 Publishing ghcr.io/mattmoor/ko:latest
2021/11/19 19:24:58 existing blob: sha256:c78c74e7bb4a511f7d31061fbf140d55d5549a62d33cdbdf0c57ffe43603bbeb
2021/11/19 19:24:58 existing blob: sha256:4aa59d0bf53d4190174fbbfa3e9b15fdab72e5a95077025abfa8435ccafa2920
2021/11/19 19:24:58 ghcr.io/mattmoor/ko:sha256-d2bc030f5ed083d5e6a30a7969c9a8e599511b8d7a6e20695bf5ea029b6e2c3f.sbom: digest: sha256:c67ec671aaa82902e619883a7ac7486e6f9af36653449e2eb030ba273fe5a022 size: 348
2021/11/19 19:24:58 Published SBOM ghcr.io/mattmoor/ko:sha256-d2bc030f5ed083d5e6a30a7969c9a8e599511b8d7a6e20695bf5ea029b6e2c3f.sbom
2021/11/19 19:24:58 existing blob: sha256:c78c74e7bb4a511f7d31061fbf140d55d5549a62d33cdbdf0c57ffe43603bbeb
2021/11/19 19:24:58 existing blob: sha256:4aa59d0bf53d4190174fbbfa3e9b15fdab72e5a95077025abfa8435ccafa2920
2021/11/19 19:24:59 ghcr.io/mattmoor/ko:sha256-b74c230f20efd94981e5fd823bacc23cbd71055a1b3b6a0893152b398c67743b.sbom: digest: sha256:c67ec671aaa82902e619883a7ac7486e6f9af36653449e2eb030ba273fe5a022 size: 348
2021/11/19 19:24:59 Published SBOM ghcr.io/mattmoor/ko:sha256-b74c230f20efd94981e5fd823bacc23cbd71055a1b3b6a0893152b398c67743b.sbom
2021/11/19 19:24:59 existing blob: sha256:3f7e3c6765a6abc682cd40ea256fbea5c1d4debbc07659efbc0dedc13eee0da6
2021/11/19 19:24:59 existing blob: sha256:250c06f7c38e52dc77e5c7586c3e40280dc7ff9bb9007c396e06d96736cf8542
2021/11/19 19:24:59 existing blob: sha256:e8614d09b7bebabd9d8a450f44e88a8807c98a438a2ddd63146865286b132d1b
2021/11/19 19:24:59 existing blob: sha256:7067b1bc6f9ce59f3a4ed2216946ebbb27a4f7a102f55d96c6af1dc90e77b510
2021/11/19 19:25:00 ghcr.io/mattmoor/ko@sha256:d2bc030f5ed083d5e6a30a7969c9a8e599511b8d7a6e20695bf5ea029b6e2c3f: digest: sha256:d2bc030f5ed083d5e6a30a7969c9a8e599511b8d7a6e20695bf5ea029b6e2c3f size: 751
2021/11/19 19:25:01 existing blob: sha256:250c06f7c38e52dc77e5c7586c3e40280dc7ff9bb9007c396e06d96736cf8542
2021/11/19 19:25:02 pushed blob: sha256:121c637d5c84562b51404a6f71c1f995ad059740293a3911a0dc33eb223e41a4
2021/11/19 19:25:02 pushed blob: sha256:859e03b7461b2a512159493ef1504d2859ed37c05ed1ef781ff98394ea4799b5
2021/11/19 19:25:02 pushed blob: sha256:d1b55c3db0f16b5056776c6d2c279efd16d28dbf1aae3eef1f3f9b7551d1f490
2021/11/19 19:25:03 ghcr.io/mattmoor/ko@sha256:b74c230f20efd94981e5fd823bacc23cbd71055a1b3b6a0893152b398c67743b: digest: sha256:b74c230f20efd94981e5fd823bacc23cbd71055a1b3b6a0893152b398c67743b size: 751
2021/11/19 19:25:03 ghcr.io/mattmoor/ko:latest: digest: sha256:e4466a7dd9be66c7c1b43a8ecc19247041ece232407a14e3d6ea3c51d2561a71 size: 529
2021/11/19 19:25:03 Published ghcr.io/mattmoor/ko@sha256:e4466a7dd9be66c7c1b43a8ecc19247041ece232407a14e3d6ea3c51d2561a71
ghcr.io/mattmoor/ko@sha256:e4466a7dd9be66c7c1b43a8ecc19247041ece232407a14e3d6ea3c51d2561a71
```

The "SBOM" being attached in this change is the raw output of `go version -m`,
which we will convert to one of the standard formats in a subsequent change.
2021-11-22 10:57:13 -08:00
dependabot[bot] b20faa5bdc Bump github.com/docker/docker (#510)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.10+incompatible to 20.10.11+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.10...v20.10.11)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-21 21:24:06 -05:00
dependabot[bot] 23c6850d4a Bump k8s.io/apimachinery from 0.22.3 to 0.22.4 (#509)
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.22.3 to 0.22.4.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.22.3...v0.22.4)

---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-21 21:03:56 -05:00
dependabot[bot] 933e908d69 Bump github.com/containerd/stargz-snapshotter/estargz (#508)
Bumps [github.com/containerd/stargz-snapshotter/estargz](https://github.com/containerd/stargz-snapshotter) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/containerd/stargz-snapshotter/releases)
- [Commits](https://github.com/containerd/stargz-snapshotter/compare/v0.10.0...v0.10.1)

---
updated-dependencies:
- dependency-name: github.com/containerd/stargz-snapshotter/estargz
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-21 21:03:22 -05:00
Halvard Skogsrud 2fbc9089eb Add Trimpath build option
Enables programmatic control of whether `ko` adds the `-trimpath`
flag to `go build`.

The `-trimpath` flag removes file system paths from the resulting
binary. `ko` adds `-trimpath` by default as it aids in achieving
reproducible builds.

However, removing file system paths makes interactive debugging more
challenging, in particular in mapping source file locations in the
IDE to debug information in the binary.

If you set `Trimpath` to `false` to enable interactive debugging, you
probably also want to set `DisableOptimizations` to `true` to disable
compiler optimizations and inlining.

Reference for `-trimpath`:
https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies

Resolves: #500
Related: #71, #78, https://github.com/GoogleContainerTools/skaffold/issues/6843
2021-11-18 09:04:15 +11:00