From ae6b4d15c7317a197d282d78669ad6a1aff6f4d8 Mon Sep 17 00:00:00 2001 From: Adnan Abdulhussein Date: Wed, 31 Jan 2018 11:11:37 +0100 Subject: [PATCH] expose container image used in jobs as configurable --- controller.go | 2 +- main.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/controller.go b/controller.go index 2a57f614dd3..c968ddec3e3 100644 --- a/controller.go +++ b/controller.go @@ -419,7 +419,7 @@ func jobSpec(apprepo *apprepov1alpha1.AppRepository) batchv1.JobSpec { Containers: []corev1.Container{ { Name: "sync", - Image: "kubeapps/chart-repo-sync:latest", + Image: repoSyncImage, Command: []string{"/chart-repo-sync"}, Args: apprepoSyncJobArgs(apprepo), Env: []corev1.EnvVar{ diff --git a/main.go b/main.go index ecb1b28e079..0f90f92a026 100644 --- a/main.go +++ b/main.go @@ -34,6 +34,7 @@ import ( var ( masterURL string kubeconfig string + repoSyncImage string ) func main() { @@ -73,4 +74,5 @@ func main() { func init() { flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.") flag.StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.") + flag.StringVar(&repoSyncImage, "repo-sync-image", "kubeapps/chart-repo-sync:latest", "container repo/image to use in CronJobs") }