Skip to content

Commit 0c85305

Browse files
authored
(DOCSP-37583) Fix the vault settings (#1701)
* (DOCSP-37583) Fix the vault settings * (DOCSP-37583) Update Vault settings and add them to Helm reference
1 parent 451c292 commit 0c85305

File tree

3 files changed

+54
-11
lines changed

3 files changed

+54
-11
lines changed

source/includes/steps-use-vault.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ content: |
115115
116116
.. note::
117117
118-
If you installed the |k8s-op-short| using Helm, the |k8s-op-short| already
119-
added these annotations. You can proceed to the next step.
120-
118+
If you installed the |k8s-op-short| using Helm and set :ref:`operator.vaultSecretBackend.enabled <helm-vault-secret-enabled>`
119+
to ``true``, the |k8s-op-short| adds the following annotations. You can proceed to the next step.
120+
121121
.. code-block:: sh
122122
:emphasize-lines: 11-12
123123
@@ -134,8 +134,10 @@ content: |
134134
vault.hashicorp.com/agent-inject: "true"
135135
vault.hashicorp.com/role: "mongodbenterprise"
136136
137-
If you're running |vault-short| in |tls| mode, you must also add the following
138-
highlighted line to the file, replacing {TLSSecret} with the name of the secret
137+
If you're running |vault-short| in |tls| mode, and specified the
138+
:ref:`operator.vaultSecretBackend.tlsSecretRef <helm-vault-secret-ref>` value,
139+
the |k8s-op-short| adds the following annotations. Otherwise, add the following
140+
highlighted line to the file, replacing ``{TLSSecret}`` with the name of the secret
139141
containing a ``ca.crt`` entry. The content of the ``ca.crt`` entry must match
140142
the certificate of the |certauth| used to generate the |vault-short| TLS certificates.
141143

source/reference/helm-operator-settings.txt

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,9 @@ namespace
290290
needsCAInfrastructure
291291
---------------------
292292

293-
Flag that determines whether |k8s| creates a |k8s-cr| that allows the
294-
|k8s-op-short| to sign |tls| certificates using the
295-
:k8sdocs:`certificates.k8s.io </tasks/tls/managing-tls-in-a-cluster/>`
296-
API.
293+
Determines whether |k8s| creates a |k8s-cr| that allows the |k8s-op-short|
294+
to sign |tls| certificates using
295+
the :k8sdocs:`certificates.k8s.io </tasks/tls/managing-tls-in-a-cluster/>` API.
297296

298297
.. example::
299298

@@ -376,6 +375,48 @@ The default value is **mongodb-enterprise-operator**.
376375
operator:
377376
name: mongodb-enterprise-operator
378377

378+
.. _helm-vault-secret-enabled:
379+
380+
operator.vaultSecretBackend.enabled
381+
------------------------------------
382+
383+
Determines whether the |k8s-op-short| stores secrets in |hashicorp-vault|.
384+
To learn more, see :ref:`k8s-set-secret-storage-tool`.
385+
If you are using |tls| with |vault-short|, you must also specify
386+
:ref:`operator.vaultSecretBackend.tlsSecretRef <helm-vault-secret-ref>`.
387+
388+
The default value is **false**.
389+
390+
.. example::
391+
392+
.. code-block:: yaml
393+
394+
operator:
395+
# Set the following setting to "true" so that the MongoDB Kubernetes Operator stores secrets in Vault.
396+
vaultSecretBackend: false
397+
398+
.. _helm-vault-secret-ref:
399+
400+
operator.vaultSecretBackend.tlsSecretRef
401+
----------------------------------------
402+
403+
Required if you are using |tls| with |vault-short|. The TLS secret used in
404+
your |vault-short| configuration that contains a ``ca.crt`` entry.
405+
The content of the ``ca.crt`` entry must match the certificate of
406+
the |certauth| used to generate the |vault-short| TLS certificates.
407+
The |k8s-op-short| stores this TLS secret in its |secret-store|.
408+
To learn more, see :ref:`Configure Secret Storage <k8s-set-secret-storage-tool>`.
409+
Requires that :ref:`operator.vaultSecretBackend.enabled <helm-vault-secret-enabled>`
410+
is set to ``true``.
411+
412+
.. example::
413+
414+
.. code-block:: yaml
415+
416+
operator:
417+
vaultSecretBackend: true
418+
tlsSecretRef: "vault-tls-secret"
419+
379420
operator.version
380421
----------------
381422

@@ -640,4 +681,4 @@ The default value is **true**.
640681

641682
.. code-block:: yaml
642683

643-
subresourceEnabled: true
684+
subresourceEnabled: true

source/tutorial/create-vault-secret.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _create-vault-secret:
22

33
=========================================
4-
Create Secrets in |hashicorp-vault|
4+
Create Secrets in |vault-short|
55
=========================================
66

77
.. default-domain:: mongodb

0 commit comments

Comments
 (0)