Open gen2fish opened 9 months ago
I'm not familiar with how Kubernetes works, but are the containers for this job being reused? Or run and then removed immediately?
I think I might know what's going on here, but need the above info to be sure
They are ran and removed and a new one is built everytime
On Wed, Sep 13, 2023, 12:01 AM Tim Pilius @.***> wrote:
I'm not familiar with how Kubernetes works, but are the containers for this job being reused? Or run and then removed immediately?
I think I might know what's going on here, but need the above info to be sure
— Reply to this email directly, view it on GitHub https://github.com/tpill90/battlenet-lancache-prefill/issues/105#issuecomment-1716996320, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTL4KXUVJBRYS7MTBEFRNTX2FDZ5ANCNFSM6AAAAAA4VRBQXQ . You are receiving this because you authored the thread.Message ID: @.***>
Hi Chris,
Apologies for the late reply. The solution to your issue is that BattlenetPrefill has a directory where it stores various configuration, and inside that folder is a file where it keeps track of what is up to date.
The solution here will be to properly bind mount that directory. An example is in the docs Docker Setup Guide, but I'll post it here as well:
docker run -it --rm --net=host \
--volume ~/.config/BattleNetPrefill:/Config \
tpill90/battlenet-lancache-prefill:latest
From the above example, the Config
folder is being bound to the user's directory. You'll want to change the binding for the Config
folder to wherever you want to save it.
I'm going to close this for now. If the above doesn't solve your issue please feel free to reopen.
I was able to implement and it works
apiVersion: batch/v1
kind: CronJob
metadata:
name: battlenet-lancache-prefill
spec:
schedule: "0 * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: battlenet-lancache-prefill
image: tpill90/battlenet-lancache-prefill:latest
args:
- prefill
- -p
- wow
volumeMounts:
- name: battlenet-pvc
mountPath: /root/.cache/
restartPolicy: OnFailure
volumes:
- name: battlenet-pvc
persistentVolumeClaim:
claimName: battlenet-pvc
@gen2fish thx for pointing me to /root/.cache
.
@tpill90 I had to mount both /Config
and /root/.cache
directories to have it working properly. /Config
contains selectedAppsToPrefill.json
whereas /root/.cache
holds the BattlenetPrefill
folder. But there's only /Config
mentioned in the setup guide - am I doing something wrong or should /root/.cache
be added to the guid? Thx!
Describe the bug Running the container in Kubernetes as a CronJob, even with back to back executions it still downloads each time.
CronJob Manifest
Container Log for 1st run
2nd Run
172.20.0.12 is the correct IP for my Lancache server