Commit Graph

215 Commits

Author SHA1 Message Date
Maximilian Hippler f7ac90e8ac
Fixed wrong example in README.md (#2931)
Fixed wrong gitlab-ci.yml example for "Merging the Container Manifests".
2024-01-09 10:10:09 -08:00
Anna Levenberg 6b7604ee58
feat: add a retry with result function enabled by --image-download-retry (#2853)
* feat: add a retry with result function enabled by --image-download-retry (#2853)

* impl: add a retry with result function

* fix ci errs

* test: add unit tests

* gofmt

* make debian a const

* update param description
2023-11-20 10:10:17 -08:00
Paolo Di Tommaso b1a0d57a65
Fix missing slash (#2658)
docs: fixes the missing slash in tar:// context example
2023-10-30 19:51:49 -07:00
zhangzhiqiangcs aac7360ffd
docs: fix readme sample typo (#2792)
Signed-off-by: zhangzhiqiang02 <zhangzhiqiang02@megvii.com>
2023-10-17 19:36:49 -07:00
Aaron Prindle d02945f98d
docs: fix --use-new-run typo (#2698) 2023-08-24 13:12:34 -07:00
Aaron Prindle 8a0af16472
docs: add more information regarding --use-new-run (#2687) 2023-08-18 11:36:06 -07:00
Julian cefe99b92a
Added skip-push-permission flag (#2657)
Added skip-push-permission flag to conditionally disable push permission check on build start to accommodate for slow network policies
2023-08-15 11:23:16 -07:00
Fernando Giannetti c2445c76da
Allows to disable the fallback to the default registry on image pull (#2637)
* Allow to disable the fallback to the default registry on image pull

When one or more registry mirror(s) are deffined with the 'registry-mirror' argument, if none of those mirrors include the image,
the current behavior is to fallback to the default registry.
If a whitelist (or some image restriction) is applied at the mirror side, fallbacking to the default registry makes that restriction useless.
This new argument allows to skip the fallback and abort the build if the mirror rejects an image.
If it is not set, is completelly transparent.

* fix typo on command help
2023-07-26 13:05:37 -07:00
alexezio 0743c19176
feat: cache dockerfile images through warmer (#2499)
* feat: cache dockerfile images through warmer

* Fix logical error in conditional statement

* Addressed review feedback

1. Updated help text for the --build-arg flag to indicate it should be used with the dockerfile flag.
2. Updated the documentation to include the optional --build-arg flag.
3. Added unit tests for `ParseDockerfile`, covering scenarios for missing Dockerfile, invalid Dockerfile, single stage Dockerfile, multi-stage Dockerfile and Args Dockerfile

---------

Co-authored-by: 连奔驰 <benchi.lian@thoughtworks.com>
2023-06-21 12:00:22 -07:00
Jasper Ben Orschulko cce5d313b3
Add guide on creating multi-arch manifests (#2306)
* Add guide on creating multi-arch manifests

While kaniko itself does not natively support building multi-arch
container manifests, it may be used in combination with tools such as
manifest-tool to create and merge seperate arch builds into a single
manifest.

Fixes https://github.com/GoogleContainerTools/kaniko/issues/1102
Fixes https://github.com/GoogleContainerTools/kaniko/issues/786

* Add missing toc entry
2023-06-07 10:26:54 -07:00
Gabriel Nützi e4622a594e
fix: Correct deprecated flags in `README.md` (#2335)
* fix: Correct deprecated flags in `README.md`

* Update README.md

---------

Co-authored-by: Aaron Prindle <aprindle@google.com>
2023-05-18 14:37:57 -07:00
Eric 7525828ef9
Add mTLS (client cert) registry authentication (#2180)
* Add mTLS (client cert) support

Add support for Mutual TLS (mTLS) client certificate authentication.
The expected format of the new --registry-client-cert flag is the same
as the existing --registry-certificate flag, which will allow
different client certificates for different registries:

--registry-client-cert my.registry.url=/path/to/cert.crt,/path/to/key.key

* tidy: Rename mTLS (Client Cert) flag to be in line with others

This flag didn't describe that it was for the client certs uses with
the registry. Although this should be reasonably obvious, I like the
consistency with the other registry flag.

* test: Added unit tests for mTLS (Client Cert) loading

* test: Add 2 more tests for comma split formatting

since the comma splitting is a new portion of code let's make sure
that that format works well too in other cases

* tidy: Fix formatting of flag help text

* tidy: Made invalid cert format error consistent

I was running the tests and saw the message:

Failed to load client certificate/key '/path/to/client/certificate.cert' for my.registry.name, format is my.registry.name=/path/to/cert,/path/to/key

I then realized that it'd be a lot nicer if this showed the user what
they input, and how they should change it (rather than decomposing it:

Failed to load client certificate/key 'my.registry.name=/path/to/client/certificate.cert', expected format: my.registry.name=/path/to/cert,/path/to/key

* test: Fixed incorrect test argument

This didn't fail the test before because it's only attempting to show
that certs only get loaded and used for their associated registry but
it's important to keep this correct.

This case is covered by the test below, "RegistriesClientCertificates
incorrect cert format"

* doc: Add new flag to README.md

* mod: Fail to push if there was a problem loading client certs

Rather than warning that there was an issue, we should fail if the
requested client certificates were not found or failed to load.

This feels a lot better than waiting for the build to finish then
failing later.

* mod: Return an error if the certificate authority fails to load, just like client certs

The MakeTransport function was changed in the previous commit to
allow returning errors if there was a problem loading certificates,
rather than just print warnings.

This feels a lot better as you get the error immediately that there's
a problem to fix, rather than getting a warning, then later an error
that the server's certificate could not be verified.

* tidy: fix golint issues
2023-05-18 14:20:51 -07:00
Jerry Jones cf9a334cb0
chore: fix typo (#2316) 2022-11-10 12:35:15 -05:00
Junwon Kwon 403e627321
chore: fix typo (#2289) 2022-10-23 12:51:51 -04:00
Bryan A. S ee513538f6
fix(README.md): remove duplicate caching section (#2223)
Remove duplicate paragraph at caching/caching layers section.
2022-08-25 10:51:14 -04:00
Gabriel Nützi 90e426ba3f
refactor: Make CLI argument names consistent (#2084)
* fix: Wrong argument naming

* fix: tarPath as well

* Test

* fix: Fix tests

* np: Format markdown

* fix: Review changes
2022-08-22 09:10:11 -04:00
Ramy f9dcb92c38
add cache run command option (#2032)
Co-authored-by: Rami CHAABANE <rchaabane@scaleway.com>
2022-08-09 08:35:00 -04:00
Ishant Mrinal Haloi 1c0e5a0aca
Update Azure credHelpers docs (#2109) 2022-05-27 11:29:59 -04:00
Yonatan Koren ce1fb51579
Fix README blurb on --cache-copy-layers, so that the purpose of the flag is more clear. (#2064)
Co-authored-by: Yonatan Koren <10080107+korenyoni@users.noreply.github.com>
2022-05-16 12:20:14 -07:00
Jasper Ben Orschulko b6d18cc150
README.md: Update docs on building for AWS ECR (#2020)
- Kaniko v.1.8.0 does not require additional cred helper logic for ECR,
as it discovers ECR repositories automatically and acts accordingly.
Thus removed from the documentation.
- Add details on using IAM role based authentication for pushing to ECR.

Fixes https://github.com/GoogleContainerTools/kaniko/issues/780
Fixes https://github.com/GoogleContainerTools/kaniko/issues/1455

Signed-off-by: Jasper Orschulko <Jasper.Orschulko@iris-sensing.com>
2022-03-28 09:49:38 -04:00
Wolfgang Walther 2bc27c63a1
Fix formatting for `--image-fs-extract-retry` (#1942) 2022-02-17 14:59:21 -08:00
Pat Litke 87bed1417f
Update readme (#1897)
Describes work-around for #1803 - add an example of how to work around issues encountered out of the box when trying to pass build-args that contain spaces in their values
2022-01-28 14:51:08 -05:00
jeunii 54395fc944
Fix typo (#1825) 2021-12-23 12:03:20 -05:00
Sebastiaan Tammer 2cb0387758
Fix broken anchor link (#1804) 2021-12-23 11:35:21 -05:00
Bernardo Marques 7ae8e7d740
Update readme insecure flags (#1811)
* Clarify usage of --skip-tls-verify-registry argument

Referring to --skip-tls-verify-registry as a "flag" is misleading since
command line flags usually require no value. Thus, the documentation
is updated to match the behavior of the command line argument.

* Clarify usage of --insecure-registry argument

Referring to --insecure-registry as a "flag" is misleading since
command line flags usually require no value. Thus, the documentation
is updated to match the behavior of the command line argument.
2021-12-23 11:32:39 -05:00
Dávid Szakállas 840923b798
add documentation on ACR cred helper (#1831) 2021-12-23 11:32:17 -05:00
Jason Hall 59c2d2d08f
Collapse integration test workflows into one config (#1855)
* Collapse integration test workflows into one config

Remove last traces of Travis, including env vars and `make travis-setup`
and badges in README

* fix lint

* make integration tests pass on PRs
2021-12-22 20:04:40 -05:00
Janosch Maier 46e01340c2
Remove tarball.WithCompressedCaching flag to resolve OOM Killed error (#1722)
* Remove tarball.WithCompressedCaching flag to resolve OOM Killed error

Large images cannot be build as the kaniko container will be killed due to an OOM error. Removing the tarball compression drastically reduces the memory required to push large image layers. Fixes #1680

This change may increase the build time for smaller images. Therefore a command line option to trigger the compression or a more intelligent behaviour may be useful.

* Add new command line flag to toggle compressed caching

* Add unittest for build with --compressed-caching command line flag set to false
2021-10-19 00:14:06 -07:00
Mikhail Vasin 544abd7665
Fix typo (#1719)
* Fix typo

* Another typo
2021-10-18 23:56:04 -07:00
Yahav Itzhak 211d487e44
Add instructions for using Artifactory (#1715) 2021-08-10 22:01:12 -07:00
Silvano Cirujano Cuesta 1d9bc175c2
Add support for CPU variants (#1676)
Signed-off-by: Silvano Cirujano Cuesta <silvano.cirujano-cuesta@siemens.com>
Inspired-by: mickkael 19755421+mickkael@users.noreply.github.com
2021-07-08 12:05:38 -07:00
ankitm123 9997cd4d40
docs: add missing cache-copy-layers arg in README (#1672)
Signed-off-by: ankitm123 <ankitmohapatra123@gmail.com>
2021-07-08 12:01:09 -07:00
Jose Donizetti 5b3fb84a22
Retry extracting filesystem from image (#1685)
* Retry extracting filesystem from image

* Add flag image-fs-extract-retry

* Add --image-fs-extract-retry documentation
2021-07-08 12:00:22 -07:00
Tejal Desai 04fb2fd55e
rename flag `--whitelist-var-run` to `ignore-var-run` (#1668)
* rename flag

* instead depcrecate

* add normalize function
2021-06-14 12:08:37 -07:00
Jon Friesen d40a51f38f
adds ignore-path command arguments to executor (#1622)
* adds ignore-path command

* add flag to README
2021-04-13 14:29:51 -07:00
priyawadhwa 298245c648
Check-in cosign public key and update README (#1611) 2021-03-31 09:14:07 -05:00
Tejal Desai ea96245f64
Add references to the bottom 2021-02-22 22:23:49 -08:00
Viktor Farcic 5e4fe2b9f2
docs: Added a video introduction to Kaniko (#1517)
* Video introduction

* Update README.md

Add new references section

Co-authored-by: Tejal Desai <tejal29@gmail.com>
2021-02-22 22:22:59 -08:00
Sascha Schwarze 69f942f751
Improve retry behavior for push operation (#1578)
* Update go-containerregistry to 0.4

* Implement --push-retry argument
2021-02-22 21:25:58 -08:00
Max Wittig 09cac63b7b
docs(readme): add dockerfile flag documentation (#1566) 2021-02-08 09:59:41 -08:00
Or Geva b3e036aab2
Add --image-name-tag-with-digest flag (#1541) 2021-01-19 13:28:05 -08:00
Alec Rajeev 397912d96c
Fix travis-ci link (#1535) 2021-01-03 10:09:28 -08:00
Tejal Desai 9f76932171
Update GowalkDir dependency to pick up fixes. Added default 90 min timeout for walking FS. Override it with environment variable. Add slowjam to kaniko pod (#1530) 2020-12-21 22:40:37 -08:00
Tejal Desai b04399eeac
add caching copy layers back (#1518)
* add caching copy layers back

* fix test

* lint

* fix test - 2

* Add integration test

* fix lint
2020-12-11 00:25:03 -08:00
Vincent Behar 131828a1ad
feat: support multiple registry mirrors with fallback (#1498)
Fixes #1473

The initial implementation of the registry mirror only allowed a single mirror, and if pulling from the mirror failed, the build would fail.

This change introduces:
- multiple registry mirrors instead of a single one
- fallback if an image can't be pulled from a registry

This is the same behavior as the docker daemon and will allow using a registry mirror such as `mirror.gcr.io` which is incomplete and doesn't have all the content that the default registry on docker.io has.

Note that there are no changes in the CLI flags, the `--registry-mirror` flag is still valid. But now it can be used multiple times to set up more than one registry mirror.

Co-authored-by: Tejal Desai <tejaldesai@google.com>
2020-12-08 16:16:25 -08:00
Lars Toenning 5fad5f360f
Document flags for tarball build only (#1503) 2020-12-08 16:13:53 -08:00
mickkael 275cc9a7e7
Add option customPlatform (#1500)
* Add option customPlatform

* fix formatting

* fix No newline at end of file
2020-12-08 16:11:18 -08:00
zhouhaibing089 83424ba1a1
doc: clarify the format of --registry-mirror (#1504)
In the context of Docker Hub ratelimit, registry mirror has been applied
more and more. It's very unfortunate that kaniko doesn't take the same
form as docker/containerd. The registry mirror shouldn't have scheme
like `https://` included. This is not explicitly described in the doc.
2020-12-08 16:04:19 -08:00
Tejal Desai bbd06c48bd
Add docs for GKE workload identity. (#1476)
* Add docs for GKE workload identity.

* Add instructions to use kaniko pod with Workload identity

* grammar fix
2020-11-02 23:21:40 -08:00
Ian Kerins 1240333657
Stop caching COPY layers (#1408)
Cached COPY layers are expensive in that they both need to be retrieved
over the network and occupy space in the layer cache.

They are unnecessary in that we already have all resources needed to
execute the COPY locally, and doing so is a trivial file-system
operation.  This is in contrast to RUN layers, which can do
arbitrary and unbounded work.

The end result is that cached COPY commands were more expensive when
cached, not less.  Remove them.

Resolves #1357
2020-09-30 17:18:50 -07:00