Skip to content

Commit 2380a93

Browse files
(DOCSP-18203): fix prefix tls setting (#737)
1 parent cb236fd commit 2380a93

File tree

6 files changed

+65
-43
lines changed

6 files changed

+65
-43
lines changed
Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
11
.. important:: Deprecation Notice
22

3-
The :opsmgrkube:`spec.security.tls.secretRef.name` field is deprecated
4-
for the MongoDB resources and for the application database in the
5-
|onprem| resources. You can continue using :opsmgrkube:`spec.security.tls.secretRef.name`
3+
The :setting:`spec.security.tls.secretRef.name`
4+
and
5+
:opsmgrkube:`spec.applicationDatabase.security.tls.secretRef.name`
6+
fields are deprecated for the MongoDB resources and for the
7+
application database in the |onprem| resources. You can continue
8+
using :opsmgrkube:`spec.security.tls.secretRef.name`
69
for the |onprem| resources other than the application database.
710

811
This field will remain in future releases to maintain backwards
9-
compatibility. Instead of the deprecated field, use:
12+
compatibility.
1013

11-
- :opsmgrkube:`spec.applicationDatabase.security.tls.secretRef.prefix`,
12-
for the application database in your |onprem| resources.
13-
- :setting:`spec.security.tls.secretRef.prefix`, for MongoDB resources.
14+
If you omit
15+
:opsmgrkube:`spec.applicationDatabase.security.tls.secretRef.name`,
16+
the |k8s-op-short| expects the secrets that contain your
17+
|tls| certificates for database resources to follow this naming
18+
convention: ``<metadata.name>-cert``, where ``<metadata.name>``
19+
specifies the name of one of the following resources:
1420

15-
21+
- |onprem| resource for application database deployments
22+
- Database resource for other database deployments
23+
24+
For information about pre-pending an optional prefix to the secret
25+
name, see:
26+
27+
- :opsmgrkube:`spec.applicationDatabase.security.tls.secretRef.prefix`
28+
for the application database in your |onprem| resources.
29+
- :setting:`spec.security.tls.secretRef.prefix` for MongoDB resources.

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@
3232
- string
3333
- Optional
3434
- Add the ``<prefix>`` of the |k8s| |k8s-secret| name that contains
35-
your MongoDB deployment's |tls| certificates. If you omit this
36-
setting, the prefix defaults to the value of
37-
:setting:`metadata.name` of your MongoDB resource.
38-
- ``<prefix>``
35+
your MongoDB deployment's |tls| certificates. If you omit
36+
:setting:`spec.security.tls.secretRef.name` and you configure
37+
:setting:`spec.security.tls.secretRef.prefix`, you must name the
38+
secret ``<prefix>-<metadata.name>-cert``.
39+
40+
If you omit :setting:`spec.security.tls.secretRef.name` and
41+
:setting:`spec.security.tls.secretRef.prefix`, you must name the
42+
secret ``<metadata.name>-cert``.
43+
- ``devDb``

source/includes/options-k8s-shared.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ type: string
577577
directive: setting
578578
optional: true
579579
description: |
580-
Deprecated. Use :setting:`spec.security.tls.secretRef.prefix` instead.
580+
Deprecated. See :setting:`spec.security.tls.secretRef.prefix`.
581581
Provide the name of the |k8s| |k8s-secret| you created that contains
582582
your MongoDB deployment's |tls| certificates.
583583
---
@@ -589,10 +589,10 @@ optional: true
589589
description: |
590590
Provide the ``<prefix>`` of the |k8s| |k8s-secret| name that you
591591
created that contains your MongoDB deployment's |tls| certificates.
592-
The full |k8s-secret| name has the following format:
593-
``<prefix>-cert``. If you omit this setting, the prefix
594-
defaults to the value of :setting:`metadata.name` of your
595-
|k8s-mdbrsc|.
592+
When you use this option, the full |k8s-secret| name has the following
593+
format: ``<prefix>-<metadata.name>-cert``. If you omit this setting
594+
and you omit :setting:`spec.security.tls.secretRef.name`,
595+
you must name the secret ``<metadata.name>-cert``.
596596
---
597597
program: _shared
598598
name: spec.security.authentication

source/includes/steps-deploy-k8s-opsmgr-https.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ content: |
6666
6767
.. code-block:: sh
6868
69-
openssl s_client -showcerts -verify 2 \
70-
-connect downloads.mongodb.com:443 -servername downloads.mongodb.com < /dev/null \
69+
openssl s_client -showcerts -verify 2 \
70+
-connect downloads.mongodb.com:443 -servername downloads.mongodb.com < /dev/null \
7171
| awk '/BEGIN/,/END/{ if(/BEGIN/){a++}; out="cert"a".crt"; print >out}'
7272
7373
#. Concatenate your |certauth|\'s certificate file with the
@@ -97,7 +97,7 @@ content: |
9797
.. literalinclude:: /reference/k8s/example-opsmgr-https.yaml
9898
:language: yaml
9999
:linenos:
100-
:emphasize-lines: 5,7-11,14-20,21-38
100+
:emphasize-lines: 5,7-11,14-20,21-39
101101
102102
---
103103
title: "Open your preferred text editor and paste the |k8s-obj| specification into a new text file."
@@ -309,13 +309,13 @@ content: |
309309
- Name of the MongoDB database resource for the oplog store.
310310
- ``my-oplog-db``
311311
312-
You must also configure an :term:`S3 snapshot store <s3 snapshot store>`
312+
You must also configure an :term:`S3 snapshot store <s3 snapshot store>`
313313
or a :term:`blockstore <Backup Blockstore Database>`.
314314
315315
.. note::
316316
317317
If you deploy both an :term:`S3 snapshot store <s3 snapshot store>`
318-
and a :term:`blockstore <Backup Blockstore Database>`, |onprem|
318+
and a :term:`blockstore <Backup Blockstore Database>`, |onprem|
319319
randomly choses one to use for Backup.
320320
321321
To configure a snapshot store, configure the following settings:
@@ -393,8 +393,8 @@ content: |
393393
| ``.mongodbResourceRef``
394394
| ``.``:opsmgrkube:`~spec.backup.blockStores.mongodbResourceRef.name`
395395
- string
396-
- Name of the MongoDB database resource that you create for the
397-
blockstore. You must deploy this database resource in the same
396+
- Name of the MongoDB database resource that you create for the
397+
blockstore. You must deploy this database resource in the same
398398
namespace as the |onprem| resource.
399399
- ``my-mongodb-blockstore``
400400
@@ -406,7 +406,7 @@ optional: true
406406
ref: add-k8s-values
407407
content: |
408408
409-
Add any :ref:`optional settings <optional-om-k8s-settings>` that you
409+
Add any :ref:`optional settings <optional-om-k8s-settings>` that you
410410
want to apply to your deployment to the |k8s-obj| specification file.
411411
---
412412
title: "Save this file with a ``.yaml`` file extension."
@@ -466,10 +466,10 @@ content: |
466466
#. |onprem|.
467467
#. Backup.
468468
469-
The |k8s-op-short| doesn't reconcile a resource until the preceding
469+
The |k8s-op-short| doesn't reconcile a resource until the preceding
470470
one enters the ``Running`` phase.
471471
472-
After the |onprem| resource completes the ``Reconciling`` phase, the
472+
After the |onprem| resource completes the ``Reconciling`` phase, the
473473
command returns the following output under the ``status`` field if you
474474
enabled backup:
475475
@@ -485,7 +485,7 @@ content: |
485485
version: "4.2.0"
486486
backup:
487487
lastTransition: "2020-04-01T09:57:42Z"
488-
message: The MongoDB object <namespace>/<oplogresourcename>
488+
message: The MongoDB object <namespace>/<oplogresourcename>
489489
doesn't exist
490490
phase: Pending
491491
opsManager:
@@ -495,7 +495,7 @@ content: |
495495
url: http://om-svc.cloudqa.svc.cluster.local:8443
496496
version: "5.0.0"
497497
498-
Backup remains in a ``Pending`` state until you configure the Backup
498+
Backup remains in a ``Pending`` state until you configure the Backup
499499
databases.
500500
501501
.. tip::
@@ -525,7 +525,7 @@ content: |
525525
url: http://om-svc.dev.svc.cluster.local:8443
526526
version: ""
527527
528-
Backup remains in a ``Pending`` state until you configure the Backup
528+
Backup remains in a ``Pending`` state until you configure the Backup
529529
databases.
530530
531531
.. tip::
@@ -613,7 +613,7 @@ content: |
613613
:ref:`create-k8s-project` page.
614614
615615
Set the following fields in your project ConfigMap:
616-
616+
617617
- Set ``data.baseUrl`` in the ConfigMap to the |application|\'s |url|.
618618
To find this |url|, invoke the following command:
619619
@@ -687,7 +687,7 @@ content: |
687687
.. note::
688688
689689
Create the |s3| snapshot store as a replica set.
690-
690+
691691
Match the ``metadata.name`` of the resource to the
692692
:opsmgrkube:`spec.backup.s3Stores.mongodbResourceRef.name`
693693
that you specified in your |onprem| resource definition.

source/reference/k8s-operator-om-specification.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ Optional |onprem| Resource Settings
197197
- |onprem| uses to communicate with the application database replica
198198
set.
199199

200-
.. include:: /includes/admonitions/warning-concatenate-download-certs.rst
200+
.. include:: /includes/admonitions/warning-concatenate-download-certs.rst
201201

202202
.. opsmgrkube:: spec.applicationDatabase.security.tls.secretRef.name
203203

@@ -214,9 +214,12 @@ Optional |onprem| Resource Settings
214214

215215
The ``<prefix>`` of the |k8s| |k8s-secret| name that you created that
216216
contains your application database's |tls| certificates. The full
217-
|k8s-secret| name has the following format: ``<prefix>-cert``. If you
218-
omit the prefix, this setting defaults to the value of
219-
:setting:`metadata.name` of your application database |onprem| resource.
217+
|k8s-secret| name has the following format:
218+
``<prefix>-<metadata.name>-cert``, where ``<metadata.name>`` is the
219+
name of your |onprem| resource. If you
220+
omit this setting and you omit
221+
:opsmgrkube:`spec.applicationDatabase.security.tls.secretRef.name`,
222+
you must name the secret ``<metadata.name>-cert``.
220223

221224
To learn how to configure your |onprem| instance to run over
222225
|https|, see :ref:`deploy-om-container`.

source/reference/k8s/example-opsmgr-https.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
security:
1616
tls:
1717
ca: <om-http-cert-ca> # Optional. Name of the ConfigMap file
18-
# containing the certicate authority that
18+
# containing the certificate authority that
1919
# signs the certificates used by the Ops
2020
# Manager custom resource.
2121
secretRef:
@@ -28,13 +28,13 @@ spec:
2828
security:
2929
tls:
3030
ca: <om-http-cert-ca> # Optional. Name of the ConfigMap file
31-
# containing the certicate authority that
31+
# containing the certificate authority that
3232
# signs the certificates that the application
3333
# database uses.
3434
secretRef:
35-
prefix: <prefix> # Optional. The <prefix> of the Kubernetes
36-
# secret's name. If you omit the prefix, it
37-
# defaults to the value of metadata.name for
38-
# the Ops Manager custom resource.
39-
35+
prefix: <prefix> # Optional. The <prefix> to prepend to the Kubernetes
36+
# secret's name: <prefix>-<metadata.name>-cert. If you omit this setting,
37+
# you must name the secret <metadata.name>-cert,
38+
# where <metadata.name> is the name of the
39+
# Ops Manager resource.
4040
...

0 commit comments

Comments
 (0)