Skip to content

Commit 0738451

Browse files
corryrootjwilliams-mongo
authored andcommitted
(DOCSP-21338): Added prefix example. (#870)
* (DOCSP-21338): Added prefix example. * (DOCSP-21338): Incorporated JW's feedback. * (DOCSP-21338): Incorporated Brett's feedback.
1 parent 2d94f9d commit 0738451

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. example::
2+
3+
If you call your deployment ``my-replica-set`` and you set the
4+
prefix to ``mdb``, you must name the |tls| secret for the
5+
client |tls| communications ``mdb-my-replica-set-cert``. Also,
6+
you must name the |tls| secret for internal cluster authentication
7+
(if enabled) ``mdb-my-replica-set-clusterfile``.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
You must prefix your secrets with ``<prefix>-<metadata.name>`` if both
2+
of the following items are true:
3+
4+
- You set :setting:`spec.security.certsSecretPrefix` or
5+
:setting:`spec.security.tls.secretRef.prefix`
6+
- You omit :setting:`spec.security.tls.secretRef.name`.

source/includes/list-tables/resource-keys-tls-custom-ca.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@
2222
- Required
2323
- Add the ``<prefix>`` of the secret
2424
name that contains your MongoDB deployment's |tls| certificates.
25+
26+
.. include:: /includes/fact-example-secret-prefix-cluster-file.rst
27+
2528
- ``devDb``

source/includes/options-k8s-shared.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,11 +662,9 @@ description: |
662662
- :setting:`spec.security.tls.secretRef.name`
663663
- :setting:`spec.security.tls.secretRef.prefix`
664664
665-
You must prefix your secrets with ``<prefix>-<metadata.name>`` if both
666-
of the following items are true:
665+
.. include:: /includes/fact-req-secret-prefix.rst
667666
668-
- You set :setting:`spec.security.certsSecretPrefix` or :setting:`spec.security.tls.secretRef.prefix`
669-
- You omit :setting:`spec.security.tls.secretRef.name`.
667+
.. include:: /includes/fact-example-secret-prefix-cluster-file.rst
670668
671669
To learn more about naming the secrets that contain your |tls|
672670
certificates, see the topic in :ref:`secure-tls` that applies to your

source/includes/steps-source-deploy-k8s-resource.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,12 @@ content: |
374374
--cert=<replica-set-tls-cert> \
375375
--key=<replica-set-tls-key>
376376
377+
.. note::
378+
379+
.. include:: /includes/fact-req-secret-prefix.rst
380+
381+
.. include:: /includes/fact-example-secret-prefix-cluster-file.rst
382+
377383
.. include:: /includes/facts/fact-if-use-vault.rst
378384
379385
.. include:: /includes/facts/fact-learn-more-secret-storage.rst
@@ -455,6 +461,12 @@ content: |
455461
--cert=<replica-set-clusterfile-tls-cert> \
456462
--key=<replica-set-clusterfile-tls-key>
457463
464+
.. note::
465+
466+
.. include:: /includes/fact-req-secret-prefix.rst
467+
468+
.. include:: /includes/fact-example-secret-prefix-cluster-file.rst
469+
458470
---
459471
title: "Renew the |k8s-secret| for your X.509 certificate."
460472
stepnum: 0

0 commit comments

Comments
 (0)