Skip to content

Commit

Permalink
feat: add env for default operator image
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhi.li committed Nov 13, 2023
1 parent 2515162 commit d8b94e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/main-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/minio/pkg/env"
"net/http"
"os"
"os/signal"
Expand Down Expand Up @@ -245,6 +246,8 @@ func NewController(podName string, namespacesToWatch set.StringSet, kubeClientSe
}
}

oprImg = env.Get(DefaultOperatorImageEnv, oprImg)

controller := &Controller{
podName: podName,
namespacesToWatch: namespacesToWatch,
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8b94e2

Please sign in to comment.