オプション設定を提供するには、 --set引数を使用して Helm に渡します。 配置タイプの値設定を一覧表示する次のファイルを使用します。
Vanilla Kubernetes: values.yaml
OpenShift: 値-openshift.YAML
任意の Kubernetes Operator インストール設定の詳細については、「 Operator Helm のインストール設定 」を参照してください。
次の例のように コマンドを実行し、指定したオプションが構成に渡されます。
helm upgrade mongodb-kubernetes-operator mongodb/mongodb-kubernetes \ --set registry.pullPolicy='IfNotPresent'
Agent.name
Name of the MongoDB Agent image. This setting gets appended to registry.agent and sets the MDB_AGENT_IMAGE_REPOSITORY environment variable to the full URL from which the StatefulSet downloads the MongoDB Agent image for database deployments. To learn more, see Container Images.
デフォルト値は mongodb-agent です。
agent: name: mongodb-agent
appDb.name
アプリケーション データベース イメージの名前。
デフォルト値は mongodb-kubernetes-appdb です。
appDb: name: mongodb-kubernetes-appdb version: 10.2.15.5958-1_4.2.11
appDb.version
アプリケーション データベースが使用する MongoDB Agent を含むイメージのバージョン。
デフォルト値は 10.2.15.5958-1_4.2.11 です。
appDb: name: mongodb-kubernetes-appdb version: 10.2.15.5958-1_4.2.11
database.name
MongoDB Enterprise Database イメージの名前。
デフォルト値はmongodb-enterprise-databaseです。
database: name: mongodb-enterprise-database version: 1.6.1
database.version
Kubernetes Operator が配置する MongoDB Enterprise Database イメージのバージョン。
database: name: mongodb-enterprise-database version: 1.6.1
initAppDb.name
アプリケーション データベースの起動スクリプトと準備完了シグナルを含むinitContainerイメージの名前。
デフォルト値は mongodb-kubernetes-init-appdb です。
database: name: mongodb-kubernetes-init-appdb version: 1.6.1
initAppDb.version
アプリケーション データベースの起動スクリプトと準備完了センサーを含むinitContainerイメージのバージョン。
デフォルト値は 1.6.1 です。
database: name: mongodb-kubernetes-init-appdb version: 1.6.1
initDatabase.name
MongoDB Agent の起動スクリプトと準備完了プロセスを含むinitContainerイメージの名前。
デフォルト値は mongodb-kubernetes-init-database です。
database: name: mongodb-kubernetes-init-database version: 1.6.1
initDatabase.version
MongoDB Agent の起動スクリプトと準備完了プロセスを含むinitContainerイメージのバージョン。
デフォルト値は 1.6.1 です。
database: name: mongodb-kubernetes-init-database version: 1.6.1
initOpsManager.name
MongoDB Ops Manager の起動スクリプトと準備状況検証を含むinitContainerイメージのバージョン。
デフォルト値は mongodb-kubernetes-init-ops-manager です。
database: name: mongodb-kubernetes-init-ops-manager version: 1.6.1
initOpsManager.version
MongoDB Ops Manager の起動スクリプトと準備状況検証を含むinitContainerイメージのバージョン。
デフォルト値は 1.6.1 です。
database: name: mongodb-kubernetes-init-ops-manager version: 1.6.1
ManagedSecurityContext
Kubernetes Operator が、Kubernetes クラスターが管理するsecurityContext設定を継承するかどうかを決定するフラグです。
OpenShift または制限された環境で Kubernetes Operator を実行する場合は、この値はtrueである必要があります。
デフォルト値はfalseです。
# Set this to true if your cluster is managing SecurityContext for you. # If running OpenShift (Cloud, Minishift, etc.), set this to true. managedSecurityContext: false
デフォルト値はtrueです。
# Set this to true if your cluster is managing SecurityContext for you. # If running OpenShift (Cloud, Minishift, etc.), set this to true. managedSecurityContext: true
mongodb.appdbAssumeOldFormat
デフォルト値はfalseで、イメージのサフィックスが自動的に更新されます。
mongodb: appdbAssumeOldFormat: false
mongodb.imageType
アプリケーション データベースイメージのサフィックス。
デフォルトはubi8です。 整合性のためにubiイメージのみを使用することを推奨していますが、必要に応じてこの設定をubuntu2204に変更できます。
mongodb: imageType: ubi8
multiCluster.clusterClientTimeout
Kubernetes Operator がクラスターのKubernetes APIサーバーエンドポイントへの接続を試みる時間(秒単位)。このタイムアウトは、マルチ Kubernetes クラスターMongoDB配置内のすべてのKubernetesクラスターに設定されています。Kubernetes Operator が指定された時間内にKubernetes APIサーバーからの応答を受け取らない場合、Kubernetes Operator はクラスターのステータスを「非正常」としてログに記録します。詳しくは、 Kubernetesクラスターのトラブルシューティング を参照してください。
デフォルト値は10です。
multiCluster: clusterClientTimeout: 10
namespace
名前空間 に Kubernetes Operator を配置します。
デフォルト以外の名前空間を使用するには、Kubernetes Operator を配置する名前空間を指定します。
デフォルト値はMongoDBです。
# Name of the Namespace to use namespace: mongodb
必要 CAIn Infrastructure
Determines whether Kubernetes creates a ClusterRole that allows the Kubernetes Operator to sign TLS certificates using the certificates.k8s.io API.
needsCAInfrastructure: true
デフォルト値はtrueです。
Operator.deployment_name
Kubernetes Operator コンテナの名前。
デフォルト値は mongodb-kubernetes-operator です。
operator: deployment_name: mongodb-kubernetes-operator
Operator.env
Kubernetes Operator 配置環境のラベル。 この値は、デフォルトのタイムアウトとログのレベルと形式に影響します。
値が の場合 | ログレベル は に設定されています | ログ形式 は に設定されています |
|---|---|---|
| debug | text |
| info | json |
デフォルト値はProdです。
operator: # Execution environment for the operator, dev or prod. # Use dev for more verbose logging env: prod
Operator.maxConcurrentReconsolves
Kubernetes Operator が実行できる同時調整の最大数。MaxConcurrentReconsolves を設定します。詳細については、Kubernetes Operator が複数のMongoDBレプリカセットを配置する を参照してください。
例
operator: # Control how many reconciles can be performed in parallel. # Increasing the number of concurrent reconciliations decreases the time needed to reconcile all watched resources, # but it might result in request load spikes and increased load on the Ops Manager API, and the Kubernetes API server generally. maxConcurrentReconciles: 10
オペレーター.mdbDefaultアーキテクチャ
すべての配置で使用されるコンテナ アーキテクチャを決定します。
実行時に MongoDB バイナリをダウンロードするデフォルトの非静的コンテナ、または
実行時に不変である静的コンテナ(パブリック プレビュー) 。
デフォルトは non-static です。
静的コンテナを有効にするには、 をstaticに設定します。
注意
この設定は、既存の配置を含むすべての配置に適用されます。単一配置で静的コンテナを有効にするには、代わりにmetadata.annotations.mongodb.com/v1.architecture MongoDB リソース で を使用します。
operator.mdbDefaultArchitecture: static
Operator.name
Kubernetes が Kubernetes Operator オブジェクトに割り当てる名前(配置、サービスアカウント、ロール、ポッドなど)。
この値は、Kubernetes Operator が配置されるコンテナ レジストリの名前にも対応します。
デフォルト値は mongodb-kubernetes-operator です。
operator: name: mongodb-kubernetes-operator
演算子.podSecurityContext
Kubernetes 演算子ポッドのセキュリティ コンテキストを設定します。ポッド セキュリティ コンテキストの詳細については、Kubernetesドキュメントをご覧ください。
operator: podSecurityContext: runAsUser: 2000 runAsNonRoot: true
注意
managedSecurityContext が true に設定されている場合、operator.podSecurityContext は使用されません。
Operator.securityContext
Kubernetes 演算子コンテナのセキュリティ コンテキストを設定します。コンテナのセキュリティコンテキストの詳細については、Kubernetes ドキュメントをご覧ください。
operator: securityContext: {} # Defaults to empty object
注意
managedSecurityContext が true に設定されている場合、operator.securityContext は使用されません。
オペレーター.テレメトリ
Kubernetes Operator が テレメトリ を収集して送信できるようにします。次の設定のデフォルトは true です。
operator: telemetry: # Enables telemetry. Setting this to "false" will stop all telemetry. enabled: true # Adds RBAC clusterRole for kube-system UID detection for the Kubernetes cluster UID. # Adds RBAC clusterRole for RBAC for nodes. We are listing exactly one node to detect the cluster provider (for example, eks). # Adds RBAC clusterRole for /version query for detecting Kubernetes server version. installClusterRole: true collection: # Controls how often the Kubernetes Operator collects and saves the data to the telemetry ConfigMap. It doesn't control whether this data is sent to MongoDB for analysis. # Valid time units for frequency are "m", or "h". Anything less than one minute defaults to 1h. frequency: 1h # Enables the Kubernetes Operator to collect and send cluster-level telemetry. # Note: the cluster UUID is unique but random and MongoDB has no way to map this to a customer. clusters: enabled: true # Enables the Kubernetes Operator to collect and send deployment-level telemetry. deployments: enabled: true # Enables the Kubernetes Operator to collect and send Kubernetes Operator-level telemetry. operators: enabled: true # Enables sending the collected telemetry to MongoDB. send: enabled: true # Controls how often the Kubernetes Operator sends the collected the data to MongoDB for analysis. # Valid time units are "h". Anything less than one hour defaults to 168h, which is one week. frequency: 168h
Operator.vaultSecretBackend.enabled
Kubernetes Operator が HashiCorp Vault にシークレットを保存するかどうかを決定します。詳しくは、シークレット ストレージ ツールの設定を参照してください。Vault で TLS を使用している場合は、 Operator.vaultSecretBackend.tlsSecretRef も指定する必要があります。
デフォルト値はfalseです。
operator: # Set the following setting to "true" so that the MongoDB Kubernetes Operator stores secrets in Vault. vaultSecretBackend: false
Operator.vaultSecretBackend.tlsSecretRef
Required if you are using TLS with Vault. The TLS secret used in your Vault configuration that contains a ca.crt entry. The content of the ca.crt entry must match the certificate of the CA used to generate the Vault TLS certificates. The Kubernetes Operator stores this TLS secret in its secret storage tool. To learn more, see Configure Secret Storage. Requires that operator.vaultSecretBackend.enabled is set to true.
operator: vaultSecretBackend: true tlsSecretRef: "vault-tls-secret"
Operator.version
配置する Kubernetes Operator のバージョン。
デフォルト値は 1.6.1 です。
operator: version: 1.6.1
Operator.watchNamespace
Kubernetes Operator がMongoDBリソースの変更を監視する名前空間。 この 名前空間の 場合 デフォルトとは異なります。Kubernetes Operator ServiceAccount がアクセスできること を確認します。 この名前空間。
To watch all namespaces, specify * and assign the ClusterRole to the
mongodb-kubernetes-operatorServiceAccount that you use to run the Kubernetes Operator.すべての 名前空間 のサブセットを監視するには、カンマ区切りのリストで指定し、各カンマをバックスラッシュでエスケープし、リストを引用符で囲みます(例:
"operator.watchNamespace=ns1\,ns2"。
名前空間のサブセットを監視すると、単一の Kubernetes Operator インスタンスが異なるクラスター リソース タイプを監視する配置に役立ちます。 たとえば、Kubernetes Operator を構成して、名前空間の 1 つのサブセット内のMongoDBリソースを監視し、名前空間の別のサブセット内のMongoDBMultiClusterリソースを監視するようにできます。 リソース調整中に競合状態を回避するには、Kubernetes Operator で監視するカスタム リソース タイプごとに、スコープを名前空間の個別のサブセットに設定していることを確認してください。
重要
MongoDB Ops ManagerとMongoDB リソースを、 Kubernetes Operator を配置した名前空間以外の 1 つ以上の名前空間に配置するには、使用する必要がある値と実行が必要になる追加の手順について、「 Kubernetes Operator 配置用のMongoDBコントロールのスコープの設定 」を参照してください。
デフォルト値は<metadata.namespace>です。
# Watch one namespace helm install mongodb-kubernetes-operator mongodb/mongodb-kubernetes \ --set operator.watchNamespace='namespace-to-watch' <...>
# Watch both namespace-a and namespace-b helm install mongodb-kubernetes-operator mongodb/mongodb-kubernetes \ --set operator.watchNamespace="namespace-a\,namespace-b"
# Operator with name `mongodb-kubernetes-operator-qa-envs` will # watch ns-dev, ns-qa and ns-uat namespaces helm install mongodb-kubernetes-operator-qa-envs mongodb/mongodb-kubernetes \ --set operator.watchNamespace="ns-dev\,ns-qa\,ns-uat"
# Operator with name `mongodb-kubernetes-operator-staging` will # watch ns-staging and ns-pre-prod helm install mongodb-kubernetes-operator-staging mongodb/mongodb-kubernetes --set operator.watchNamespace="ns-staging\,ns-pre-prod"
Operator.watchedResources
Kubernetes Operator が監視するカスタム リソース。
Kubernetes Operator は CustomResourceDefinitions をインストールします の と では、指定したリソースのみが監視されます。
Kubernetes 演算子は次の値を受け入れます。
値 | 説明 |
|---|---|
| データベース リソースの CustomResourceDefinitions をインストールし、それらのリソースを監視します。 |
| MongoDB ユーザー リソース用に CustomResourceDefinitions をインストールし、それらのリソースを監視します。 |
| MongoDB Ops Managerリソース用の CustomResourceDefinitions をインストールし、それらのリソースを監視します。 |
operator: watchedResources: - mongodbusers - mongodb - opsmanagers
opsManager.name
MongoDB Ops Managerイメージの名前。
デフォルト値はmongodb-enterprise-ops-managerです。
opsManager: name: mongodb-enterprise-ops-manager
registry.agent
URL for the Quay container registry for MongoDB images. The agent.name gets appended and sets the MDB_AGENT_IMAGE_REPOSITORY environment variable to the full URL from which the StatefulSet downloads the MongoDB Agent image for database deployments. To learn more, see Container Images.
デフォルト値はqui.io/mongodbです。
registry: agent: quay.io/mongodb/
registry.appDb
Kubernetes Operator が アプリケーション データベース イメージをダウンロードするリポジトリのURL 。
デフォルト値はqui.io/mongodbです。
registry: appDb: quay.io/mongodb
デフォルト値はregistry.connect.redhat.com/mongodbです。
registry: appDb: registry.connect.redhat.com/mongodb
registry.imagePullSecrets
secret これには、リポジトリからイメージをプルするのに必要な認証情報が含まれています。
重要
OpenShift では、この設定が必要です。 このファイルのimagePullSecrets設定で定義するか、 Helm を使用して Kubernetes Operator をインストールするときに渡します。 Kubernetes Operator を使用して MongoDB リソースを複数の名前空間またはクラスター全体の スコープで配置する場合は、Kubernetes Operator をインストールした名前空間にのみシークレットを作成します。 Kubernetes Operator は、監視対象のすべての名前空間にわたってシークレットを同期します。
registry: # Specify the secret in the ``imagePullSecrets`` setting. If you # use the MongoDB Kubernetes Operator to deploy MongoDB resources # into multiple namespaces, create the secret only in the namespace # where you installed the Operator. The Operator synchronizes # the secret across all watched namespaces. imagePullSecrets: <openshift-pull-secret>
registry.initAppDb
URL of the repository from which the initContainer image that contains the Application Database start-up scripts and the readiness probe is downloaded.
デフォルト値はqui.io/mongodbです。
registry: initAppDb: quay.io/mongodb
デフォルト値はregistry.connect.redhat.com/mongodbです。
registry: initAppDb: registry.connect.redhat.com/mongodb
registry.initOpsManager
URL of the repository from which the initContainer image that contains the Ops Manager start-up scripts and the readiness probe is downloaded.
デフォルト値はqui.io/mongodbです。
registry: initOpsManager: quay.io/mongodb
デフォルト値はregistry.connect.redhat.com/mongodbです。
registry: initOpsManager: registry.connect.redhat.com/mongodb
registry.operator
Kubernetes Operator イメージがプルされるリポジトリ。 プライベート リポジトリから Kubernetes Operator イメージをプルする場合は、この値を指定します。
デフォルト値はqui.io/mongodbです。
registry: operator: quay.io/mongodb
デフォルト値はregistry.connect.redhat.com/mongodbです。
registry: operator: registry.connect.redhat.com/mongodb
registry.opsManager
MongoDB Ops Manager リソース のイメージがダウンロードされるリポジトリの URL 。
デフォルト値はqui.io/mongodbです。
registry: opsManager: quay.io/mongodb
デフォルト値はregistry.connect.redhat.com/mongodbです。
registry: opsManager: registry.connect.redhat.com/mongodb
Operator.resources.requests
Kubernetes Operator の CPU およびメモリ消費制限 の仕様。
例
# operator cpu requests and limits resources: requests: cpu: 500m memory: 200Mi
Operator.resources.limit
Kubernetes Operator の CPU およびメモリ消費制限 の仕様。
例
# operator cpu requests and limits resources: limits: cpu: 1100m memory: 1Gi
Webhook. InstallClusterRole
Flag allows you to configure user validating admission webhooks for Kubernetes cluster roles .
配置で Kubernetes クラスター ロールが許可されていない場合は、このフラグをfalseに設定します。
デフォルト値はtrueです。
webhook: installClusterRole: false