Skip to content

Commit

Permalink
remove MINIO_OPERATOR_DEPLOYMENT_NAME variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ramondeklein committed Sep 19, 2024
1 parent 28d4cd6 commit aeb7a6c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion docs/env-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Operator behavior can be customized using environment variables in the `minio-op
|MINIO_OPERATOR_CSR_SIGNER_NAME| The name to use for the CSR Signer. It will override the default | | `kubernetes.io/kubelet-serving` |
|SUBNET_BASE_URL| Subnet base URL | | https://subnet.min.io |
|OPERATOR_CERT_PASSWD| This is used to decrypt the private key in the TLS certificate for operator, if needed | | |
|MINIO_OPERATOR_DEPLOYMENT_NAME| This specifies a custom deployment name for Operator | | `minio-operator` |
|OPERATOR_STS_ENABLED| This toggles the STS Service on or off | `on`, `off` | `on` |
|OPERATOR_STS_AUTO_TLS_ENABLED| Env variable name to turn on and off generating the STS TLS certificate automatically using CSR. If it is disabled, you must provide a certificate issued externally | `on`, `off` | `on` |
|WATCHED_NAMESPACE| The namespaces which the operator watches for MinIO tenants. Defaults to `""` for all namespaces. | | |
Expand Down
4 changes: 0 additions & 4 deletions helm/operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ operator:
# .. code-block:: yaml
#
# env:
# - name: MINIO_OPERATOR_DEPLOYMENT_NAME
# valueFrom:
# fieldRef:
# fieldPath: metadata.labels['app.kubernetes.io/name']
# - name: CLUSTER_DOMAIN
# value: "cluster.domain"
# - name: WATCHED_NAMESPACE
Expand Down
7 changes: 2 additions & 5 deletions pkg/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import (

miniov2 "github.com/minio/operator/pkg/apis/minio.min.io/v2"
xcerts "github.com/minio/pkg/certs"
"github.com/minio/pkg/env"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -43,8 +42,6 @@ import (
const (
// CertPasswordEnv Env variable is used to decrypt the private key in the TLS certificate for operator if need it
CertPasswordEnv = "OPERATOR_CERT_PASSWD"
// OperatorDeploymentNameEnv Env variable to specify a custom deployment name for Operator
OperatorDeploymentNameEnv = "MINIO_OPERATOR_DEPLOYMENT_NAME"
// OperatorCATLSSecretName is the name of the secret for the operator CA
OperatorCATLSSecretName = "operator-ca-tls"
// DefaultDeploymentName is the default name of the operator deployment
Expand Down Expand Up @@ -305,7 +302,7 @@ func (c *Controller) createBuckets(ctx context.Context, tenant *miniov2.Tenant,
return created, err
}

// getOperatorDeploymentName Internal func returns the Operator deployment name from MINIO_OPERATOR_DEPLOYMENT_NAME ENV variable or the default name
// getOperatorDeploymentName returns the Operator deployment (fixed)
func getOperatorDeploymentName() string {
return env.Get(OperatorDeploymentNameEnv, DefaultDeploymentName)
return DefaultDeploymentName
}

0 comments on commit aeb7a6c

Please sign in to comment.