Skip to content

Commit bc26e7f

Browse files
jdestefano-mongojwilliams-mongo
authored andcommitted
DOCSP-4683 - One CRD deployment, troubleshooting, and reference changes. (#18)
* (DOCSP-4683): Change to One CRD. * (DOCSP-4683): Jon's updates. * DOCSP-4683 - Copy and tech review edits.
1 parent f3563d1 commit bc26e7f

12 files changed

+95
-118
lines changed

conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
release = conf.version.release
5656
pygments_style = 'sphinx'
5757

58+
source_constants = {
59+
'version': version
60+
}
61+
5862
rst_epilog = '\n'.join([
5963
'.. |branch| replace:: ``{0}``'.format(conf.git.branches.current),
6064
'.. |copy| unicode:: U+000A9',
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
To check the status of your |k8s-mdbrsc|, invoke the following
2+
command:
3+
4+
.. code-block:: sh
5+
6+
kubectl get mdb <resource-name> -n <namespace> -o yaml -w
7+
8+
The ``-w`` flag means "watch". With the "watch" flag set, the output
9+
refreshes immediately when something changes until the status phase
10+
achieves the ``Running`` state.
11+
12+
If the deployment fails, see :doc:`/reference/troubleshooting`.

source/includes/options-k8s-shared.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ type: string
1414
directive: setting
1515
optional: false
1616
description: |
17-
*Required.* Type of |k8s-mdbrsc| to create. Accepted values are:
18-
19-
- ``MongoDbStandalone``
20-
- ``MongoDbReplicaSet``
21-
- ``MongoDbShardedCluster``
17+
*Required.* Kind of |k8s-mdbrsc| to create. Set this to ``MongoDB``
2218
2319
---
2420
program: _shared
@@ -39,6 +35,20 @@ description: |
3935
*Required.* |k8s| |k8s-ns| where this |k8s-mdbrsc| and other
4036
|k8s-objs| are created.
4137
38+
---
39+
program: _shared
40+
name: spec.type
41+
type: string
42+
directive: setting
43+
optional: false
44+
description: |
45+
*Required.* Type of |k8s-mdbrsc| to create. Accepted values
46+
are:
47+
48+
- ``Standalone``
49+
- ``ReplicaSet``
50+
- ``ShardedCluster``
51+
4252
---
4353
program: _shared
4454
name: spec.version

source/includes/options-k8s-standalone.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ inherit:
4242
program: _shared
4343
file: options-k8s-shared.yaml
4444

45+
---
46+
program: k8sSaConf
47+
name: spec.type
48+
type: string
49+
directive: setting
50+
optional: false
51+
inherit:
52+
name: spec.type
53+
program: _shared
54+
file: options-k8s-shared.yaml
55+
4556
---
4657
program: k8sSaConf
4758
name: spec.version

source/includes/steps-deploy-k8s-replica-set.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ ref: copy-k8s-example
66
content: |
77
88
This is a |yaml| file that you can modify to meet your desired
9-
configuration. The highlighted lines should be changed for your
10-
replica set configuration.
9+
configuration. Change the highlighted settings to match your desired
10+
:term:`replica set` configuration.
1111
1212
.. literalinclude:: /reference/k8s/example-replica-set-minimal.yaml
1313
:language: yaml
14-
:emphasize-lines: 5-7,9-14
14+
:emphasize-lines: 5-7,9-13
1515
16-
Change the highlighted settings to match your desired
17-
:term:`replica set` deployment.
1816
---
1917
title: "Open your preferred text editor and paste the |k8s-obj| specification into a new text file."
2018
stepnum: 2
@@ -109,6 +107,12 @@ content: |
109107
- ``<mycredentials>`` or
110108
``<namespace>/<mycredentials>``
111109
110+
* - :setting:`spec.type`
111+
- string
112+
- Type of |k8s-mdbrsc| to create.
113+
114+
- ``ReplicaSet``
115+
112116
* - :setting:`spec.version`
113117
- string
114118
- Version of MongoDB that this :term:`replica set` should run.
@@ -203,17 +207,6 @@ level: 4
203207
ref: track-k8s-deployment
204208
content: |
205209
206-
To check the status of your |k8s-mdbrsc|, invoke the following
207-
command:
208-
209-
.. code-block:: sh
210-
211-
kubectl get mrs <rs-name> -n <namespace> -o yaml -w
212-
213-
The ``-w`` flag means "watch". The output refreshes immediately if
214-
something changes until the status phase achieves the ``Running``
215-
state.
216-
217-
If the deployment fails, see :doc:`/reference/troubleshooting`.
210+
.. include:: /includes/check-resource-status.rst
218211
219212
...

source/includes/steps-deploy-k8s-sharded-cluster.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ ref: copy-k8s-example
66
content: |
77
88
This is a |yaml| file that you can modify to meet your desired
9-
configuration. The highlighted lines should be changed for your
10-
sharded cluster configuration.
9+
configuration. Change the highlighted settings to match your desired
10+
:term:`sharded cluster` configuration.
1111
1212
.. literalinclude:: /reference/k8s/example-sharded-cluster-minimal.yaml
1313
:language: yaml
14-
:emphasize-lines: 5-7,9-17
14+
:emphasize-lines: 5-7,9-16
1515
16-
You will need to change the highlighted settings to match your
17-
desired :term:`sharded cluster` deployment.
1816
---
1917
title: "Open your preferred text editor and paste the |k8s-obj| specification into a new text file."
2018
stepnum: 2
@@ -140,6 +138,12 @@ content: |
140138
- ``<mycredentials>`` or
141139
``<namespace>/<mycredentials>``
142140
141+
* - :setting:`spec.type`
142+
- string
143+
- Type of |k8s-mdbrsc| to create.
144+
145+
- ``ShardedCluster``
146+
143147
* - :setting:`spec.persistent`
144148
- string
145149
- *Optional.*
@@ -261,17 +265,6 @@ level: 4
261265
ref: track-k8s-deployment
262266
content: |
263267
264-
To check the status of your |k8s-mdbrsc|, invoke the following
265-
command:
266-
267-
.. code-block:: sh
268-
269-
kubectl get msc <sc-name> -n <namespace> -o yaml -w
270-
271-
The ``-w`` flag means "watch". The output refreshes immediately if
272-
something changes until the status phase achieves the ``Running``
273-
state.
274-
275-
If the deployment fails, see :doc:`/reference/troubleshooting`.
268+
.. include:: /includes/check-resource-status.rst
276269
277270
...

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

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@ ref: copy-k8s-example
66
content: |
77
88
This is a |yaml| file that you can modify to meet your desired
9-
configuration. The highlighted lines should be changed for your
9+
configuration. Change the highlighted settings to match your desired
1010
standalone configuration.
1111
1212
.. literalinclude:: /reference/k8s/example-standalone-minimal.yaml
1313
:language: yaml
1414
:emphasize-lines: 5-7,9-12
1515
16-
You will need to change the highlighted settings to match your
17-
desired Standalone deployment.
1816
---
1917
title: "Open your preferred text editor and paste the |k8s-obj| specification into a new text file."
2018
stepnum: 2
@@ -109,6 +107,12 @@ content: |
109107
- ``<mycredentials>`` or
110108
``<namespace>/<mycredentials>``
111109
110+
* - :setting:`spec.type`
111+
- string
112+
- Type of |k8s-mdbrsc| to create.
113+
114+
- ``Standalone``
115+
112116
* - :setting:`spec.version`
113117
- string
114118
- Version of MongoDB that is installed on this
@@ -193,18 +197,6 @@ level: 4
193197
ref: track-k8s-deployment
194198
content: |
195199
196-
To check the status of your |k8s-mdbrsc|, invoke the following
197-
command:
198-
199-
.. code-block:: sh
200-
201-
kubectl get mst <standlone-name> -n <namespace> -o yaml -w
202-
203-
The ``-w`` flag means "watch". The output refreshes immediately if
204-
something changes until the status phase achieves the ``Running``
205-
state.
206-
207-
If the deployment fails, see :doc:`/reference/troubleshooting`.
208-
200+
.. include:: /includes/check-resource-status.rst
209201
210202
...

source/reference/k8s-operator-specification.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ Required
6666
.. include:: /includes/option/setting-k8sSaConf-spec.credentials.rst
6767
.. include:: /includes/option/setting-k8sSaConf-spec.persistent.rst
6868
.. include:: /includes/option/setting-k8sSaConf-spec.project.rst
69+
.. include:: /includes/option/setting-k8sSaConf-spec.type.rst
6970
.. include:: /includes/option/setting-k8sSaConf-spec.version.rst
7071

7172
Optional
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
22
apiVersion: mongodb.com/v1
3-
kind: MongoDbReplicaSet
3+
kind: MongoDB
44
metadata:
55
name: <myreplicaset>
66
namespace: <metadata.namespace> # Should match metadata.namespace in
77
# your configmap file.
88
spec:
99
members: 3
10-
version: 3.6.7
10+
version: 4.0.6
1111
project: <myconfigmap> # Should match metadata.name in your
1212
# configmap file.
1313
credentials: <mycredentials>
14+
type: ReplicaSet
1415
persistent: true
1516
...
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
apiVersion: mongodb.com/v1
3-
kind: MongoDbShardedCluster
3+
kind: MongoDB
44
metadata:
55
name: <myshardedcluster>
66
namespace: <metadata.namespace> # Should match metadata.namespace in
@@ -10,9 +10,10 @@ spec:
1010
mongodsPerShardCount: 3
1111
mongosCount: 2
1212
configServerCount: 3
13-
version: 3.6.7
13+
version: 4.0.6
1414
project: <myconfigmap> # Should match metadata.name in your
1515
# configmap file.
1616
credentials: <mycredentials>
17+
type: ShardedCluster
1718
persistent: true
1819
...

0 commit comments

Comments
 (0)