job.yaml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. apiVersion: batch/v1
  2. kind: Job
  3. metadata:
  4. name: guix-home-reconfigure
  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. spec:
  14. hostNetwork: true
  15. hostPID: true
  16. restartPolicy: Never
  17. containers:
  18. - command:
  19. - nsenter
  20. - --target
  21. - "1"
  22. - --mount
  23. - --uts
  24. - --ipc
  25. - --net
  26. - --pid
  27. - --no-fork
  28. - /bin/sh
  29. - -l
  30. - -c
  31. - sudo --user=oleg --login bash -ic 'guix home switch --allow-downgrades'
  32. image: docker-registry.wugi.info/library/util-linux-with-udev
  33. name: refresh
  34. resources:
  35. limits:
  36. cpu: 14000m
  37. memory: 4096Mi
  38. requests:
  39. cpu: 1000m
  40. memory: 512Mi
  41. securityContext:
  42. privileged: true