Commit Graph

116 Commits

Author SHA1 Message Date
dependabot[bot] 232c77de5d
chore(deps): bump golang from 1.20 to 1.21 in /deploy (#2682)
Bumps golang from 1.20 to 1.21.

---
updated-dependencies:
- dependency-name: golang
  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>
2023-08-13 20:47:48 -07:00
Liam Newman 5cbc06369e
fix: install tools using go.mod for versioning (#2562)
* fix: install tools using go.mod for versioning

* Add helpful instructions for tool updates.

* Add comment

* Add boilerplate

* Update go.mod

* Gofmt feedback
2023-06-14 10:18:13 -07:00
Ferran Vidal 507fe00b42
Use a multistage image to remove all redundancies on Dockerfiles (#2547)
As all Kaniko variants should be upgraded at once, all following the same specifications, it is easier for maintainers to bump Go or other image dependencies in a single place.

On top of that, there were an issue building `ppc64le` images because of a semantic error on the if condition that checks the arch used.

Signed-off-by: Ferran Vidal <ferran.vidal.p@gmail.com>
2023-06-05 09:20:40 -07:00
Ferran Vidal f4dae004ef
Download docker-credential-gcr from release artifacts (#2540)
As described in #2539, using `go install` with a pinned hash version it installs `1.5.1` in all cases.
This seems to be an issue on the upstream project https://github.com/GoogleCloudPlatform/docker-credential-gcr and how go proxy deals with versions.

As a temporary solution, we download the compiled version from the release artifacts.

Closes #2539

Signed-off-by: Ferran Vidal <ferran.vidal.p@gmail.com>
2023-06-02 09:47:33 -07:00
Aaron Prindle f42831057b
chore(deps): update docker-credential-* binaries in kaniko images (#2531) 2023-05-30 10:24:15 -07:00
dependabot[bot] 197fbdd705
chore(deps): bump golang from 1.19 to 1.20 in /deploy (#2388)
Bumps golang from 1.19 to 1.20.

---
updated-dependencies:
- dependency-name: golang
  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>
2023-05-18 15:59:59 -07:00
Viacheslav Artamonov 86a73c5439
Update ACR credential helper to enable Azure Workload Identity (#2431)
* Bump the version of ACR credential helper to enable Azure Workload Identity

* Bump ACR credential helper version in go.mod

* remove garbage

* Update vendor
2023-03-22 12:25:54 -04:00
dependabot[bot] fe2413e6e3
chore(deps): bump golang from 1.17 to 1.19 in /deploy (#2328) 2022-12-23 11:48:03 -05:00
Lukas 8710ce3311
fix(Dockerfile): use temporary busybox mount to create /kaniko directory (#2155)
* ci(minikube): always install latest binary and run as root

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: remove docker unmask because minikube handles this

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* debug: view run folder and user ids

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* debug: log minikube if start fails

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* debug: start cri-docker before starting minikube cluster

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* Revert "debug: start cri-docker before starting minikube cluster"

This reverts commit 8923941358.

* debug: include verbose minikube output

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(minikube): cri-dockerd move command

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(minikube): copy minikube profile from root to user

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(minikube): change dirs to $HOME directory in config.json

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(minikube): enable registry on start

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: run as non root

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* cleanup

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* docs(minikube-script): update

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* deploy: create kaniko.tar

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* deploy: create kaniko folder in dockerfiles with 777 permissions via mount

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(Dockerfile): remove ARG

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* docs(Dockerfile): add comment to kaniko dir creation

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(Dockerfile): mount whole busybox image

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix(Dockerfile): use musl busybox

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(Dockerfile): use musl busybox in debug image

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* typo

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>
2022-07-08 09:34:31 -04:00
claudex 3fd30ead0c
Fix the /kaniko directory permissions in container (#2009)
* Fix the /kaniko directory permissions in container

Create /kaniko directory with world permission to allow the creation of
sub directories by any user when the executor is run as non root. This
can lower the security but shouldn't have any impact in a container.

The tar unpack is the only way I found to have a directory with specific
permission as the image is created from "scratch" which doesn't have any
tool to change the permission otherwise.

Fixes #1363

* Avoid blackbox tar file creation

Use the Makefile to create the tar file use to create kaniko directory
in scratch container. This avoid having a "blackbox" binary file with
the empty directory.
2022-06-27 16:45:52 -04:00
Konstantin Demin 18f745de5b
CA certificates tasks in kaniko images (#2142)
* deploy: avoid duplicate certificates in images

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>

* deploy: use current stable Debian release image

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
2022-06-21 14:28:11 -04:00
Jason Hall bde904349e
Remove deploy/cloudbuild-*.yaml files (#1907) 2022-01-31 18:35:25 -05:00
Jason Hall d587122a9d
Run GitHub Actions on pushes and PRs to main, not master (#1883)
* Run GitHub Actions on pushes and PRs to main, not master

* fix go install ecr-login, bump to latest v0.6.0

* master -> main in some integration tests

* skip no-ref integration test
2022-01-14 14:54:12 -05:00
Jason Hall 0f986a423f
Bump AWS ecr-login cred helper to v0.5.0 (#1880) 2022-01-14 10:07:14 -06:00
Kun Lu ccaa38d31f
Add s390x support to docker images (#1749)
* Add s390x support to docker images

1. add s390x support to docker images `executor`, `executor(slim)`,
   `executor(debug)` and `warmer`. Fixes #1462 and #1665.

2. Address the building issue of dependency `docker-credential-gcr`
   in Dockerfiles. This issue was introduced when recent commits
   in `docker-credential-gcr` removed the Makefile.

Signed-off-by: Kun-Lu <kun.lu@ibm.com>

* Add s390x support to all images except debug image

* Add s390x support to images.yaml

* Fix ld64.so.1 not found issue on s390x

* Add a comment for copying /lib from busybox container on s390x
2022-01-06 11:19:26 -05:00
ankitm123 e62c80ed19
fix: change the name of the acr cred helper (#1865)
Signed-off-by: ankitm123 <ankitmohapatra123@gmail.com>
2021-12-29 08:28:32 -05:00
Jason Hall b1b6962726
Share the Go build cache when building in Dockerfiles (#1853)
On my machine this makes image rebuilds go from ~5m to 1.5s.

This also required setting DOCKER_BUILDKIT=1 in integration test image
builds.

I also took the opportunity to bump the Go version used in those tests
to Go 1.17 to match the image build processes, and tidied up the
workflow files a bit too (renaming for consistency, typos, whitespace,
etc.)
2021-12-22 12:43:12 -05:00
Jason Hall f694212385
Use golang:1.17 and build from reproducible source (#1848)
* cleanup: Correctly use buildx TARGETARCH

* undo changes to Go version

* Use golang:1.17 and build from reproducible source

This change updates the Go version used to build kaniko and credential
helpers to Go 1.17, which uses Go modules by default. This means that we
can build outside of $GOPATH, from source fetched from the Go module
proxy.

This change also simplfies our builds of credential helpers to simply
`go install` them at a pinned version, for reproducibility and
simplicity.

This also changes `make images` and `make push` to build and push the
slim executor image as well.
2021-12-20 22:01:37 -05:00
Tejal Desai 3b42fe45ea
chore: add release workflow on pr (#1785)
* chore: add release workflow on pr

* remove linux/s390x

* use keys

* set up platforms

* cancel

* update keys

* add secrets to env

* All platforms added for kaniko

Co-authored-by: Kun-Lu <kun.lu@ibm.com>

* echi

* add mt 1300, remove push

* Remove

* final change

* break executor and executor-slim

Co-authored-by: Kun-Lu <kun.lu@ibm.com>
2021-10-19 18:58:02 -07:00
Tejal Desai 1c705f3541
bring them back (#1783) 2021-10-19 13:01:40 -07:00
Tejal Desai 4e8aae7c06
Revert ppce4 and other unintentional changes (#1781)
* Revert "fix dockefiles for deploy"

This reverts commit 63613adb82.

* revert unintentional test changes
2021-10-19 12:40:14 -07:00
Tejal Desai cf4822c31c
Run docker_credentials_gcr in warmer (#1780)
* run docker_credentials_gcr in warmer

* fix tests

* fix dockerfiles

* fix boilerplate

* mend

* fix

* another lint
2021-10-19 12:25:42 -07:00
Tejal Desai 21bb75717c
fix dockefiles for deploy gcr binsry (#1776) 2021-10-19 02:16:40 -07:00
Tejal Desai 63788dba63
fix dockefiles for deploy (#1774) 2021-10-19 01:50:44 -07:00
Tejal Desai a67ba0af65
fix dockefiles for deploy (#1773) 2021-10-19 01:30:35 -07:00
Tejal Desai a4daeb2cd7
chore: fix release pipeline (#1772) 2021-10-19 01:15:50 -07:00
Tejal Desai badd66506d
Add s390x support to docker images (#1769)
1. add s390x support to docker images `executor`, `executor(slim)`,
   `executor(debug)` and `warmer`. Fixes #1462 and #1665.

2. Address the building issue of dependency `docker-credential-gcr`
   in Dockerfiles. This issue was introduced when recent commits
   in `docker-credential-gcr` removed the Makefile.

Signed-off-by: Kun-Lu <kun.lu@ibm.com>

Co-authored-by: Kun-Lu <kun.lu@ibm.com>
2021-10-19 00:01:47 -07:00
Anbraten d82d7368fb
Make /bin/sh available to debug image (#1748) 2021-10-18 11:45:31 -07:00
priyawadhwa 03a9847ab5
Fix executor Dockerfile, which wasn't building (#1741)
The Makefile from the `docker-credential-gcr` repo was removed, so all builds were failing. This PR removes the `make` command and pins `docker-credential-gcr` to a specific commit so that this doesn't happen again.
2021-10-18 11:44:05 -07:00
Sascha Schwarze 2d4db8e0ec
Use up-to-date ca-certificates during build (#1580) 2021-02-22 21:25:00 -08:00
Tejal Desai fc93da2f26
Fix release pipeline (#1561)
* fix debug cloud build

* fix cloudbuild release

* add workflow

* fix release

* use push action

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* Trigger Build

* add

* add parallel steps

* add parallel steps

* fix pathc

* fix dockerfile

* fix dockerfile

* add executor

* deploy

* test
2021-02-08 09:59:16 -08:00
Tejal Desai b540dd0df2
fix debug cloud build (#1560) 2021-01-28 11:19:35 -08:00
Tejal Desai 9cd3a65900
fix busybox (#1557) 2021-01-28 10:45:04 -08:00
Tejal Desai ffd35dbe12
Mutli-arch support (#1531)
* initial commit

* remove bazel jobs

* fix arch

* more fixes after testing and code review comments

* fix build platform

* add individual cloudbuild.yaml as its taking 45 mins for a cloud build trigger

* add buildx plugin

* add more debugging

* update busybox version to fix CVE-2018-1000500

* fix

* lint + more debug

* fix

* fix

* fix

* remove images from cloudbiuld

* move CI job back to docker

* one more fix

* lets see

* bring it back

* move CI job back to docker

* remove aerg from top

* live restart config

* remove live restore as minikube setup failed

* add --force-systemd

* add --force-systemd and docker driver none

* change the --run flag

* docker info and some logs removed

* fix docker command

* upgrade version for buildx to 0.5.1

* remove docker service from travis.yml and add systemd cgroup config

* move the docker config up

* move them back to docker build

* fix

* fix all dockerfiles

* fix warmer

* fix

* rm bazel jobs

* add more logs

* fix debug

Co-authored-by: ankitm123 <ankitmohapatra123@gmail.com>
2021-01-25 17:49:19 -08:00
ankitm123 c4e07e9185
fix: extract file as same user for warmer docker image (#1538)
Signed-off-by: ankitm123 <ankitmohapatra123@gmail.com>
2021-01-03 10:07:28 -08:00
ankitm123 4373ede9fa
fix: update busybox version to fix CVE-2018-1000500 (#1532)
Signed-off-by: ankitm123 <ankitmohapatra123@gmail.com>
2020-12-22 21:46:43 -08:00
bahetiamit 6cffb679aa
Adding multiarch image support (#1474) 2020-12-21 10:11:13 -08:00
Yulia Gaponenko 49e7d8a8cd
Add s390x kaniko build to multi-arch list (#1475)
This is extenion of current code to build s390x version of kaniko
executor image and add it to multi-arch manifest

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
2020-11-04 14:03:16 -08:00
Chris Mellard 1d12985648
feat: Added in docker cred helper for Azure Container Registry sourcing auth tokens directly from environment to debug image (#1458) 2020-10-28 14:01:59 -07:00
Sladyn be3f9c23a6
Fix docker build tag (#1460)
* Fix docker build tag

* Retain previous command
2020-10-22 14:42:14 -07:00
Chris Mellard b106aa9a1b
feat: Added in docker cred helper for Azure Container Registry sourcing auth tokens directly from environment (#1453) 2020-10-16 13:51:13 -07:00
Matt Moore a310cc6d1c
Add multi-arch image via Bazel (#1452)
* Add multi-arch image via Bazel

* Drop the commented  tags

* Move tests to //integration
2020-10-09 13:02:09 -07:00
Tejal Desai 0c386e3f4a
fix docker-credential-gcr helper being called for multiple registries (#1439)
* fix multiple registryies docker-credential-gcr

* Update pkg/executor/push.go
2020-09-30 16:43:16 -07:00
Pierre-Louis Bonicoli 80a4a59a27
executor image: fix USER environment variable 2020-07-29 16:38:32 +02:00
Alex Szakaly 97e5042fbb
Fix docker-credential-gcr owner and group id
During image build we extract archives as root which is
capable to preserve owner and group.

With option `--no-same-owner` we drop all the user and
group information, defaults to current user (root).

To avoid future issues: add option above to all tar
execution.

Fixes #1303

Signed-off-by: Alex Szakaly <alex.szakaly@gmail.com>
2020-06-09 09:58:22 +02:00
Tejal Desai 9ec838bd9b
copy all files from busybox image 2020-06-04 12:53:40 -07:00
Tejal Desai 2214da37e2
Update Dockerfile_debug 2020-06-04 12:11:15 -07:00
Tejal Desai c0f699d3f1
removed ununsed stage 1 2020-06-04 11:59:41 -07:00
Tejal Desai 813fbeb634
Merge branch 'master' into useAmd64 2020-06-04 11:55:39 -07:00
Tejal Desai 994a412d0b some more renames 2020-06-02 16:08:46 -07:00