daemonset.yaml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676
  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. - mountPath: /home
  271. name: nixos-home
  272. - mountPath: /home/oleg/.mozilla/firefox
  273. name: home-oleg-mozilla-firefox
  274. - name: home-oleg-bash-history
  275. mountPath: /home/oleg/.bash_history
  276. - name: home-oleg-dot-config-google-chrome
  277. mountPath: /home/oleg/.config/google-chrome
  278. - name: root-bash-history
  279. mountPath: /root/.bash_history
  280. - name: home-oleg-config-wayvnc
  281. mountPath: /home/oleg/.config/wayvnc
  282. - name: home-oleg-dot-local-share-chatterino
  283. mountPath: /home/oleg/.local/share/chatterino
  284. - name: nixos-var-log
  285. mountPath: /var/log
  286. - name: home-oleg-ssh-majordomo-gitlab-private-key
  287. mountPath: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass
  288. - name: home-oleg-ssh-majordomo-gitlab-public-key
  289. mountPath: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass.pub
  290. - name: home-oleg-src
  291. mountPath: /home/oleg/src
  292. - name: home-oleg-ssh-known-hosts
  293. mountPath: /home/oleg/.ssh/known_hosts
  294. - name: home-oleg-robo3t
  295. mountPath: /home/oleg/.3T
  296. - name: nixos-var-lib-docker
  297. mountPath: /var/lib/docker
  298. - image: harbor.home.wugi.info/library/archlinux-systemd:latest
  299. name: archlinux
  300. env:
  301. - name: container
  302. value: docker
  303. securityContext:
  304. capabilities:
  305. add:
  306. - NET_ADMIN
  307. - NET_BIND_SERVICE
  308. - NET_RAW
  309. - SYS_ADMIN
  310. - SYS_NICE
  311. - SYS_TIME
  312. privileged: true
  313. tty: true
  314. lifecycle:
  315. preStop:
  316. exec:
  317. command:
  318. - /bin/sh
  319. - -c
  320. - |
  321. if /bin/systemctl poweroff
  322. then
  323. :
  324. else
  325. exit 0
  326. fi
  327. volumeMounts:
  328. - mountPath: /run
  329. name: archlinux-run
  330. - mountPath: /tmp
  331. name: archlinux-tmp
  332. - mountPath: /dev/dri
  333. name: dev-dri
  334. - mountPath: /mnt/guix/run
  335. name: guix-run
  336. mountPropagation: HostToContainer
  337. - mountPath: /mnt/guix/tmp
  338. name: guix-tmp
  339. - name: home-oleg-bash-history
  340. mountPath: /home/oleg/.bash_history
  341. - name: root-bash-history
  342. mountPath: /root/.bash_history
  343. - name: home-oleg-config-socialstream
  344. mountPath: /home/oleg/.config/SocialStream
  345. - name: archlinux-var-log
  346. mountPath: /var/log
  347. - name: home-oleg-src
  348. mountPath: /home/oleg/src
  349. - image: harbor.home.wugi.info/library/kali-rolling:latest
  350. name: kali-rolling
  351. env:
  352. - name: container
  353. value: docker
  354. securityContext:
  355. capabilities:
  356. add:
  357. - NET_ADMIN
  358. - NET_BIND_SERVICE
  359. - NET_RAW
  360. - SYS_ADMIN
  361. - SYS_NICE
  362. - SYS_TIME
  363. privileged: true
  364. tty: true
  365. lifecycle:
  366. preStop:
  367. exec:
  368. command:
  369. - /bin/sh
  370. - -c
  371. - |
  372. if /bin/systemctl poweroff
  373. then
  374. :
  375. else
  376. exit 0
  377. fi
  378. volumeMounts:
  379. - mountPath: /run
  380. name: kali-rolling-run
  381. - mountPath: /tmp
  382. name: kali-rolling-tmp
  383. - mountPath: /dev/dri
  384. name: dev-dri
  385. - mountPath: /mnt/guix/run
  386. name: guix-run
  387. mountPropagation: HostToContainer
  388. - mountPath: /mnt/guix/tmp
  389. name: guix-tmp
  390. - name: home-oleg-bash-history
  391. mountPath: /home/oleg/.bash_history
  392. - name: root-bash-history
  393. mountPath: /root/.bash_history
  394. - name: kali-rolling-var-log
  395. mountPath: /var/log
  396. - image: harbor.home.wugi.info/library/gentoo-systemd:latest
  397. name: gentoo
  398. env:
  399. - name: container
  400. value: docker
  401. securityContext:
  402. capabilities:
  403. add:
  404. - NET_ADMIN
  405. - NET_BIND_SERVICE
  406. - NET_RAW
  407. - SYS_ADMIN
  408. - SYS_NICE
  409. - SYS_TIME
  410. privileged: true
  411. tty: true
  412. lifecycle:
  413. preStop:
  414. exec:
  415. command:
  416. - /bin/sh
  417. - -c
  418. - |
  419. if /bin/systemctl poweroff
  420. then
  421. :
  422. else
  423. exit 0
  424. fi
  425. volumeMounts:
  426. - mountPath: /run
  427. name: gentoo-run
  428. - mountPath: /tmp
  429. name: gentoo-tmp
  430. - mountPath: /dev/dri
  431. name: dev-dri
  432. - mountPath: /mnt/guix/run
  433. name: guix-run
  434. mountPropagation: HostToContainer
  435. - mountPath: /mnt/guix/tmp
  436. name: guix-tmp
  437. - name: home-oleg-bash-history
  438. mountPath: /home/oleg/.bash_history
  439. - name: root-bash-history
  440. mountPath: /root/.bash_history
  441. - name: gentoo-var-log
  442. mountPath: /var/log
  443. volumes:
  444. - name: dev-dri
  445. hostPath:
  446. path: /dev/dri
  447. type: Directory
  448. - name: dev-input
  449. hostPath:
  450. path: /dev/input
  451. type: Directory
  452. - name: dev-tty2
  453. hostPath:
  454. path: /dev/tty2
  455. type: CharDevice
  456. - name: dev-tty9
  457. hostPath:
  458. path: /dev/tty9
  459. type: CharDevice
  460. - name: dev-fuse
  461. hostPath:
  462. path: /dev/fuse
  463. type: CharDevice
  464. - name: nsswitch
  465. hostPath:
  466. path: /etc/nsswitch.conf
  467. type: File
  468. - name: services
  469. hostPath:
  470. path: /etc/services
  471. type: File
  472. - name: guix-shm
  473. emptyDir:
  474. medium: Memory
  475. sizeLimit: 1Gi
  476. - hostPath:
  477. path: /home/oleg
  478. type: Directory
  479. name: home-oleg
  480. - emptyDir:
  481. medium: Memory
  482. sizeLimit: 4G
  483. name: guix-tmp
  484. - emptyDir:
  485. medium: Memory
  486. sizeLimit: 4G
  487. name: archlinux-tmp
  488. - emptyDir:
  489. medium: Memory
  490. sizeLimit: 512M
  491. name: guix-run
  492. - emptyDir:
  493. medium: Memory
  494. sizeLimit: 512M
  495. name: nixos-run
  496. - emptyDir:
  497. name: nixos-home
  498. - emptyDir:
  499. medium: Memory
  500. sizeLimit: 512M
  501. name: archlinux-run
  502. - name: var-run-shepherd-socket
  503. hostPath:
  504. path: /var/run/shepherd/socket
  505. type: Socket
  506. - emptyDir:
  507. sizeLimit: 4G
  508. name: container-home-oleg
  509. - name: home-oleg-dot-cache-ihs
  510. hostPath:
  511. path: /home/oleg/.cache/ihs
  512. type: Directory
  513. - name: home-oleg-dot-config-google-chrome
  514. hostPath:
  515. path: /home/oleg/.config/google-chrome
  516. type: Directory
  517. - name: home-oleg-dot-config-obs-studio
  518. hostPath:
  519. path: /home/oleg/.config/obs-studio-4k
  520. type: Directory
  521. - name: home-oleg-dot-config-remmina
  522. hostPath:
  523. path: /home/oleg/.config/remmina
  524. type: Directory
  525. - name: home-oleg-dot-config-sway
  526. hostPath:
  527. path: /home/oleg/.config/sway
  528. type: Directory
  529. - name: home-oleg-dot-local-share-remmina
  530. hostPath:
  531. path: /home/oleg/.local/share/remmina
  532. type: Directory
  533. - name: home-oleg-dot-local-share-telegram
  534. hostPath:
  535. path: /home/oleg/.local/share/TelegramDesktop
  536. type: Directory
  537. - name: home-oleg-dot-local-share-chatterino
  538. hostPath:
  539. path: /home/oleg/.local/share/chatterino
  540. type: Directory
  541. - name: home-oleg-dot-mozilla
  542. hostPath:
  543. path: /home/oleg/.mozilla
  544. type: Directory
  545. - name: home-oleg-dot-password-store
  546. hostPath:
  547. path: /home/oleg/.password-store
  548. type: Directory
  549. - name: home-oleg-dot-gnupg
  550. hostPath:
  551. path: /home/oleg/.gnupg
  552. type: Directory
  553. - name: home-oleg-robo3t
  554. hostPath:
  555. path: /home/oleg/.3T
  556. type: Directory
  557. - name: home-oleg-mozilla-firefox
  558. hostPath:
  559. path: /home/oleg/.mozilla/firefox
  560. type: Directory
  561. - name: home-oleg-ssh-private-key
  562. hostPath:
  563. path: /home/oleg/.ssh/id_ed25519
  564. type: File
  565. - name: home-oleg-ssh-public-key
  566. hostPath:
  567. path: /home/oleg/.ssh/id_ed25519.pub
  568. type: File
  569. - name: home-oleg-ssh-majordomo-gitlab-private-key
  570. hostPath:
  571. path: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass
  572. type: File
  573. - name: home-oleg-ssh-majordomo-gitlab-public-key
  574. hostPath:
  575. path: /home/oleg/.ssh/id_rsa_gitlab_intr_nopass.pub
  576. type: File
  577. - name: home-oleg-ssh-known-hosts
  578. hostPath:
  579. path: /home/oleg/.ssh/known_hosts
  580. type: File
  581. - name: home-oleg-bash-history
  582. hostPath:
  583. path: /home/oleg/.bash_history
  584. type: File
  585. - name: root-bash-history
  586. hostPath:
  587. path: /root/.bash_history
  588. type: File
  589. - name: home-oleg-config-socialstream
  590. hostPath:
  591. path: /home/oleg/.config/SocialStream
  592. type: Directory
  593. - name: home-oleg-config-qbittorrent
  594. hostPath:
  595. path: /home/oleg/.config/qBittorrent
  596. type: Directory
  597. - name: home-oleg-dot-local-share-qbittorrent
  598. hostPath:
  599. path: /home/oleg/.local/share/qBittorrent
  600. type: Directory
  601. - name: home-oleg-src
  602. hostPath:
  603. path: /home/oleg/src
  604. type: Directory
  605. - name: taskexecutor
  606. hostPath:
  607. path: /home/oleg/src/gitlab.intr/hms/taskexecutor
  608. type: Directory
  609. - name: home-oleg-local-share-chezmoi
  610. hostPath:
  611. path: /home/oleg/.local/share/chezmoi
  612. type: Directory
  613. - name: srv
  614. hostPath:
  615. path: /srv
  616. type: Directory
  617. - name: qbittorrent-incomplete
  618. hostPath:
  619. path: /mnt/qbittorrent-incomplete
  620. type: Directory
  621. - name: home-oleg-config-wayvnc
  622. hostPath:
  623. path: /home/oleg/.config/wayvnc
  624. type: Directory
  625. - emptyDir:
  626. medium: Memory
  627. sizeLimit: 4G
  628. name: kali-rolling-tmp
  629. - emptyDir:
  630. medium: Memory
  631. sizeLimit: 512M
  632. name: kali-rolling-run
  633. - emptyDir:
  634. medium: Memory
  635. sizeLimit: 4G
  636. name: gentoo-tmp
  637. - emptyDir:
  638. medium: Memory
  639. sizeLimit: 512M
  640. name: gentoo-run
  641. - emptyDir:
  642. sizeLimit: 512M
  643. name: archlinux-var-log
  644. - emptyDir:
  645. sizeLimit: 512M
  646. name: gentoo-var-log
  647. - emptyDir:
  648. sizeLimit: 512M
  649. name: guix-var-log
  650. - emptyDir:
  651. sizeLimit: 512M
  652. name: guix-home-oleg-local-var-log
  653. - emptyDir:
  654. sizeLimit: 512M
  655. name: kali-rolling-var-log
  656. - emptyDir:
  657. sizeLimit: 512M
  658. name: nixos-var-log
  659. - emptyDir:
  660. sizeLimit: 16G
  661. name: nixos-var-lib-docker