From d8b94e23e336e16cf6f52230d6b6d8da4167c311 Mon Sep 17 00:00:00 2001 From: "guozhi.li" Date: Mon, 13 Nov 2023 16:23:17 +0800 Subject: [PATCH] feat: add env for default operator image --- pkg/controller/main-controller.go | 3 +++ pkg/controller/operator.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/pkg/controller/main-controller.go b/pkg/controller/main-controller.go index c610ace2883..c9605fe85ff 100644 --- a/pkg/controller/main-controller.go +++ b/pkg/controller/main-controller.go @@ -19,6 +19,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/minio/pkg/env" "net/http" "os" "os/signal" @@ -245,6 +246,8 @@ func NewController(podName string, namespacesToWatch set.StringSet, kubeClientSe } } + oprImg = env.Get(DefaultOperatorImageEnv, oprImg) + controller := &Controller{ podName: podName, namespacesToWatch: namespacesToWatch, diff --git a/pkg/controller/operator.go b/pkg/controller/operator.go index 628d10c0981..bdf6db38bcb 100644 --- a/pkg/controller/operator.go +++ b/pkg/controller/operator.go @@ -61,6 +61,8 @@ const ( DefaultDeploymentName = "minio-operator" // DefaultOperatorImage is the version fo the operator being used DefaultOperatorImage = "minio/operator:v5.0.10" + // DefaultOperatorImageEnv is the default image to minio instance + DefaultOperatorImageEnv = "MINIO_OPERATOR_IMAGE" ) var serverCertsManager *xcerts.Manager