2026-07-25 01:53:58 -03:00
|
|
|
# services/cassandra/migration-jobs/artifact-permissions-job.yaml
|
|
|
|
|
# One-off migration repair after copying artifacts from the Veles PVC.
|
|
|
|
|
apiVersion: batch/v1
|
|
|
|
|
kind: Job
|
|
|
|
|
metadata:
|
2026-07-25 02:14:02 -03:00
|
|
|
name: cassandra-artifact-permissions-2
|
2026-07-25 01:53:58 -03:00
|
|
|
namespace: cassandra
|
|
|
|
|
spec:
|
2026-07-25 02:14:02 -03:00
|
|
|
suspend: true
|
2026-07-25 01:53:58 -03:00
|
|
|
backoffLimit: 0
|
|
|
|
|
ttlSecondsAfterFinished: 86400
|
|
|
|
|
template:
|
|
|
|
|
spec:
|
|
|
|
|
serviceAccountName: cassandra-artifact-migration
|
|
|
|
|
automountServiceAccountToken: false
|
|
|
|
|
restartPolicy: Never
|
|
|
|
|
nodeSelector:
|
|
|
|
|
cassandra.bstein.dev/node-pool: oceanus
|
|
|
|
|
tolerations:
|
|
|
|
|
- key: veles.bstein.dev/simulation
|
|
|
|
|
operator: Equal
|
|
|
|
|
value: "true"
|
|
|
|
|
effect: NoSchedule
|
|
|
|
|
containers:
|
|
|
|
|
- name: permissions
|
|
|
|
|
image: alpine:3.20
|
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
|
command: ["/bin/sh", "-c"]
|
|
|
|
|
args:
|
|
|
|
|
- |
|
|
|
|
|
set -eu
|
|
|
|
|
chown -R 10001:10001 /data/cassandra-artifacts
|
|
|
|
|
find /data/cassandra-artifacts -type d -exec chmod 2775 {} +
|
|
|
|
|
find /data/cassandra-artifacts -type f -exec chmod 0664 {} +
|
|
|
|
|
printf 'artifact permission repair complete\n'
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: artifacts
|
|
|
|
|
mountPath: /data/cassandra-artifacts
|
|
|
|
|
volumes:
|
|
|
|
|
- name: artifacts
|
|
|
|
|
persistentVolumeClaim:
|
|
|
|
|
claimName: cassandra-artifacts
|