• Kubernetes Submit Queue's avatar
    Merge pull request #39341 from smarterclayton/termination_log · fce60637
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Improve TerminationMessagePath to be more flexible
    
    * Support `terminationMessagePolicy: fallbackToLogsOnError` which allows pod authors to get useful information from containers as per kubernetes/community#154
    * Set an upper bound on the size of the termination message path or log output to prevent callers from DoSing the master
    * Add tests for running as root, non-root, and for the new terminationMessagePolicy cases.
    
    I set the limit to 4096 bytes, but this may be too high for large pod containers.  Probably need to set an absolute bound, i.e. max message size allowed is 20k total, and we truncate if we're above that limit.
    
    Fixes #31839, #23569
    
    ```release-note
    A new field `terminationMessagePolicy` has been added to containers that allows a user to request `FallbackToLogsOnError`, which will read from the container's logs to populate the termination message if the user does not write to the termination message log file.  The termination message file is now properly readable for end users and has a maximum size (4k bytes) to prevent abuse.  Each pod may have up to 12k bytes of termination messages before the contents of each will be truncated.
    ```
    fce60637
Name
Last commit
Last update
..
async Loading commit data...
bandwidth Loading commit data...
chmod Loading commit data...
chown Loading commit data...
config Loading commit data...
configz Loading commit data...
crlf Loading commit data...
dbus Loading commit data...
ebtables Loading commit data...
env Loading commit data...
errors Loading commit data...
exec Loading commit data...
flag Loading commit data...
flock Loading commit data...
framer Loading commit data...
goroutinemap Loading commit data...
hash Loading commit data...
httpstream Loading commit data...
i18n Loading commit data...
initsystem Loading commit data...
interrupt Loading commit data...
intstr Loading commit data...
io Loading commit data...
iptables Loading commit data...
json Loading commit data...
keymutex Loading commit data...
labels Loading commit data...
limitwriter Loading commit data...
logs Loading commit data...
maps Loading commit data...
metrics Loading commit data...
mount Loading commit data...
net Loading commit data...
netsh Loading commit data...
node Loading commit data...
oom Loading commit data...
parsers Loading commit data...
procfs Loading commit data...
proxy Loading commit data...
rand Loading commit data...
resourcecontainer Loading commit data...
rlimit Loading commit data...
runtime Loading commit data...
selinux Loading commit data...
sets Loading commit data...
slice Loading commit data...
strategicpatch Loading commit data...
strings Loading commit data...
sysctl Loading commit data...
system Loading commit data...
tail Loading commit data...
taints Loading commit data...
term Loading commit data...
threading Loading commit data...
uuid Loading commit data...
validation Loading commit data...
version Loading commit data...
wait Loading commit data...
workqueue Loading commit data...
yaml Loading commit data...
BUILD Loading commit data...
doc.go Loading commit data...
template.go Loading commit data...
template_test.go Loading commit data...
trace.go Loading commit data...
trie.go Loading commit data...
umask.go Loading commit data...
umask_windows.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...