This is basically the same error you get when the ServiceAccountToken is not accessible in the container...
Which is weird, because it is accessible in the container!
/dev/nvme0n1p2 on /dev/termination-log type ext4 (rw,relatime)
/dev/nvme0n1p2 on /etc/dagu type ext4 (ro,relatime)
/dev/nvme0n1p2 on /etc/hosts type ext4 (rw,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (ro,nosuid,nodev,noexec,relatime)
csi-cephfs-node.1@fd902db0-38df-42f9-9f8a-13984e978c48.cephfs=/volumes/csi/csi-vol-a43d6495-3cf8-4161-aee1-1362c7e93672/b5c8b265-3c88-4e7a-8465-c834beb2fef5 on /data type ceph (rw,relatime,name=csi-cephfs-node.1,secret=<hidden>,acl,mon_addr=10.105.204.197:6789/10.102.124.85:6789/10.110.254.72:6789)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=666)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
overlay on / type overlay (rw,relatime,lowerdir=/var/lib/containers/storage/overlay/l/LMWL4SOWOPOTERLN4RKDFL3ZEO:/var/lib/containers/storage/overlay/l/6XARVL5MUEFZYVSFARZYVZ5O7D:/var/lib/containers/storage/overlay/l/G2W4NYK5LDNBS4OWMLOKRQNFZZ:/var/lib/containers/storage/overlay/l/IZJDEP7IJRALGNXQ4SA2ETGX4F,upperdir=/var/lib/containers/storage/overlay/cf88184480e428dcccf4f7bec6bf1934af43642207de3dd2955c8e0c52c06eda/diff,workdir=/var/lib/containers/storage/overlay/cf88184480e428dcccf4f7bec6bf1934af43642207de3dd2955c8e0c52c06eda/work,uuid=on,volatile,nouserxattr)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
proc on /proc/bus type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/fs type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/irq type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sys type proc (ro,nosuid,nodev,noexec,relatime)
proc on /proc/sysrq-trigger type proc (ro,nosuid,nodev,noexec,relatime)
shm on /dev/shm type tmpfs (rw,relatime,size=65536k,inode64)
sysfs on /sys type sysfs (ro,nosuid,nodev,noexec,relatime)
tmpfs on /dev type tmpfs (rw,nosuid,size=65536k,mode=755,inode64)
tmpfs on /etc/hostname type tmpfs (rw,relatime,size=3275676k,mode=755,inode64)
tmpfs on /etc/resolv.conf type tmpfs (rw,nosuid,nodev,noexec,relatime,size=3275676k,mode=755,inode64)
tmpfs on /proc/acpi type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /proc/asound type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /proc/scsi type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /run/.containerenv type tmpfs (rw,relatime,size=3275676k,mode=755,inode64)
tmpfs on /run/secrets/kubernetes.io/serviceaccount type tmpfs (ro,relatime,size=262144k,inode64,noswap)
tmpfs on /serviceaccount type tmpfs (ro,relatime,size=262144k,inode64,noswap)
tmpfs on /sys/devices/system/cpu/cpu0/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/system/cpu/cpu1/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/system/cpu/cpu2/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/system/cpu/cpu3/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/system/cpu/cpu4/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/system/cpu/cpu5/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/system/cpu/cpu6/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/system/cpu/cpu7/thermal_throttle type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/devices/virtual/powercap type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
tmpfs on /sys/firmware type tmpfs (ro,relatime,size=3275676k,mode=755,inode64)
udev on /proc/interrupts type devtmpfs (ro,relatime,size=16337712k,nr_inodes=4084428,mode=755,inode64)
udev on /proc/kcore type devtmpfs (ro,relatime,size=16337712k,nr_inodes=4084428,mode=755,inode64)
udev on /proc/keys type devtmpfs (ro,relatime,size=16337712k,nr_inodes=4084428,mode=755,inode64)
udev on /proc/latency_stats type devtmpfs (ro,relatime,size=16337712k,nr_inodes=4084428,mode=755,inode64)
udev on /proc/timer_list type devtmpfs (ro,relatime,size=16337712k,nr_inodes=4084428,mode=755,inode64)
... clearly shows that the token required by kubectl in the pod itself is available.
Dagu deployed using Dagu Helm chart, running in K8s (1.34)
Step works in Dagu version 2.3.1
Step failing in Dagu version >= 2.3.8 (earliest version post 2.3.1 I was able to run the step (due to issue that got fixed in 2.3.8))
Problem
I have a step which runs
kubectlcommands. This step runs fine in Dagu version 2.3.1Setup to be able to do this:
This all worked fine <= Dagu 2.3.1
Simple example definition
Helm chart changes
ServiceAccount
ClusterRole
ClusterRoleBinding
Worker deployment template
Dagu 2.3.1 output
Dagu >= 2.3.8 output
This is basically the same error you get when the ServiceAccountToken is not accessible in the container...
Which is weird, because it is accessible in the container!
Just a
kubectl exec -ti <dagu worker pod> -- mount | sortand showsand
kubectl exec -ti <dagu worker pod> -- ls -l /serviceaccount... clearly shows that the token required by
kubectlin the pod itself is available.On top of that, when I run
kubectl get podsfrom with the pod it works as expected.Summary
/serviceaccountmount invisible