/var/run/secrets/kubernetes.io/serviceaccount unexpected in build container #1750
Labels
area/behavior
all bugs related to kaniko behavior like running in as root
area/filesystems
For all bugs related to kaniko container filesystems (mounting issues etc)
categorized
differs-from-docker
issue/files-mounted-unexpectedly
issue/mount
issue/sensitive-data
issue/var-dir-mounted
kind/bug
Something isn't working
priority/p0
Highest priority. Break user flow. We are actively looking at delivering it.
priority/p1
Basic need feature compatibility with docker build. we should be working on this next.
works-with-docker
Actual behavior
Kubernetes:
/var/run/secrets/kubernetes.io/serviceaccount
is unexpectedly mounted in build container.Expected behavior
Dockerfile build is isolated from host.
Only a few very specific system mounts are provided:
/dev
,/sys
,/proc
,/etc/{hostname,resolv.conf,hosts}
Arbitrary
/var/run/*
mount points do not seem to belong to this category.k8s secrets (
/var/run/secrets/kubernetes.io/*
) may be needed in a k8s pod, and this can be configured usingautomountServiceAccountToken
.But whether or not k8s pod needs/uses this feature, files in
/var/run
shouldn't be automatically mounted into the build container.It may be useful to do so, but only on-demand (explicit configuration option), never by default, and especially not if there is no opt-out available.
To Reproduce
Additional Information
Kaniko Image (fully qualified with digest):
gcr.io/kaniko-project/executor@sha256:fcccd2ab9f3892e33fc7f2e950c8e4fc665e7a4c66f6a9d70b300d7a2103592f
There is more meaningful use case where this is real life problem:
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: