init
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: document-ai-indexer-cronjob
|
||||
spec:
|
||||
# Scheduling configuration - execute every 10 minutes
|
||||
schedule: "*/10 * * * *"
|
||||
|
||||
# Concurrency policy: Disable concurrent execution. If the previous job is still running, new execution will be skipped.
|
||||
concurrencyPolicy: Forbid
|
||||
|
||||
# Successful jobs history limit: Keep the last 3 successful job records.
|
||||
successfulJobsHistoryLimit: 10
|
||||
|
||||
# Failed jobs history limit: Keep the last failed job record.
|
||||
failedJobsHistoryLimit: 10
|
||||
|
||||
# Job template
|
||||
jobTemplate:
|
||||
spec:
|
||||
backoffLimit: 0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: document-ai-indexer
|
||||
job-type: cronjob
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
|
||||
volumes:
|
||||
# 1. ConfigMap volume
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: document-ai-indexer-config
|
||||
items:
|
||||
- key: env.yaml
|
||||
path: env.yaml
|
||||
- key: config.yaml
|
||||
path: config.yaml
|
||||
|
||||
# 2. Azure File Share volume
|
||||
- name: data-volume
|
||||
azureFile:
|
||||
secretName: azure-files-cred # Quote Secret
|
||||
shareName: fs-document-ai-indexer # Your file share name
|
||||
readOnly: false # Write permission
|
||||
|
||||
containers:
|
||||
- name: document-ai-indexer
|
||||
image: acraiflowlab.azurecr.io/document-ai-indexer:2.0.1
|
||||
imagePullPolicy: Always
|
||||
# Mount the volume into the container
|
||||
volumeMounts:
|
||||
# ConfigMap Mount
|
||||
- name: config-volume
|
||||
mountPath: /app/env.yaml
|
||||
subPath: env.yaml
|
||||
- name: config-volume
|
||||
mountPath: /app/config.yaml
|
||||
subPath: config.yaml
|
||||
|
||||
# Azure File Shared mount
|
||||
- name: data-volume
|
||||
mountPath: /app/run_tmp # Program write/read directory
|
||||
Reference in New Issue
Block a user