Skip to content

Commit 4965b03

Browse files
corryrootjwilliams-mongo
authored andcommitted
(DOCSP-27430): Fixed cert-manager setup issues. (#1244)
* (DOCSP-27430): Fixed cert-manager setup issues. * (DOCSP-27430): Incorporated Nam's feedback. * (DOCSP-27430): Incorporated Will's feedback.
1 parent ee6dcf7 commit 4965b03

File tree

4 files changed

+69
-28
lines changed

4 files changed

+69
-28
lines changed

source/includes/fact-issuerRef.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. note::
2+
3+
The ``spec.issuerRef.name`` parameter references the previously
4+
created |certauth| ConfigMap.
5+

source/includes/steps-configure-cert-manager-integration.yaml

Lines changed: 61 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
title: "Configure a cert-manager |certauth| issuer"
1+
stepnum: 1
2+
title: "Create a |certauth| secret."
23
level: 4
3-
ref: configure-cert-manager-issuer
4+
ref: create-cert-auth-secret
45
content: |
56
67
.. note::
@@ -9,20 +10,37 @@ content: |
910
|certauth| along with the corresponding ``tls.key`` private key
1011
and ``tls.crt`` signed certificate.
1112
12-
1. Create a secret to store your |certauth| data:
13+
Create a secret to store your |certauth| data:
1314
14-
.. code-block:: yaml
15+
.. code-block:: yaml
1516
16-
apiVersion: v1
17-
kind: Secret
18-
metadata:
19-
name: ca-key-pair
20-
namespace: <namespace>
21-
data:
22-
tls.crt: <your-CA-certificate>
23-
tls.key: <your-CA-private-key>
17+
apiVersion: v1
18+
kind: Secret
19+
metadata:
20+
name: ca-key-pair
21+
namespace: <namespace>
22+
data:
23+
tls.crt: <your-CA-certificate>
24+
tls.key: <your-CA-private-key>
25+
26+
---
27+
28+
stepnum: 2
29+
ref: validate-tls-cert-for-cert-manager
30+
level: 4
31+
source:
32+
file: steps-deploy-k8s-opsmgr-https.yaml
33+
ref: validate-tls-cert
34+
35+
---
36+
37+
stepnum: 3
38+
title: "Configure a cert-manager |certauth| issuer"
39+
level: 4
40+
ref: configure-cert-manager-issuer
41+
content: |
2442
25-
#. Create a |certauth| issuer that references this secret:
43+
a. Create a |certauth| issuer that references your |certauth| secret:
2644
2745
.. code-block:: yaml
2846
@@ -45,6 +63,7 @@ content: |
4563
4664
---
4765

66+
stepnum: 4
4867
title: "Create a |certauth| ConfigMap"
4968
level: 4
5069
ref: create-ca-config-map
@@ -56,11 +75,12 @@ content: |
5675
5776
.. code-block:: sh
5877
59-
kubectl create cm issuer-ca --from-literal=ca-pem=<CA-certificate> \
78+
kubectl create cm ca-issuer --from-literal=ca-pem=<CA-certificate> \
6079
--from-literal=mms-ca.crt=<CA-certificate>
6180
6281
---
6382

83+
stepnum: 5
6484
title: "Create certificates for your MongoDB resources"
6585
level: 4
6686
ref: create-cert-manager-certificate
@@ -70,9 +90,11 @@ content: |
7090
must create certificates for both the resource itself and the MongoDB
7191
agent.
7292
73-
1. Create the MongoDB resource certificate. The following example
93+
a. Create the MongoDB resource certificate. The following example
7494
assumes a replica set named `my-replica-set` with three members:
7595
96+
.. include:: /includes/fact-issuerRef.rst
97+
7698
.. code-block:: yaml
7799
78100
apiVersion: cert-manager.io/v1
@@ -92,17 +114,19 @@ content: |
92114
issuerRef:
93115
name: ca-issuer
94116
renewBefore: 120h0m0s
95-
secretName: mdb-my-replica-set-cert
117+
secretName: mdb-my-replica-set-agent-certs
96118
usages:
97119
- server auth
98120
- client auth
99121
100-
For sharded clusters, you must create one certificate for each
101-
statefulset. To learn more about sharded cluster configuration, see
102-
:ref:`deploy-sharded-cluster`.
122+
For sharded clusters, you must create one certificate for each
123+
|k8s-statefulset|. To learn more about sharded cluster
124+
configuration, see :ref:`deploy-sharded-cluster`.
103125
104126
#. Create the MongoDB agent certificate:
105127
128+
.. include:: /includes/fact-issuerRef.rst
129+
106130
.. code-block:: yaml
107131
108132
apiVersion: cert-manager.io/v1
@@ -137,6 +161,11 @@ content: |
137161
138162
#. Create the MongoDB resource:
139163
164+
.. note::
165+
166+
If you leave the :opsmgrkube:`spec.security.tls.ca`
167+
parameter unspecified, it defaults to ``{replica-set}-ca``.
168+
140169
.. code-block:: yaml
141170
142171
apiVersion: mongodb.com/v1
@@ -161,12 +190,13 @@ content: |
161190
enabled: true
162191
modes:
163192
- X509
164-
tls:
165-
ca: issuer-ca
166-
enabled: true
193+
tls:
194+
ca: ca-issuer
195+
enabled: true
167196
168197
---
169198

199+
stepnum: 6
170200
title: "Create certificates for |onprem| and AppDB with TLS"
171201
level: 4
172202
ref: create-om-appdb-tls-certs
@@ -175,7 +205,9 @@ content: |
175205
To secure an |onprem| resource, you must first create certificates
176206
for |onprem| and AppDB, then create the |onprem| resource.
177207
178-
1. Create the Ops Manager certificate:
208+
a. Create the Ops Manager certificate:
209+
210+
.. include:: /includes/fact-issuerRef.rst
179211
180212
.. code-block:: yaml
181213
@@ -191,13 +223,15 @@ content: |
191223
issuerRef:
192224
name: ca-issuer
193225
renewBefore: 120h0m0s
194-
secretName: mdb-op-with-https-cert
226+
secretName: mdb-om-with-https-cert
195227
usages:
196228
- server auth
197229
- client auth
198230
199231
#. Create the AppDB certificate:
200232
233+
.. include:: /includes/fact-issuerRef.rst
234+
201235
.. code-block:: yaml
202236
203237
apiVersion: cert-manager.io/v1
@@ -238,10 +272,10 @@ content: |
238272
security:
239273
certsSecretPrefix: appdb
240274
tls:
241-
ca: issuer-ca
242-
version: 4.4.0-ent
275+
ca: ca-issuer
276+
version: 6.0.0
243277
replicas: 1
244278
security:
245279
certsSecretPrefix: mdb
246280
tls:
247-
ca: issuer-ca
281+
ca: ca-issuer

source/includes/steps-multi-cluster-enable-split-horizon.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ content: |
136136
security:
137137
certsSecretPrefix: clustercert
138138
tls:
139-
ca: issuer-ca
139+
ca: ca-issuer
140140
type: ReplicaSet
141141
version: 4.4.0-ent"
142142

source/tutorial/deploy-om-container.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ your |onprem| and application database connections with |tls|.
6363

6464
.. include:: /includes/deploy-om-prereqs.rst
6565

66+
.. _deploy-om-container-procedure:
67+
6668
Procedure
6769
---------
6870

0 commit comments

Comments
 (0)