Improve helm chart allowing for lock of the worker image

This commit is contained in:
2025-01-13 13:59:18 +00:00
parent 1f8236d396
commit 5649c2863c
6 changed files with 49 additions and 29 deletions
+9 -1
View File
@@ -1,11 +1,19 @@
package shared
import (
"os"
"regexp"
"strings"
)
var BACKUP_JOB_IMAGE = "ghcr.io/lukaszraczylo/kubernetes-images-sync-worker:1.0.2"
var BACKUP_JOB_IMAGE = getWorkerImage()
func getWorkerImage() string {
if img := os.Getenv("WORKER_IMAGE"); img != "" {
return img
}
return "ghcr.io/lukaszraczylo/kubernetes-images-sync-worker:1.0.2" // fallback
}
const (
// AVAILABLE STATUSES