Skip to content

Commit 29f4cd3

Browse files
(DOCSP-20622): deprecate old TLS settings (#826)
1 parent 0d29e97 commit 29f4cd3

23 files changed

+119
-198
lines changed

source/includes/admonitions/deprecate-secret-ref-name.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
and :opsmgrkube:`spec.security.tls.secretRef.name`
66
settings are deprecated.
77

8-
These fields will remain in future releases to maintain backwards
9-
compatibility.
8+
These fields will be removed in a future release.
109

1110
If you omit these settings,
1211
the |k8s-op-short| expects the secrets that contain your

source/includes/code-examples/yaml-files/example-replica-set.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,8 @@ spec:
410410
persistent: true
411411
security:
412412
tls:
413-
enabled: true
414413
ca: <custom-ca>
415-
secretRef:
416-
prefix: <prefix>
414+
certsSecretPrefix: <prefix>
417415
...
418416
END-tls-replset-full-custom
419417

@@ -438,10 +436,8 @@ END-tls-replset-upper-custom
438436
START-tls-replset-lower-custom
439437
security:
440438
tls:
441-
enabled: true
442439
ca: <custom-ca>
443-
secretRef:
444-
prefix: <prefix>
440+
certsSecretPrefix: <prefix>
445441
...
446442
END-tls-replset-lower-custom
447443

@@ -463,10 +459,8 @@ spec:
463459
persistent: true
464460
security:
465461
tls:
466-
enabled: true
467462
ca: <custom-ca>
468-
secretRef:
469-
prefix: <prefix>
463+
certsSecretPrefix: <prefix>
470464
authentication:
471465
enabled: true
472466
modes: ["X509"]
@@ -494,10 +488,8 @@ END-x509-client-replset-upper-custom
494488
START-x509-client-replset-lower-custom
495489
security:
496490
tls:
497-
enabled: true
498491
ca: <custom-ca>
499-
secretRef:
500-
prefix: <prefix>
492+
certsSecretPrefix: <prefix>
501493
authentication:
502494
enabled: true
503495
modes: ["X509"]
@@ -522,10 +514,8 @@ spec:
522514
persistent: true
523515
security:
524516
tls:
525-
enabled: true
526517
ca: <custom-ca>
527-
secretRef:
528-
prefix: <prefix>
518+
certsSecretPrefix: <prefix>
529519
authentication:
530520
enabled: true
531521
modes: ["X509"]
@@ -554,10 +544,8 @@ END-x509-internal-replset-upper-custom
554544
START-x509-internal-replset-lower-custom
555545
security:
556546
tls:
557-
enabled: true
558547
ca: <custom-ca>
559-
secretRef:
560-
prefix: <prefix>
548+
certsSecretPrefix: <prefix>
561549
authentication:
562550
enabled: true
563551
modes: ["X509"]

source/includes/code-examples/yaml-files/example-sharded-cluster.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -293,10 +293,8 @@ spec:
293293
persistent: true
294294
security:
295295
tls:
296-
enabled: true
297296
ca: <custom-ca>
298-
secretRef:
299-
prefix: <prefix>
297+
certsSecretPrefix: <prefix>
300298
...
301299
END-tls-sharded-full-custom
302300

@@ -324,10 +322,8 @@ END-tls-sharded-upper-custom
324322
START-tls-sharded-lower-custom
325323
security:
326324
tls:
327-
enabled: true
328325
ca: <custom-ca>
329-
secretRef:
330-
prefix: <prefix>
326+
certsSecretPrefix: <prefix>
331327
...
332328
END-tls-sharded-lower-custom
333329

@@ -352,10 +348,8 @@ spec:
352348
persistent: true
353349
security:
354350
tls:
355-
enabled: true
356351
ca: <custom-ca>
357-
secretRef:
358-
prefix: <prefix>
352+
certsSecretPrefix: <prefix>
359353
authentication:
360354
enabled: true
361355
modes: ["X509"]
@@ -386,10 +380,8 @@ END-x509-client-sharded-upper-custom
386380
START-x509-client-sharded-lower-custom
387381
security:
388382
tls:
389-
enabled: true
390383
ca: <custom-ca>
391-
secretRef:
392-
prefix: <prefix>
384+
certsSecretPrefix: <prefix>
393385
authentication:
394386
enabled: true
395387
modes: ["X509"]
@@ -417,10 +409,8 @@ spec:
417409
persistent: true
418410
security:
419411
tls:
420-
enabled: true
421412
ca: <custom-ca>
422-
secretRef:
423-
prefix: <prefix>
413+
certsSecretPrefix: <prefix>
424414
authentication:
425415
enabled: true
426416
modes: ["X509"]
@@ -452,10 +442,8 @@ END-x509-internal-sharded-upper-custom
452442
START-x509-internal-sharded-lower-custom
453443
security:
454444
tls:
455-
enabled: true
456445
ca: <custom-ca>
457-
secretRef:
458-
prefix: <prefix>
446+
certsSecretPrefix: <prefix>
459447
authentication:
460448
enabled: true
461449
modes: ["X509"]

source/includes/list-tables/resource-keys-external-access-sharded.rst

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@
1616
:k8sdocs:`NodePort service </concepts/services-networking/service/#nodeport>`.
1717
- ``true``
1818

19-
* - | ``spec.security``
20-
| :setting:`.tls.enabled<spec.security.tls.enabled>`
21-
- boolean
22-
- Optional
23-
- If this value is ``true``, |tls| is enabled on the MongoDB
24-
deployment.
25-
26-
By default, |k8s-op-short| requires hosts to use and
27-
accept |tls| encrypted connections.
28-
- ``true``
29-
3019
* - | ``spec.security.tls``
3120
| :setting:`.additionalCertificateDomains<spec.security.tls.additionalCertificateDomains>`
3221
- collection
@@ -37,3 +26,11 @@
3726
certificate includes a |san-dns| in the form ``<pod
3827
name>.<additional cert domain>``.
3928
- ``true``
29+
30+
* - | ``spec.security``
31+
| :setting:`.certsSecretPrefix<spec.security.certsSecretPrefix>`
32+
- string
33+
- Required
34+
- Add the ``<prefix>`` of the secret
35+
name that contains your MongoDB deployment's |tls| certificates.
36+
- ``devDb``

source/includes/list-tables/resource-keys-split-horizons.rst

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,6 @@
88
- Description
99
- Example
1010

11-
* - | ``spec.security.tls``
12-
| :setting:`.enabled<spec.security.tls.enabled>`
13-
- boolean
14-
- Optional
15-
- Set this value to ``true`` to enable |tls| on the MongoDB
16-
deployment.
17-
18-
By default, |k8s-op-short| requires hosts to use and accept
19-
|tls| encrypted connections.
20-
21-
.. note::
22-
23-
To connect to a replica set from outside |k8s|, set this
24-
value to ``true``.
25-
- ``true``
26-
2711
* - | ``spec.connectivity``
2812
| :setting:`.replicaSetHorizons<spec.connectivity.replicaSetHorizons>`
2913
- collection
@@ -45,7 +29,16 @@
4529
- Make sure that the number of entries in this array matches
4630
the value given in :setting:`spec.members`.
4731

48-
- Set the :setting:`spec.security.tls.enabled` to ``true`` to
49-
enable |tls|. This method to use split horizons requires
50-
the Server Name Indication extension of the |tls| protocol.
32+
- Provide a value for the
33+
:setting:`spec.security.certsSecretPrefix` setting to
34+
enable |tls|. This method to use split horizons requires the
35+
Server Name Indication extension of the |tls| protocol.
5136
- :setting:`See Setting<spec.connectivity.replicaSetHorizons>`
37+
38+
* - | ``spec.security``
39+
| :setting:`.tls.certsSecretPrefix<spec.security.tls.certsSecretPrefix>`
40+
- string
41+
- Required
42+
- Add the ``<prefix>`` of the secret
43+
name that contains your MongoDB deployment's |tls| certificates.
44+
- ``devDb``

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@
88
- Description
99
- Example
1010

11-
* - | ``spec.security``
12-
| :setting:`.tls.enabled<spec.security.tls.enabled>`
13-
- boolean
14-
- Required
15-
- If this value is ``true``, |tls| is enabled on the MongoDB
16-
deployment.
17-
18-
By default, |k8s-op-short| requires hosts to use and
19-
accept |tls| encrypted connections.
20-
- ``true``
21-
2211
* - | ``spec.security``
2312
| :setting:`.tls.ca<spec.security.tls.ca>`
2413
- string
@@ -28,9 +17,9 @@
2817
- ``<custom-ca>``
2918

3019
* - | ``spec.security``
31-
| :setting:`.tls.certsSecretPrefix<spec.security.tls.certsSecretPrefix>`
20+
| :setting:`.certsSecretPrefix<spec.security.certsSecretPrefix>`
3221
- string
33-
- Optional
34-
- If applicable, add the ``<prefix>`` of the secret
22+
- Required
23+
- Add the ``<prefix>`` of the secret
3524
name that contains your MongoDB deployment's |tls| certificates.
3625
- ``devDb``

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

Lines changed: 0 additions & 21 deletions
This file was deleted.

source/includes/options-k8s-replica-set.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,8 @@ description: |
679679
- Make sure that the number of entries in this array matches the
680680
value given in :setting:`spec.members`.
681681
682-
- Set the :setting:`spec.security.tls.enabled` to ``true`` to
682+
- Provide a value for the
683+
:setting:`spec.security.certsSecretPrefix` setting to
683684
enable |tls|. This method to use split horizons requires the
684685
Server Name Indication extension of the |tls| protocol.
685686

source/includes/options-k8s-shared.yaml

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,13 @@ directive: setting
566566
optional: true
567567
default: "``false``"
568568
description: |
569+
570+
.. important::
571+
572+
:setting:`spec.security.tls.enabled` is deprecated and will be
573+
removed in a future release. To enable |tls|, provide a value for
574+
the :setting:`spec.security.certsSecretPrefix` setting.
575+
569576
Encrypts communications using TLS certificates between:
570577
571578
- MongoDB hosts in a replica set or sharded cluster configuration
@@ -603,13 +610,6 @@ description: |
603610
- :setting:`spec.security.tls.secretRef.prefix`
604611
- :setting:`spec.security.certsSecretPrefix`
605612
606-
You must prefix your secrets with ``<metadata.name>`` if you omit all
607-
of the following settings:
608-
609-
- :setting:`spec.security.tls.secretRef.name`
610-
- :setting:`spec.security.tls.secretRef.prefix`
611-
- :setting:`spec.security.certsSecretPrefix`
612-
613613
To learn more about naming the secrets that contain your |tls|
614614
certificates, see the topic in :ref:`secure-tls` that applies to your
615615
deployment.
@@ -639,13 +639,6 @@ description: |
639639
- You set :setting:`spec.security.certsSecretPrefix` or :setting:`spec.security.tls.secretRef.prefix`
640640
- You omit :setting:`spec.security.tls.secretRef.name`.
641641
642-
You must prefix your secrets with ``<metadata.name>`` if you omit all
643-
of the following settings:
644-
645-
- :setting:`spec.security.tls.secretRef.name`
646-
- :setting:`spec.security.tls.secretRef.prefix`
647-
- :setting:`spec.security.certsSecretPrefix`
648-
649642
To learn more about naming the secrets that contain your |tls|
650643
certificates, see the topic in :ref:`secure-tls` that applies to your
651644
deployment.
@@ -675,13 +668,6 @@ description: |
675668
- You set :setting:`spec.security.certsSecretPrefix` or :setting:`spec.security.tls.secretRef.prefix`
676669
- You omit :setting:`spec.security.tls.secretRef.name`.
677670
678-
You must prefix your secrets with ``<metadata.name>`` if you omit all
679-
of the following settings:
680-
681-
- :setting:`spec.security.tls.secretRef.name`
682-
- :setting:`spec.security.tls.secretRef.prefix`
683-
- :setting:`spec.security.certsSecretPrefix`
684-
685671
To learn more about naming the secrets that contain your |tls|
686672
certificates, see the topic in :ref:`secure-tls` that applies to your
687673
deployment.
@@ -712,7 +698,8 @@ description: |
712698
value to ``["X509"]`` and specify the following settings:
713699
714700
- :setting:`spec.security.authentication.internalCluster` ``: "X509"``
715-
- :setting:`spec.security.tls.enabled` ``: true``
701+
- provide a value for the
702+
:setting:`spec.security.certsSecretPrefix` setting.`
716703
717704
If you provide more than one value for
718705
:setting:`spec.security.authentication.modes`, you must also specify a
@@ -751,8 +738,10 @@ default: "``false``"
751738
description: |
752739
753740
Specifies whether the MongoDB host requires clients to connect using a
754-
|tls| certificate. Defaults to ``true`` if
755-
:setting:`spec.security.tls.enabled` is ``true``.
741+
|tls| certificate. Defaults to ``true`` if you enable |tls|
742+
authentication.
743+
744+
To enable |tls| authentication, provide a value
756745
757746
---
758747
program: _shared
@@ -1269,7 +1258,7 @@ description: |
12691258
Requires that the following settings be specified:
12701259
12711260
- :setting:`spec.security.authentication.modes` ``: ["X509"]``
1272-
- :setting:`spec.security.tls.enabled` ``: true``
1261+
- :setting:`spec.security.certsSecretPrefix`
12731262
12741263
The |k8s-op-short| accepts the following values:
12751264

source/includes/steps-deploy-k8s-om-appdb-tls-custom.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ replacement:
4242
:lineno-start: 16
4343
:start-after: START-tls-replset-lower-custom
4444
:end-before: END-tls-replset-lower-custom
45-
:emphasize-lines: 1-4
4645
4746
---
4847
stepnum: 5

0 commit comments

Comments
 (0)