xactfetch: Run xactfetch in a CronJob
I finally got *xactfetch* cleaned up enough to run in a headless container.
This commit is contained in:
72
xactfetch/xactfetch.yaml
Normal file
72
xactfetch/xactfetch.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: xactfetch
|
||||
labels:
|
||||
app.kubernetes.io/name: xactfetch
|
||||
app.kubernetes.io/component: xactfetch
|
||||
app.kubernetes.io/part-of: xactfetch
|
||||
spec:
|
||||
schedule: 4 9 * * *
|
||||
timeZone: America/Chicago
|
||||
concurrencyPolicy: Forbid
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: xactfetch
|
||||
app.kubernetes.io/component: xactfetch
|
||||
app.kubernetes.io/part-of: xactfetch
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
imagePullSecrets:
|
||||
- name: imagepull-gitea
|
||||
initContainers:
|
||||
- name: wait
|
||||
image: registry.fedoraproject.org/fedora-minimal
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- sleep $((RANDOM % 3600))
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
runAsGroup: 999
|
||||
runAsUser: 999
|
||||
containers:
|
||||
- name: xactfetch
|
||||
image: git.pyrocufflink.net/packages/xactfetch
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: xactfetch
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /etc/rbw
|
||||
name: xactfetch-rbw
|
||||
readOnly: true
|
||||
- mountPath: /run/secrets/xactfetch
|
||||
name: xactfetch-secrets
|
||||
readOnly: true
|
||||
- mountPath: /tmp
|
||||
name: tmp
|
||||
subPath: tmp
|
||||
- mountPath: /var/lib/xactfetch
|
||||
name: xactfetch-data
|
||||
subPath: data
|
||||
securityContext:
|
||||
fsGroup: 2468
|
||||
runAsNonRoot: true
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
- name: xactfetch-data
|
||||
persistentVolumeClaim:
|
||||
claimName: xactfetch
|
||||
- name: xactfetch-rbw
|
||||
configMap:
|
||||
name: xactfetch-rbw
|
||||
- name: xactfetch-secrets
|
||||
secret:
|
||||
secretName: xactfetch
|
||||
Reference in New Issue
Block a user