Files
homelab/k8s-ng/apps/fdroidserver/storage.yaml
T

47 lines
1.4 KiB
YAML
Raw Normal View History

apiVersion: batch/v1
kind: Job
metadata:
name: fdroidserver-storage-prepare
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation,HookSucceeded
spec:
backoffLimit: 2
template:
spec:
automountServiceAccountToken: false
restartPolicy: Never
nodeSelector:
kubernetes.io/hostname: master
securityContext:
seccompProfile:
type: RuntimeDefault
containers:
- name: prepare
image: docker.io/library/busybox:1.37.0@sha256:a7dbc319b1438115a207e11930dc4bb3e643dcb3ec0bdd694bb36cd8fad289ec
command:
- sh
- -ec
- |
mkdir -p /data/public
chown 1000:1000 /data /data/public
chmod 0700 /data
chmod 0755 /data/public
if [ "$(readlink /data/public/index.html)" != fdroid/repo/index.html ]; then
ln -sfn fdroid/repo/index.html /data/public/index.html
fi
securityContext:
runAsUser: 0
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ALL]
add: [CHOWN, DAC_OVERRIDE, FOWNER]
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
hostPath:
path: /data/k8s/fdroidserver
type: DirectoryOrCreate