Files
dsh_shenxian/poc/01-longhorn-subpath/bootstrap-job.yaml
T
admin 5ec99ce227
build / build-and-scan (push) Canceled after 0s
chore: 文档库全量重新入库(2026-10-20)
2026-10-20 15:05:55 +08:00

26 lines
729 B
YAML

# §4.9 步骤 1:一次性特权 bootstrap,把 PVC 根 world-writable + sticky。
# 必须在启用 PSA restricted 之前跑(此 namespace 不打 restricted 标签)。
apiVersion: batch/v1
kind: Job
metadata:
name: dsh-users-bootstrap
namespace: dsh-poc
spec:
ttlSecondsAfterFinished: 300
template:
spec:
restartPolicy: Never
containers:
- name: bootstrap
image: busybox:1.36
command: ["sh", "-c", "chmod 1777 /mnt && ls -ld /mnt"]
securityContext:
privileged: true
volumeMounts:
- name: data
mountPath: /mnt
volumes:
- name: data
persistentVolumeClaim:
claimName: dsh-users