Files
AI-Red-Teaming-Playground-L…/k8s/conf/prod/ctfd-migration-job.yaml
microsoft-github-operations[bot] 6659812f5b Initial commit
2025-05-18 06:12:26 -07:00

48 lines
1.3 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: ctfd-migration-job
spec:
backoffLimit: 2
template:
spec:
containers:
- name: ctfd-migration-job
image: ctfd:latest
imagePullPolicy: Always
workingDir: /opt/CTFd
command: ["python", "update_challenges.py", "data_migration/challenges.json"]
volumeMounts:
- mountPath: /opt/CTFd/data_migration/challenges.json
name: challenges-json
subPath: challenges.json
readOnly: true
env:
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: ctfd-secrets
key: secret-key
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: ctfd-secrets
key: postgres-connection-string
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: ctfd-secrets
key: redis-connection-string
restartPolicy: Never
volumes:
- name: challenges-json
configMap:
name: ctfd-conf
items:
- key: challenges.json
path: challenges.json