--- apiVersion: batch/v1 kind: Job metadata: name: piefed-db-init namespace: piefed-application labels: app.kubernetes.io/name: piefed app.kubernetes.io/component: db-init annotations: # Flux will recreate this job if image changes kustomize.toolkit.fluxcd.io/reconcile: "true" spec: # Keep job history for debugging ttlSecondsAfterFinished: 86400 # 24 hours backoffLimit: 3 # Retry up to 3 times on failure template: metadata: labels: app.kubernetes.io/name: piefed app.kubernetes.io/component: db-init spec: restartPolicy: OnFailure imagePullSecrets: - name: harbor-pull-secret containers: - name: db-init image: /library/piefed-web:latest imagePullPolicy: Always command: - /usr/local/bin/entrypoint-init.sh envFrom: - configMapRef: name: piefed-config - secretRef: name: piefed-secrets env: - name: PYTHONUNBUFFERED value: "1" - name: FLASK_DEBUG value: "0" resources: requests: cpu: 200m memory: 512Mi limits: cpu: 1000m memory: 1Gi volumeMounts: - name: app-storage mountPath: /app/app/media subPath: media - name: app-storage mountPath: /app/app/static/media subPath: static - name: cache-storage mountPath: /app/cache volumes: - name: app-storage persistentVolumeClaim: claimName: piefed-app-storage - name: cache-storage persistentVolumeClaim: claimName: piefed-cache-storage