Skip to content

Commit e2b3b29

Browse files
(DOCSP-5380): remove namespace from yaml files (#171)
* (DOCSP-5380): remove namespace from yaml files * (DOCSP-5380): copy review feedback
1 parent 0633c46 commit e2b3b29

37 files changed

+287
-373
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. admonition:: Value must match namespace and name of ConfigMap
2+
:class: note
3+
4+
This value *must* match the namespace in which you created the
5+
|onprem| :ref:`project ConfigMap <create-k8s-project>`.
6+
7+
If this |k8s-mdbrsc| is in a different |k8s-ns| than the
8+
:ref:`project ConfigMap <create-k8s-project>`, you should
9+
set this value to the namespace *and* name of the
10+
ConfigMap in this format:
11+
``<metadata.namespace>/<metadata.name>``
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.. admonition:: Value must use namespace and name of Secret
2+
:class: note
3+
4+
This value *must* match the namespace in which you created the
5+
secret and the ``name`` value you provided for your |mms|
6+
|k8s| :ref:`Secret <create-k8s-credentials>`.
7+
8+
If this |k8s-obj| is in a different |k8s-ns| than the
9+
Secret, you should set this value to the namespace *and*
10+
name of the Secret in this format:
11+
``<namespace>/<name>``

source/includes/check-resource-status.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ command:
33

44
.. code-block:: sh
55
6-
kubectl get mdb <resource-name> -n <namespace> -o yaml -w
6+
kubectl get mdb <resource-name> -o yaml -w
77
88
The ``-w`` flag means "watch". With the "watch" flag set, the output
99
refreshes immediately when something changes until the status phase

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ apiVersion: mongodb.com/v1
44
kind: MongoDB
55
metadata:
66
name: <my-replica-set>
7-
namespace: <configMap.metadata.namespace>
8-
# Must match metadata.namespace in ConfigMap file
97
spec:
108
members: 3
119
version: 4.2.1
@@ -25,8 +23,6 @@ apiVersion: mongodb.com/v1
2523
kind: MongoDB
2624
metadata:
2725
name: <my-replica-set>
28-
namespace: <configMap.metadata.namespace>
29-
# Must match metadata.namespace in ConfigMap file
3026
spec:
3127
members: 3
3228
version: 4.2.1
@@ -49,8 +45,6 @@ apiVersion: mongodb.com/v1
4945
kind: MongoDB
5046
metadata:
5147
name: <my-replica-set>
52-
namespace: <configMap.metadata.namespace>
53-
# Must match metadata.namespace in ConfigMap file
5448
spec:
5549
members: 3
5650
version: 4.2.1
@@ -76,8 +70,6 @@ apiVersion: mongodb.com/v1
7670
kind: MongoDB
7771
metadata:
7872
name: <my-replica-set>
79-
namespace: <configMap.metadata.namespace>
80-
# Must match metadata.namespace in ConfigMap file
8173
spec:
8274
members: 3
8375
version: 4.2.1
@@ -103,8 +95,6 @@ apiVersion: mongodb.com/v1
10395
kind: MongoDB
10496
metadata:
10597
name: <my-replica-set>
106-
namespace: <configMap.metadata.namespace>
107-
# Must match metadata.namespace in ConfigMap file
10898
spec:
10999
members: 3
110100
version: 4.2.1
@@ -133,8 +123,6 @@ apiVersion: mongodb.com/v1
133123
kind: MongoDB
134124
metadata:
135125
name: <my-replica-set>
136-
namespace: <configMap.metadata.namespace>
137-
# Must match metadata.namespace in ConfigMap file
138126
spec:
139127
members: 3
140128
version: 4.2.1
@@ -161,8 +149,6 @@ apiVersion: mongodb.com/v1
161149
kind: MongoDB
162150
metadata:
163151
name: <my-replica-set>
164-
namespace: <configMap.metadata.namespace>
165-
# Must match metadata.namespace in ConfigMap file
166152
spec:
167153
members: 3
168154
version: 4.2.1
@@ -192,8 +178,6 @@ apiVersion: mongodb.com/v1
192178
kind: MongoDB
193179
metadata:
194180
name: <my-replica-set>
195-
namespace: <configMap.metadata.namespace>
196-
# Must match metadata.namespace in ConfigMap file
197181
spec:
198182
members: 3
199183
version: 4.2.1
@@ -219,8 +203,6 @@ apiVersion: mongodb.com/v1
219203
kind: MongoDB
220204
metadata:
221205
name: <my-replica-set>
222-
namespace: <configMap.metadata.namespace>
223-
# Must match metadata.namespace in ConfigMap file
224206
spec:
225207
members: 3
226208
version: 4.2.1
@@ -246,8 +228,6 @@ apiVersion: mongodb.com/v1
246228
kind: MongoDB
247229
metadata:
248230
name: <my-replica-set>
249-
namespace: <configMap.metadata.namespace>
250-
# Must match metadata.namespace in ConfigMap file
251231
members: 3
252232
version: 4.2.1
253233
opsManager:
@@ -266,7 +246,6 @@ apiVersion: mongodb.com/v1
266246
kind: MongoDB
267247
metadata:
268248
name: <my-secure-replica-set>
269-
namespace: <configMap.metadata.namespace>
270249
spec:
271250
members: 4
272251
version: 4.2.1

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ apiVersion: mongodb.com/v1
44
kind: MongoDB
55
metadata:
66
name: <my-sharded-cluster>
7-
namespace: <configMap.metadata.namespace>
8-
# Must match metadata.namespace in ConfigMap file
97
spec:
108
shardCount: 2
119
mongodsPerShardCount: 3
@@ -28,8 +26,6 @@ apiVersion: mongodb.com/v1
2826
kind: MongoDB
2927
metadata:
3028
name: <my-sharded-cluster>
31-
namespace: <configMap.metadata.namespace>
32-
# Must match metadata.namespace in ConfigMap file
3329
spec:
3430
shardCount: 2
3531
mongodsPerShardCount: 3
@@ -55,8 +51,6 @@ apiVersion: mongodb.com/v1
5551
kind: MongoDB
5652
metadata:
5753
name: <my-sharded-cluster>
58-
namespace: <configMap.metadata.namespace>
59-
# Must match metadata.namespace in ConfigMap file
6054
spec:
6155
shardCount: 2
6256
mongodsPerShardCount: 3
@@ -85,8 +79,6 @@ apiVersion: mongodb.com/v1
8579
kind: MongoDB
8680
metadata:
8781
name: <my-sharded-cluster>
88-
namespace: <configMap.metadata.namespace>
89-
# Must match metadata.namespace in ConfigMap file
9082
spec:
9183
shardCount: 2
9284
mongodsPerShardCount: 3
@@ -115,8 +107,6 @@ apiVersion: mongodb.com/v1
115107
kind: MongoDB
116108
metadata:
117109
name: <my-sharded-cluster>
118-
namespace: <configMap.metadata.namespace>
119-
# Must match metadata.namespace in ConfigMap file
120110
spec:
121111
shardCount: 2
122112
mongodsPerShardCount: 3
@@ -148,8 +138,6 @@ apiVersion: mongodb.com/v1
148138
kind: MongoDB
149139
metadata:
150140
name: <my-sharded-cluster>
151-
namespace: <configMap.metadata.namespace>
152-
# Must match metadata.namespace in ConfigMap file
153141
spec:
154142
shardCount: 2
155143
mongodsPerShardCount: 3
@@ -179,8 +167,6 @@ apiVersion: mongodb.com/v1
179167
kind: MongoDB
180168
metadata:
181169
name: <my-sharded-cluster>
182-
namespace: <configMap.metadata.namespace>
183-
# Must match metadata.namespace in ConfigMap file
184170
spec:
185171
shardCount: 2
186172
mongodsPerShardCount: 3
@@ -213,8 +199,6 @@ apiVersion: mongodb.com/v1
213199
kind: MongoDB
214200
metadata:
215201
name: <my-sharded-cluster>
216-
namespace: <configMap.metadata.namespace>
217-
# Must match metadata.namespace in ConfigMap file
218202
spec:
219203
shardCount: 2
220204
mongodsPerShardCount: 3
@@ -243,8 +227,6 @@ apiVersion: mongodb.com/v1
243227
kind: MongoDB
244228
metadata:
245229
name: <my-sharded-cluster>
246-
namespace: <configMap.metadata.namespace>
247-
# Must match metadata.namespace in ConfigMap file
248230
spec:
249231
shardCount: 2
250232
mongodsPerShardCount: 3
@@ -273,8 +255,6 @@ apiVersion: mongodb.com/v1
273255
kind: MongoDB
274256
metadata:
275257
name: <my-secure-sharded-cluster>
276-
namespace: <configMap.metadata.namespace>
277-
# Must match metadata.namespace in ConfigMap file
278258
spec:
279259
shardCount: 2
280260
mongodsPerShardCount: 3
@@ -297,7 +277,6 @@ apiVersion: mongodb.com/v1
297277
kind: MongoDB
298278
metadata:
299279
name: <my-secure-sharded-cluster>
300-
namespace: <configMap.metadata.namespace>
301280
spec:
302281
shardCount: 3
303282
mongodsPerShardCount: 3

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ apiVersion: mongodb.com/v1
44
kind: MongoDB
55
metadata:
66
name: <my-standalone>
7-
namespace: <configMap.metadata.namespace>
8-
# Must match metadata.namespace in ConfigMap file
97
spec:
108
version: 4.2.1
119
opsManager:

source/includes/list-table-configmap-keys.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,6 @@
2222

2323
- ``myconfigmap``
2424

25-
* - ``metadata.namespace``
26-
- string
27-
- Scope of object names. Used to limit what can be managed to
28-
a subset of all |k8s-objs|. The default value is ``mongodb``.
29-
30-
.. important::
31-
The |k8s-op-short|, |k8s-secret|, and |k8s-mdbrsc|\s
32-
*must* be created in the same |k8s-ns|.
33-
34-
.. seealso::
35-
36-
- :setting:`metadata.namespace`
37-
- |k8s| documentation on |k8s-nss|
38-
39-
- ``mongodb``
40-
4125
* - ``data.projectName``
4226
- string
4327
- Label for your |mms|

source/includes/list-tables/configmap-keys.rst

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,6 @@
2222

2323
- ``myconfigmap``
2424

25-
* - ``metadata.namespace``
26-
- string
27-
- Scope of object names. Used to limit what can be managed to
28-
a subset of all |k8s-objs|. The default value is ``mongodb``.
29-
30-
.. important::
31-
The |k8s-op-short|, |k8s-secret|, and |k8s-mdbrsc|\s
32-
*must* be created in the same |k8s-ns|.
33-
34-
.. seealso::
35-
36-
- :setting:`metadata.namespace`
37-
- |k8s| documentation on |k8s-nss|
38-
39-
- ``mongodb``
40-
4125
* - ``data.projectName``
4226
- string
4327
- Label for your |mms|

source/includes/list-tables/rs-resource-base-options.rst

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,6 @@
1919

2020
- ``myproject``
2121

22-
* - :setting:`metadata.namespace`
23-
- string
24-
- Scope of object names. |k8s| |k8s-ns| where this
25-
|k8s-mdbrsc| and other |k8s-objs| are created.
26-
27-
Using two different namespaces allows you to delete your
28-
standalone or all of the resources in the namespace without
29-
affecting your |k8s-op-short|.
30-
31-
.. seealso::
32-
33-
- :setting:`metadata.namespace`
34-
- |k8s| documentation on |k8s-nss|
35-
36-
- ``mongodb``
37-
3822
* - :setting:`spec.members`
3923
- integer
4024
- Number of members of the :term:`replica set`.
@@ -61,18 +45,7 @@
6145
:setting:`spec.cloudManager.configMapRef.name` setting is an
6246
alias for this setting and can be used in its place.
6347

64-
.. admonition:: Value must match namespace and name of ConfigMap
65-
:class: note
66-
67-
This value *must* match the value you provided for
68-
:setting:`metadata.name` in your |onprem|
69-
:ref:`project ConfigMap <create-k8s-project>`.
70-
71-
If this |k8s-mdbrsc| is in a different |k8s-ns| than the
72-
:ref:`project ConfigMap <create-k8s-project>`, you should
73-
set this value to the namespace *and* name of the
74-
ConfigMap in this format:
75-
``<metadata.namespace>/<metadata.name>``
48+
.. include:: /includes/admonitions/note-namespace-match-configmap.rst
7649

7750
.. include:: /includes/k8s/fact-k8s-operator-manages-configmap.rst
7851

@@ -86,17 +59,7 @@
8659
authentication credentials for the |k8s-op-short| to
8760
communicate with |onprem|.
8861

89-
.. admonition:: Value must use namespace and name of Secret
90-
:class: note
91-
92-
This value *must* match the value you provided for
93-
:setting:`namespace` and `name` for your |mms| |k8s|
94-
:ref:`Secret <create-k8s-credentials>`.
95-
96-
If this |k8s-obj| is in a different |k8s-ns| than the
97-
Secret, you should set this value to the namespace *and*
98-
name of the Secret in this format:
99-
``<namespace>/<name>``
62+
.. include:: /includes/admonitions/note-namespace-match-secret.rst
10063

10164
.. include:: /includes/k8s/fact-k8s-operator-manages-secret.rst
10265

source/includes/options-k8s-shared.yaml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,7 @@ description: |
119119
configuration. The :setting:`spec.cloudManager.configMapRef.name`
120120
setting is an alias for this setting and can be used in its place.
121121
122-
.. admonition:: Value must match namespace and name of ConfigMap
123-
:class: note
124-
125-
This value *must* match the value you provided for
126-
:setting:`metadata.name` in your |com|
127-
:ref:`project ConfigMap <create-k8s-project>`.
128-
129-
If this |k8s-mdbrsc| is in a different |k8s-ns| than the
130-
:ref:`project ConfigMap <create-k8s-project>`, you should
131-
set this value to the namespace *and* name of the
132-
ConfigMap in this format:
133-
``<namespace>/<name>``
122+
.. include:: /includes/admonitions/note-namespace-match-configmap.rst
134123
135124
.. include:: /includes/k8s/fact-k8s-operator-manages-configmap.rst
136125
@@ -162,16 +151,7 @@ description: |
162151
<create-k8s-secret>` as |mms| |api| authentication credentials for
163152
the |k8s-op-short| to communicate with |com|.
164153
165-
.. admonition:: Value must use namespace and name of Secret
166-
:class: note
167-
168-
This value *must* match the value you provided for
169-
:setting:`namespace` and `name` for your |mms| |k8s| :ref:`Secret
170-
<create-k8s-credentials>`.
171-
172-
If this |k8s-obj| is in a different |k8s-ns| than the Secret, you
173-
should set this value to the namespace *and* name of the Secret in
174-
this format: ``<namespace>/<name>``
154+
.. include:: /includes/admonitions/note-namespace-match-secret.rst
175155
176156
.. include:: /includes/k8s/fact-k8s-operator-manages-secret.rst
177157

0 commit comments

Comments
 (0)