apiVersion: batch/v1 kind: CronJob metadata: name: factorio-placement namespace: factorio spec: schedule: '* * * * *' concurrencyPolicy: Forbid startingDeadlineSeconds: 45 successfulJobsHistoryLimit: 1 failedJobsHistoryLimit: 2 jobTemplate: spec: backoffLimit: 1 activeDeadlineSeconds: 50 template: spec: serviceAccountName: factorio-placement restartPolicy: Never affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - odroid-h3-00 - odroid-h3-01 - odroid-h3-02 - odroid-h3-03 - odroid-h3-04 - odroid-h3-05 containers: - name: placement image: docker.io/alpine/k8s:1.35.3 command: - /bin/sh - /scripts/placement.sh resources: requests: cpu: 10m memory: 32Mi limits: memory: 128Mi securityContext: runAsNonRoot: true runAsUser: 65534 allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: - ALL env: - name: HOME value: /tmp volumeMounts: - name: scripts mountPath: /scripts readOnly: true - name: tmp mountPath: /tmp volumes: - name: scripts configMap: name: factorio-scripts - name: tmp emptyDir: {}