Skip to content

Commit e1f46d6

Browse files
Tony Sansonejwilliams-mongo
authored andcommitted
Updated per @jwilliams-mongo review 2.
1 parent 21ed910 commit e1f46d6

13 files changed

+544
-166
lines changed

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

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,9 @@ spec:
278278
enabled: true
279279
connectivity:
280280
replicaSetHorizons:
281-
- "example-localhost": "repl-0-svc.dev.svc.cluster.local:27017"
282-
"example-website": "web1.example.com:27017"
283-
- "example-localhost": "repl-1-svc.dev.svc.cluster.local:27017"
284-
"example-website": "web2.example.com:27017"
285-
- "example-localhost": "repl-2-svc.dev.svc.cluster.local:27017"
286-
"example-website": "web3.example.com:27017"
281+
- "example-website": "web1.example.com:27017"
282+
- "example-website": "web2.example.com:27017"
283+
- "example-website": "web3.example.com:27017"
287284
...
288285
END-horizon-replset
289286

@@ -310,12 +307,9 @@ START-horizon-replset-lower
310307
enabled: true
311308
connectivity:
312309
replicaSetHorizons:
313-
- "example-localhost": "repl-0-svc.dev.svc.cluster.local:27017"
314-
"example-website": "web1.example.com:27017"
315-
- "example-localhost": "repl-1-svc.dev.svc.cluster.local:27017"
316-
"example-website": "web2.example.com:27017"
317-
- "example-localhost": "repl-2-svc.dev.svc.cluster.local:27017"
318-
"example-website": "web3.example.com:27017"
310+
- "example-website": "web1.example.com:27017"
311+
- "example-website": "web2.example.com:27017"
312+
- "example-website": "web3.example.com:27017"
319313
END-horizon-replset-lower
320314

321315
START-horizon-addcert-replset

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

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,84 @@ spec:
291291
persistent: true
292292
...
293293
END-scaled-sharded
294+
295+
START-exposed-sharded-full
296+
---
297+
apiVersion: mongodb.com/v1
298+
kind: MongoDB
299+
metadata:
300+
name: <my-sharded-cluster>
301+
spec:
302+
version: 4.2.1
303+
opsManager:
304+
configMapRef:
305+
name: <configMap.metadata.name>
306+
# Must match metadata.name in ConfigMap file
307+
shardCount: 2
308+
mongodsPerShardCount: 3
309+
mongosCount: 2
310+
configServerCount: 3
311+
credentials: my-secret
312+
type: ShardedCluster
313+
persistent: true
314+
exposedExternally: true
315+
...
316+
END-exposed-sharded-full
317+
318+
START-exposed-sharded-upper
319+
---
320+
apiVersion: mongodb.com/v1
321+
kind: MongoDB
322+
metadata:
323+
name: <my-sharded-cluster>
324+
spec:
325+
version: 4.2.1
326+
opsManager:
327+
configMapRef:
328+
name: <configMap.metadata.name>
329+
# Must match metadata.name in ConfigMap file
330+
shardCount: 2
331+
mongodsPerShardCount: 3
332+
mongosCount: 2
333+
configServerCount: 3
334+
credentials: my-secret
335+
type: ShardedCluster
336+
persistent: true
337+
END-exposed-sharded-upper
338+
339+
START-exposed-sharded-lower
340+
exposedExternally: true
341+
...
342+
END-exposed-sharded-lower
343+
344+
START-exposed-sharded-tls-upper
345+
---
346+
apiVersion: mongodb.com/v1
347+
kind: MongoDB
348+
metadata:
349+
name: <my-sharded-cluster>
350+
spec:
351+
version: 4.2.1
352+
opsManager:
353+
configMapRef:
354+
name: <configMap.metadata.name>
355+
# Must match metadata.name in ConfigMap file
356+
shardCount: 2
357+
mongodsPerShardCount: 3
358+
mongosCount: 2
359+
configServerCount: 3
360+
credentials: my-secret
361+
type: ShardedCluster
362+
persistent: true
363+
END-exposed-sharded-tls-upper
364+
365+
START-exposed-sharded-tls-lower
366+
exposedExternally: true
367+
security:
368+
tls:
369+
enabled: true
370+
additionalCertificateDomains:
371+
- "additional-cert-test.com"
372+
...
373+
END-exposed-sharded-tls-lower
374+

source/includes/code-examples/yaml-files/example-standalone.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,44 @@ spec:
1515
persistent: true
1616
...
1717
END-regular-standalone
18+
19+
START-standalone-exposed-full
20+
---
21+
apiVersion: mongodb.com/v1
22+
kind: MongoDB
23+
metadata:
24+
name: <my-standalone>
25+
spec:
26+
version: 4.2.1
27+
opsManager:
28+
configMapRef:
29+
name: <configMap.metadata.name>
30+
# Must match metadata.name in ConfigMap file
31+
credentials: <mycredentials>
32+
type: Standalone
33+
persistent: true
34+
exposedExternally: true
35+
...
36+
END-standalone-exposed-full
37+
38+
START-standalone-exposed-upper
39+
---
40+
apiVersion: mongodb.com/v1
41+
kind: MongoDB
42+
metadata:
43+
name: <my-standalone>
44+
spec:
45+
version: 4.2.1
46+
opsManager:
47+
configMapRef:
48+
name: <configMap.metadata.name>
49+
# Must match metadata.name in ConfigMap file
50+
credentials: <mycredentials>
51+
type: Standalone
52+
persistent: true
53+
END-standalone-exposed-upper
54+
55+
START-standalone-exposed-lower
56+
exposedExternally: true
57+
...
58+
END-standalone-exposed-lower
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. list-table::
2+
:widths: 20 10 10 40 20
3+
:header-rows: 1
4+
5+
* - Key
6+
- Type
7+
- Necessity
8+
- Description
9+
- Example
10+
11+
* - :setting:`spec.exposedExternally`
12+
- Boolean
13+
- Optional
14+
- Set this value to ``true`` to allow external services to connect
15+
to the MongoDB deployment. This results in |k8s| creating a
16+
:k8sdocs:`NodePort service </concepts/services-networking/service/#nodeport>`.
17+
- ``true``
18+
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+
30+
* - | ``spec.security.tls``
31+
| :setting:`.additionalCertificateDomains<spec.security.tls.additionalCertificateDomains>`
32+
- collection
33+
- Optional
34+
- List of every domain that should be added to |tls| certificates
35+
to each pod in this deployment. When you set this parameter,
36+
every |csr| that the |k8s-op-short| transforms into a |tls|
37+
certificate includes a |san-dns| in the form ``<pod
38+
name>.<additional cert domain>``.
39+
- ``true``
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. list-table::
2+
:widths: 20 10 10 40 20
3+
:header-rows: 1
4+
5+
* - Key
6+
- Type
7+
- Necessity
8+
- Description
9+
- Example
10+
11+
* - :setting:`spec.exposedExternally`
12+
- Boolean
13+
- Optional
14+
- Set this value to ``true`` to allow external services to connect
15+
to the MongoDB deployment. This results in |k8s| creating a
16+
:k8sdocs:`NodePort service </concepts/services-networking/service/#nodeport>`.
17+
- ``true``

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
- ``true``
2626

2727
* - | ``spec.connectivity``
28-
| ``.replicaSetHorizons``
28+
| :setting:`.replicaSetHorizons<spec.connectivity.replicaSetHorizons>`
2929
- collection
3030
- Conditional
3131
- Add this parameter and values if you need your database to be

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
| :setting:`.tls.enabled<spec.security.tls.enabled>`
1313
- boolean
1414
- Optional
15-
- If this value is ``true``, |tls| is enabled on the MongoDB
15+
- Set this value to ``true`` to enable |tls| on the MongoDB
1616
deployment.
1717

1818
By default, |k8s-op-short| requires hosts to use and

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ description: |
376376
horizon |dns| for replica set members. This feature allows
377377
communication both within the |k8s| cluster and from outside |k8s|.
378378
379-
You may add multiple external mappings per host.
379+
You may add multiple external mappings per host.
380380
381381
.. admonition:: Split Horizon Requirements
382382
:class: note

source/includes/options-k8s-shared.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,8 @@ default: "false"
580580
description: |
581581
582582
Determines whether the MongoDB deployment is exposed outside of the
583-
Kubernetes cluster. This results in |k8s| creating a `NodePort service <https://kubernetes.io/docs/concepts/services-networking/service/#nodeport>`__.
583+
Kubernetes cluster. This results in |k8s| creating a
584+
:k8sdocs:`NodePort service </concepts/services-networking/service/#nodeport>`.
584585
---
585586
program: _shared
586587
name: spec.podSpec.podTemplate
@@ -654,8 +655,14 @@ description: |
654655
If you add this parameter to a |tls|\-enabled resource, |k8s|
655656
displays an error when the resource reaches the ``Pending`` state.
656657
This error displays: ``Please manually remove the |csr| in order
657-
to proceed.`` To remedy this issue, remove any existing |csr|\s so
658-
|k8s| can generate new |csr|\s. Approve the |csr|\s after |k8s|
659-
generates them.
658+
to proceed.`` To remedy this issue:
659+
660+
1. Remove any existing |csr|\s so that |k8s| can generate new
661+
|csr|\s. To learn how to delete a resource, see the
662+
:k8sdocs:`deleting resources
663+
</reference/kubectl/cheatsheet/#deleting-resources>` in the
664+
|k8s| documentation.
665+
666+
2. Approve the |csr|\s after |k8s| generates them.
660667
661668
...

0 commit comments

Comments
 (0)