How would you update a driver (file) in a running kubernetes application through a pipeline?
I’ve been poking at this problem for a while and keep running into anti-patterns and over-engineered solutions. So I would like to hear your design suggestions on how to solve this, the “right” way.
The setup is fairly simple. I have an application deployed to kubernetes from it’s repo. When someone calls the application to do a task it scans a folder for drivers suitable for the task. When it finds one it executes the task through the driver.
This folder is a persistent volume, so that drivers survive between application releases.
There are several drivers and they are all in separate repos. When a new driver is released or an existing one is updated, the deployment task should copy it to the drivers folder of the application on kubernetes.
What is the best way to achieve this?
- My first thought was to run a command/script in the application Pod and download the driver. The requires me to know the pod name.
- Then I though of running a Job and store it directly on the persistent volume. This would require me to change it to an NFS volume, which seems overkill, when only the application needs it.
- I also though of redeploying the application every time there is a driver update and grab all the newest driver. Also a bit excessive, in my opinion.
- I could also expose the application, so I can copy the files to it.
None of these seem right for the task.
Does anyone have suggestions?