-
-
Notifications
You must be signed in to change notification settings - Fork 82
Description
Is your feature request related to a problem? Please describe
I think there should be an option to automatically remove models present on the disk but not specified in the values file, to avoid outdated models lingering on the system and wasting disk space.
Describe the solution you'd like
Similarly to how .Values.ollama.models are used in deployment postStart hook to pull and run specific models, it would be useful to also check which models are currently present and compare them to the desired list. If any extra models are found, they could be removed automatically. This behavior should be optional and controlled via a flag in values.yaml. This would help keep disk usage under control and ensure the environment stays in sync with the declared config.
Describe alternatives you've considered
I currently implement this cleanup using an init container, but it would be cleaner and more integrated if this option existed natively within the postStart lifecycle hook.