job.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. apiVersion: batch/v1
  2. kind: Job
  3. metadata:
  4. name: dotfiles-update-commit
  5. annotations:
  6. # Setting spec.force to true will make Flux recreate the Job when any
  7. # immutable field is changed, forcing the Job to run every time the
  8. # container image tag changes.
  9. kustomize.toolkit.fluxcd.io/force: enabled
  10. spec:
  11. backoffLimit: 0
  12. template:
  13. metadata:
  14. annotations:
  15. guix-default-channel-commit: e24b690e
  16. spec:
  17. nodeSelector:
  18. kubernetes.io/hostname: kube1
  19. hostNetwork: true
  20. hostPID: true
  21. restartPolicy: Never
  22. containers:
  23. - command:
  24. - nsenter
  25. - --target
  26. - "1"
  27. - --mount
  28. - --uts
  29. - --ipc
  30. - --net
  31. - --pid
  32. - --no-fork
  33. - /bin/sh
  34. - -l
  35. - -c
  36. - sudo --chdir=$WORKSPACE --user=oleg --login bash -ic 'dot_local/bin/executable_dotfiles-update-commit'
  37. env:
  38. - name: WORKSPACE
  39. value: /home/oleg/.local/share/chezmoi
  40. image: docker-registry.wugi.info/library/util-linux-with-udev
  41. name: refresh
  42. resources:
  43. limits:
  44. cpu: 14000m
  45. memory: 4096Mi
  46. requests:
  47. cpu: 1000m
  48. memory: 512Mi
  49. securityContext:
  50. privileged: true