Commit 6fd6440
fix(operator,runner): mount runner token as volume for dynamic refresh
Long-running sessions were failing due to ServiceAccount token expiration
because tokens were injected as environment variables at pod startup and
never refreshed, even though the operator was refreshing the Secret.
Changes:
- Operator: Mount runner token Secret as volume instead of env var
- Operator: Inject BOT_TOKEN_PATH env var pointing to mounted token file
- Runner: Read token from BOT_TOKEN_PATH file on each connection/reconnection
- Runner: Fall back to BOT_TOKEN env var for backward compatibility
- Runner: Improved error messages for token authentication issues
The operator already refreshes tokens every 45 minutes via ensureFreshRunnerToken().
Now the runner can read the refreshed token from the mounted Secret volume without
requiring pod restart.
Fixes #445
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 5553056 commit 6fd6440
File tree
2 files changed
+46
-22
lines changed- components
- operator/internal/handlers
- runners/runner-shell/runner_shell/core
2 files changed
+46
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
934 | 945 | | |
935 | 946 | | |
936 | 947 | | |
| |||
979 | 990 | | |
980 | 991 | | |
981 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
982 | 1001 | | |
983 | 1002 | | |
984 | 1003 | | |
| |||
1037 | 1056 | | |
1038 | 1057 | | |
1039 | 1058 | | |
| 1059 | + | |
| 1060 | + | |
1040 | 1061 | | |
1041 | 1062 | | |
1042 | 1063 | | |
| |||
1153 | 1174 | | |
1154 | 1175 | | |
1155 | 1176 | | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
1170 | 1180 | | |
1171 | | - | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
| 1181 | + | |
| 1182 | + | |
1176 | 1183 | | |
1177 | 1184 | | |
1178 | 1185 | | |
| |||
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
| 83 | + | |
72 | 84 | | |
73 | | - | |
| 85 | + | |
| 86 | + | |
74 | 87 | | |
75 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
76 | 93 | | |
77 | 94 | | |
78 | 95 | | |
| |||
0 commit comments