daemonset.yaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. apiVersion: apps/v1
  2. kind: DaemonSet
  3. metadata:
  4. name: workstation
  5. spec:
  6. updateStrategy:
  7. type: OnDelete
  8. selector:
  9. matchLabels:
  10. app.kubernetes.io/name: workstation
  11. app.kubernetes.io/part-of: workstation
  12. template:
  13. metadata:
  14. labels:
  15. app.kubernetes.io/name: workstation
  16. app.kubernetes.io/part-of: workstation
  17. spec:
  18. automountServiceAccountToken: false
  19. terminationGracePeriodSeconds: 600
  20. initContainers:
  21. - name: volume-mount-hack
  22. image: busybox
  23. imagePullPolicy: IfNotPresent
  24. command:
  25. - sh
  26. - -c
  27. - |
  28. set -o nounset -o errexit -o pipefail
  29. chown 1000:998 /home/oleg
  30. chmod 0755 /home/oleg
  31. mkdir /home/oleg/.cache
  32. chown 1000:998 /home/oleg/.cache
  33. mkdir /home/oleg/.config
  34. chown 1000:998 /home/oleg/.config
  35. mkdir /home/oleg/.local
  36. chown 1000:998 /home/oleg/.local
  37. mkdir /home/oleg/.local/var
  38. chown 1000:998 /home/oleg/.local/var
  39. mkdir /home/oleg/.local/var/log
  40. chown 1000:998 /home/oleg/.local/var/log
  41. mkdir /home/oleg/.local/share
  42. chown 1000:998 /home/oleg/.local/share
  43. mkdir /home/oleg/.ssh
  44. chown 1000:998 /home/oleg/.ssh
  45. mkdir /mnt/nixos/home/oleg
  46. chown 1000:998 /mnt/nixos/home/oleg
  47. mkdir -p /mnt/nixos/home/oleg/.mozilla
  48. chown 1000:998 /mnt/nixos/home/oleg/.mozilla
  49. mkdir -p /mnt/nixos/home/oleg/.config
  50. chown 1000:998 /mnt/nixos/home/oleg/.config
  51. mkdir /mnt/nixos/home/oleg/.local
  52. chown 1000:998 /mnt/nixos/home/oleg/.local
  53. mkdir /mnt/nixos/home/oleg/.local/share
  54. chown 1000:998 /mnt/nixos/home/oleg/.local/share
  55. mkdir /mnt/nixos/home/oleg/.ssh
  56. chown 1000:998 /mnt/nixos/home/oleg/.ssh
  57. volumeMounts:
  58. - mountPath: /home/oleg
  59. name: container-home-oleg
  60. - mountPath: /mnt/nixos/home
  61. name: nixos-home
  62. - name: clean-gnupg
  63. image: busybox
  64. imagePullPolicy: IfNotPresent
  65. command:
  66. - sh
  67. - -c
  68. - |
  69. set -o nounset -o errexit -o pipefail
  70. rm -f /home/oleg/.gnupg/gpg-agent.conf /home/oleg/.gnupg/gpg.conf
  71. volumeMounts:
  72. - name: home-oleg-dot-gnupg
  73. mountPath: /home/oleg/.gnupg
  74. containers:
  75. - image: harbor.home.wugi.info/library/guix-image-workstation:latest
  76. name: guix
  77. ports:
  78. - containerPort: 5353
  79. name: avahi
  80. protocol: UDP
  81. - containerPort: 16400
  82. name: scream
  83. protocol: UDP
  84. securityContext:
  85. capabilities:
  86. add:
  87. # - CHOWN
  88. # - DAC_OVERRIDE
  89. # - DAC_READ_SEARCH
  90. # - FOWNER
  91. # - FSETID
  92. # - KILL
  93. # - SETGID
  94. # - SETUID
  95. # - SETPCAP
  96. # - LINUX_IMMUTABLE
  97. # - NET_BIND_SERVICE
  98. # - NET_BROADCAST
  99. # - NET_ADMIN
  100. # - NET_RAW
  101. # - IPC_LOCK
  102. # - IPC_OWNER
  103. # - SYS_MODULE
  104. # - SYS_RAWIO
  105. # - SYS_CHROOT
  106. # - SYS_PTRACE
  107. # - SYS_PACCT
  108. - SYS_ADMIN
  109. # - SYS_BOOT
  110. # - SYS_NICE
  111. # - SYS_RESOURCE
  112. # - SYS_TIME
  113. # - SYS_TTY_CONFIG
  114. # - MKNOD
  115. # - LEASE
  116. # - AUDIT_WRITE
  117. # - AUDIT_CONTROL
  118. # - SETFCAP
  119. # - MAC_OVERRIDE
  120. # - MAC_ADMIN
  121. # - SYSLOG
  122. # - WAKE_ALARM
  123. # - BLOCK_SUSPEND
  124. # - AUDIT_READ
  125. # - PERFMON
  126. # - BPF
  127. # - CHECKPOINT_RESTORE
  128. privileged: true
  129. # allowPrivilegeEscalation: true
  130. tty: true
  131. volumeMounts:
  132. - mountPath: /run
  133. name: guix-run
  134. mountPropagation: Bidirectional
  135. - mountPath: /dev/dri
  136. name: dev-dri
  137. - mountPath: /dev/input
  138. name: dev-input
  139. - mountPath: /dev/tty0
  140. name: dev-tty2
  141. - mountPath: /dev/tty2
  142. name: dev-tty2
  143. - mountPath: /dev/fuse
  144. name: dev-fuse
  145. - mountPath: /etc/nsswitch.conf
  146. name: nsswitch
  147. - mountPath: /etc/services
  148. name: services
  149. - mountPath: /dev/shm
  150. name: guix-shm
  151. - mountPath: /tmp
  152. name: guix-tmp
  153. - mountPath: /mnt/guix/var/run/shepherd/socket
  154. name: var-run-shepherd-socket
  155. - mountPath: /home/oleg
  156. name: container-home-oleg
  157. - name: home-oleg-dot-cache-ihs
  158. mountPath: /home/oleg/.cache/ihs
  159. - name: home-oleg-dot-config-obs-studio
  160. mountPath: /home/oleg/.config/obs-studio
  161. - name: home-oleg-dot-config-remmina
  162. mountPath: /home/oleg/.config/remmina
  163. - name: home-oleg-dot-config-sway
  164. mountPath: /home/oleg/.config/sway
  165. - name: home-oleg-dot-local-share-remmina
  166. mountPath: /home/oleg/.local/share/remmina
  167. - name: home-oleg-dot-local-share-telegram
  168. mountPath: /home/oleg/.local/share/TelegramDesktop
  169. - name: home-oleg-dot-password-store
  170. mountPath: /home/oleg/.password-store
  171. - name: home-oleg-dot-gnupg
  172. mountPath: /home/oleg/.gnupg
  173. - name: home-oleg-ssh-private-key
  174. mountPath: /home/oleg/.ssh/id_ed25519
  175. - name: home-oleg-ssh-public-key
  176. mountPath: /home/oleg/.ssh/id_ed25519.pub
  177. - name: home-oleg-ssh-majordomo-gitlab-private-key
  178. mountPath: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass
  179. - name: home-oleg-ssh-majordomo-gitlab-public-key
  180. mountPath: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass.pub
  181. - name: home-oleg-ssh-known-hosts
  182. mountPath: /home/oleg/.ssh/known_hosts
  183. - name: home-oleg-bash-history
  184. mountPath: /home/oleg/.bash_history
  185. - name: root-bash-history
  186. mountPath: /root/.bash_history
  187. - name: home-oleg-src
  188. mountPath: /home/oleg/src
  189. - name: home-oleg-local-share-chezmoi
  190. mountPath: /home/oleg/.local/share/chezmoi
  191. - name: srv
  192. mountPath: /srv
  193. - name: home-oleg-config-qbittorrent
  194. mountPath: /home/oleg/.config/qBittorrent
  195. - name: home-oleg-dot-local-share-qbittorrent
  196. mountPath: /home/oleg/.local/share/qBittorrent
  197. - name: qbittorrent-incomplete
  198. mountPath: /mnt/qbittorrent-incomplete
  199. - name: guix-var-log
  200. mountPath: /var/log
  201. - name: guix-home-oleg-local-var-log
  202. mountPath: /home/oleg/.local/var/log
  203. lifecycle:
  204. preStop:
  205. exec:
  206. command:
  207. - /bin/sh
  208. - -c
  209. - |
  210. if /run/current-system/profile/sbin/halt
  211. then
  212. :
  213. else
  214. exit 0
  215. fi
  216. - name: nixos
  217. image: harbor.home.wugi.info/library/nixos-systemd:latest
  218. command:
  219. - /entrypoint.sh
  220. env:
  221. - name: container
  222. value: docker
  223. ports:
  224. - containerPort: 5900
  225. name: vnc
  226. protocol: TCP
  227. securityContext:
  228. capabilities:
  229. add:
  230. - SETUID
  231. - BLOCK_SUSPEND
  232. - NET_ADMIN
  233. - NET_BIND_SERVICE
  234. - NET_RAW
  235. - SYS_ADMIN
  236. - SYS_CHROOT
  237. - SYS_NICE
  238. - SYS_PTRACE
  239. - SYS_RESOURCE
  240. - SYS_TIME
  241. privileged: true
  242. lifecycle:
  243. preStop:
  244. exec:
  245. command:
  246. - /bin/sh
  247. - -c
  248. - |
  249. if /run/current-system/sw/bin/systemctl poweroff
  250. then
  251. :
  252. else
  253. exit 0
  254. fi
  255. tty: true
  256. volumeMounts:
  257. - mountPath: /dev/dri
  258. name: dev-dri
  259. - mountPath: /dev/tty0
  260. name: dev-tty9
  261. - mountPath: /dev/tty9
  262. name: dev-tty9
  263. - mountPath: /run
  264. name: nixos-run
  265. - mountPath: /mnt/guix/tmp
  266. name: guix-tmp
  267. - mountPath: /mnt/guix/run
  268. name: guix-run
  269. mountPropagation: HostToContainer
  270. # - name: mnt-web-ext4
  271. # mountPath: /home
  272. - name: mnt-web-btrfs
  273. mountPath: /home
  274. # - mountPath: /home
  275. # name: nixos-home
  276. - mountPath: /home/oleg/.mozilla/firefox
  277. name: home-oleg-mozilla-firefox
  278. - name: home-oleg-bash-history
  279. mountPath: /home/oleg/.bash_history
  280. - name: home-oleg-dot-config-google-chrome
  281. mountPath: /home/oleg/.config/google-chrome
  282. - name: root-bash-history
  283. mountPath: /root/.bash_history
  284. - name: home-oleg-config-wayvnc
  285. mountPath: /home/oleg/.config/wayvnc
  286. - name: home-oleg-dot-local-share-chatterino
  287. mountPath: /home/oleg/.local/share/chatterino
  288. - name: nixos-var-log
  289. mountPath: /var/log
  290. - name: home-oleg-ssh-majordomo-gitlab-private-key
  291. mountPath: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass
  292. - name: home-oleg-ssh-majordomo-gitlab-public-key
  293. mountPath: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass.pub
  294. - name: home-oleg-src
  295. mountPath: /home/oleg/src
  296. - name: home-oleg-ssh-known-hosts
  297. mountPath: /home/oleg/.ssh/known_hosts
  298. - name: home-oleg-robo3t
  299. mountPath: /home/oleg/.3T
  300. - name: nixos-var-lib-docker
  301. mountPath: /var/lib/docker
  302. - image: harbor.home.wugi.info/library/archlinux-systemd:latest
  303. name: archlinux
  304. env:
  305. - name: container
  306. value: docker
  307. securityContext:
  308. capabilities:
  309. add:
  310. - NET_ADMIN
  311. - NET_BIND_SERVICE
  312. - NET_RAW
  313. - SYS_ADMIN
  314. - SYS_NICE
  315. - SYS_TIME
  316. privileged: true
  317. tty: true
  318. lifecycle:
  319. preStop:
  320. exec:
  321. command:
  322. - /bin/sh
  323. - -c
  324. - |
  325. if /bin/systemctl poweroff
  326. then
  327. :
  328. else
  329. exit 0
  330. fi
  331. volumeMounts:
  332. - mountPath: /run
  333. name: archlinux-run
  334. - mountPath: /tmp
  335. name: archlinux-tmp
  336. - mountPath: /dev/dri
  337. name: dev-dri
  338. - mountPath: /mnt/guix/run
  339. name: guix-run
  340. mountPropagation: HostToContainer
  341. - mountPath: /mnt/guix/tmp
  342. name: guix-tmp
  343. - name: home-oleg-bash-history
  344. mountPath: /home/oleg/.bash_history
  345. - name: root-bash-history
  346. mountPath: /root/.bash_history
  347. - name: home-oleg-config-socialstream
  348. mountPath: /home/oleg/.config/SocialStream
  349. - name: archlinux-var-log
  350. mountPath: /var/log
  351. - name: home-oleg-src
  352. mountPath: /home/oleg/src
  353. - image: harbor.home.wugi.info/library/kali-rolling:latest
  354. name: kali-rolling
  355. env:
  356. - name: container
  357. value: docker
  358. securityContext:
  359. capabilities:
  360. add:
  361. - NET_ADMIN
  362. - NET_BIND_SERVICE
  363. - NET_RAW
  364. - SYS_ADMIN
  365. - SYS_NICE
  366. - SYS_TIME
  367. privileged: true
  368. tty: true
  369. lifecycle:
  370. preStop:
  371. exec:
  372. command:
  373. - /bin/sh
  374. - -c
  375. - |
  376. if /bin/systemctl poweroff
  377. then
  378. :
  379. else
  380. exit 0
  381. fi
  382. volumeMounts:
  383. - mountPath: /run
  384. name: kali-rolling-run
  385. - mountPath: /tmp
  386. name: kali-rolling-tmp
  387. - mountPath: /dev/dri
  388. name: dev-dri
  389. - mountPath: /mnt/guix/run
  390. name: guix-run
  391. mountPropagation: HostToContainer
  392. - mountPath: /mnt/guix/tmp
  393. name: guix-tmp
  394. - name: home-oleg-bash-history
  395. mountPath: /home/oleg/.bash_history
  396. - name: root-bash-history
  397. mountPath: /root/.bash_history
  398. - name: kali-rolling-var-log
  399. mountPath: /var/log
  400. - image: harbor.home.wugi.info/library/gentoo-systemd:latest
  401. name: gentoo
  402. env:
  403. - name: container
  404. value: docker
  405. securityContext:
  406. capabilities:
  407. add:
  408. - NET_ADMIN
  409. - NET_BIND_SERVICE
  410. - NET_RAW
  411. - SYS_ADMIN
  412. - SYS_NICE
  413. - SYS_TIME
  414. privileged: true
  415. tty: true
  416. lifecycle:
  417. preStop:
  418. exec:
  419. command:
  420. - /bin/sh
  421. - -c
  422. - |
  423. if /bin/systemctl poweroff
  424. then
  425. :
  426. else
  427. exit 0
  428. fi
  429. volumeMounts:
  430. - mountPath: /run
  431. name: gentoo-run
  432. - mountPath: /tmp
  433. name: gentoo-tmp
  434. - mountPath: /dev/dri
  435. name: dev-dri
  436. - mountPath: /mnt/guix/run
  437. name: guix-run
  438. mountPropagation: HostToContainer
  439. - mountPath: /mnt/guix/tmp
  440. name: guix-tmp
  441. - name: home-oleg-bash-history
  442. mountPath: /home/oleg/.bash_history
  443. - name: root-bash-history
  444. mountPath: /root/.bash_history
  445. - name: gentoo-var-log
  446. mountPath: /var/log
  447. volumes:
  448. - name: dev-dri
  449. hostPath:
  450. path: /dev/dri
  451. type: Directory
  452. - name: dev-input
  453. hostPath:
  454. path: /dev/input
  455. type: Directory
  456. - name: dev-tty2
  457. hostPath:
  458. path: /dev/tty2
  459. type: CharDevice
  460. - name: dev-tty9
  461. hostPath:
  462. path: /dev/tty9
  463. type: CharDevice
  464. - name: dev-fuse
  465. hostPath:
  466. path: /dev/fuse
  467. type: CharDevice
  468. - name: nsswitch
  469. hostPath:
  470. path: /etc/nsswitch.conf
  471. type: File
  472. - name: services
  473. hostPath:
  474. path: /etc/services
  475. type: File
  476. - name: guix-shm
  477. emptyDir:
  478. medium: Memory
  479. sizeLimit: 1Gi
  480. - hostPath:
  481. path: /home/oleg
  482. type: Directory
  483. name: home-oleg
  484. - emptyDir:
  485. medium: Memory
  486. sizeLimit: 4G
  487. name: guix-tmp
  488. - emptyDir:
  489. medium: Memory
  490. sizeLimit: 4G
  491. name: archlinux-tmp
  492. - emptyDir:
  493. medium: Memory
  494. sizeLimit: 512M
  495. name: guix-run
  496. - emptyDir:
  497. medium: Memory
  498. sizeLimit: 512M
  499. name: nixos-run
  500. - emptyDir:
  501. name: nixos-home
  502. - emptyDir:
  503. medium: Memory
  504. sizeLimit: 512M
  505. name: archlinux-run
  506. - name: var-run-shepherd-socket
  507. hostPath:
  508. path: /var/run/shepherd/socket
  509. type: Socket
  510. - emptyDir:
  511. sizeLimit: 4G
  512. name: container-home-oleg
  513. - name: home-oleg-dot-cache-ihs
  514. hostPath:
  515. path: /home/oleg/.cache/ihs
  516. type: Directory
  517. - name: home-oleg-dot-config-google-chrome
  518. hostPath:
  519. path: /home/oleg/.config/google-chrome
  520. type: Directory
  521. - name: home-oleg-dot-config-obs-studio
  522. hostPath:
  523. path: /home/oleg/.config/obs-studio-4k
  524. type: Directory
  525. - name: home-oleg-dot-config-remmina
  526. hostPath:
  527. path: /home/oleg/.config/remmina
  528. type: Directory
  529. - name: home-oleg-dot-config-sway
  530. hostPath:
  531. path: /home/oleg/.config/sway
  532. type: Directory
  533. - name: home-oleg-dot-local-share-remmina
  534. hostPath:
  535. path: /home/oleg/.local/share/remmina
  536. type: Directory
  537. - name: home-oleg-dot-local-share-telegram
  538. hostPath:
  539. path: /home/oleg/.local/share/TelegramDesktop
  540. type: Directory
  541. - name: home-oleg-dot-local-share-chatterino
  542. hostPath:
  543. path: /home/oleg/.local/share/chatterino
  544. type: Directory
  545. - name: home-oleg-dot-mozilla
  546. hostPath:
  547. path: /home/oleg/.mozilla
  548. type: Directory
  549. - name: home-oleg-dot-password-store
  550. hostPath:
  551. path: /home/oleg/.password-store
  552. type: Directory
  553. - name: home-oleg-dot-gnupg
  554. hostPath:
  555. path: /home/oleg/.gnupg
  556. type: Directory
  557. - name: home-oleg-robo3t
  558. hostPath:
  559. path: /home/oleg/.3T
  560. type: Directory
  561. - name: home-oleg-mozilla-firefox
  562. hostPath:
  563. path: /home/oleg/.mozilla/firefox
  564. type: Directory
  565. - name: home-oleg-ssh-private-key
  566. hostPath:
  567. path: /home/oleg/.ssh/id_ed25519
  568. type: File
  569. - name: home-oleg-ssh-public-key
  570. hostPath:
  571. path: /home/oleg/.ssh/id_ed25519.pub
  572. type: File
  573. - name: home-oleg-ssh-majordomo-gitlab-private-key
  574. hostPath:
  575. path: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass
  576. type: File
  577. - name: home-oleg-ssh-majordomo-gitlab-public-key
  578. hostPath:
  579. path: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass.pub
  580. type: File
  581. - name: home-oleg-ssh-known-hosts
  582. hostPath:
  583. path: /home/oleg/.ssh/known_hosts
  584. type: File
  585. - name: home-oleg-bash-history
  586. hostPath:
  587. path: /home/oleg/.bash_history
  588. type: File
  589. - name: root-bash-history
  590. hostPath:
  591. path: /root/.bash_history
  592. type: File
  593. - name: home-oleg-config-socialstream
  594. hostPath:
  595. path: /home/oleg/.config/SocialStream
  596. type: Directory
  597. - name: home-oleg-config-qbittorrent
  598. hostPath:
  599. path: /home/oleg/.config/qBittorrent
  600. type: Directory
  601. - name: home-oleg-dot-local-share-qbittorrent
  602. hostPath:
  603. path: /home/oleg/.local/share/qBittorrent
  604. type: Directory
  605. - name: home-oleg-src
  606. hostPath:
  607. path: /home/oleg/src
  608. type: Directory
  609. - name: taskexecutor
  610. hostPath:
  611. path: /home/oleg/src/gitlab.intr/hms/taskexecutor
  612. type: Directory
  613. - name: home-oleg-local-share-chezmoi
  614. hostPath:
  615. path: /home/oleg/.local/share/chezmoi
  616. type: Directory
  617. - name: srv
  618. hostPath:
  619. path: /srv
  620. type: Directory
  621. - name: qbittorrent-incomplete
  622. hostPath:
  623. path: /mnt/qbittorrent-incomplete
  624. type: Directory
  625. - name: home-oleg-config-wayvnc
  626. hostPath:
  627. path: /home/oleg/.config/wayvnc
  628. type: Directory
  629. - name: mnt-web-ext4
  630. hostPath:
  631. path: /mnt/web-ext4
  632. type: Directory
  633. - name: mnt-web-btrfs
  634. hostPath:
  635. path: /mnt/web-btrfs
  636. type: Directory
  637. - emptyDir:
  638. medium: Memory
  639. sizeLimit: 4G
  640. name: kali-rolling-tmp
  641. - emptyDir:
  642. medium: Memory
  643. sizeLimit: 512M
  644. name: kali-rolling-run
  645. - emptyDir:
  646. medium: Memory
  647. sizeLimit: 4G
  648. name: gentoo-tmp
  649. - emptyDir:
  650. medium: Memory
  651. sizeLimit: 512M
  652. name: gentoo-run
  653. - emptyDir:
  654. sizeLimit: 512M
  655. name: archlinux-var-log
  656. - emptyDir:
  657. sizeLimit: 512M
  658. name: gentoo-var-log
  659. - emptyDir:
  660. sizeLimit: 512M
  661. name: guix-var-log
  662. - emptyDir:
  663. sizeLimit: 512M
  664. name: guix-home-oleg-local-var-log
  665. - emptyDir:
  666. sizeLimit: 512M
  667. name: kali-rolling-var-log
  668. - emptyDir:
  669. sizeLimit: 512M
  670. name: nixos-var-log
  671. - emptyDir:
  672. sizeLimit: 16G
  673. name: nixos-var-lib-docker