job.yaml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. apiVersion: batch/v1
  2. kind: Job
  3. metadata:
  4. name: guix-latest-local-file
  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. nodeSelector:
  17. kubernetes.io/hostname: kube1
  18. restartPolicy: Never
  19. containers:
  20. - command:
  21. - nsenter
  22. - --target
  23. - "1"
  24. - --mount
  25. - --uts
  26. - --ipc
  27. - --net
  28. - --pid
  29. - --no-fork
  30. - sh
  31. - -l
  32. - -c
  33. - sudo --chdir=$WORKSPACE --user=oleg --login bash -ic 'make dotfiles/channels-current-local-file.scm'
  34. env:
  35. - name: WORKSPACE
  36. value: /home/oleg/.local/share/chezmoi
  37. image: docker-registry.wugi.info/library/alpine
  38. name: refresh
  39. resources:
  40. limits:
  41. cpu: 8000m
  42. memory: 4096Mi
  43. requests:
  44. cpu: 1000m
  45. memory: 512Mi
  46. securityContext:
  47. privileged: true