Skip to content

Commit dff449e

Browse files
committed
Set umask 0022 when building
Some binaries now run as non-root (kube-scheduler). When umask is 0027, for example, the container image we build has the binary 0750, which is not executable by the non-root UID.
1 parent 68cbb35 commit dff449e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hack/lib/golang.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,10 @@ kube::golang::setup_env() {
523523

524524
# This seems to matter to some tools
525525
export GO15VENDOREXPERIMENT=1
526+
527+
# This is for sanity. Without it, user umasks leak through into release
528+
# artifacts.
529+
umask 0022
526530
}
527531

528532
# This will take binaries from $GOPATH/bin and copy them to the appropriate

0 commit comments

Comments
 (0)