Skip to content

Commit a56b239

Browse files
atsansonejwilliams-mongo
authored andcommitted
(DOCSP-5883, DOCSP-5441): Added request, externallyExposed values. (#53)
* (DOCSP-5883, DOCSP-5441): Added request, externallyExposed values. * Updated per @antonlisovenko review.
1 parent ce1d4d0 commit a56b239

8 files changed

+274
-35
lines changed

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

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ inherit:
139139
replacement:
140140
component: :term:`replica set`
141141

142+
---
143+
program: k8sRsConf
144+
name: spec.podSpec.cpuRequests
145+
type: string
146+
directive: setting
147+
optional: true
148+
inherit:
149+
name: spec.podSpec.cpuRequests
150+
program: _shared
151+
file: options-k8s-shared.yaml
152+
replacement:
153+
component: standalone database
154+
cpuLimit: :setting:`spec.podSpec.cpu`
155+
142156
---
143157
program: k8sRsConf
144158
name: spec.podSpec.memory
@@ -151,14 +165,29 @@ inherit:
151165
file: options-k8s-shared.yaml
152166
replacement:
153167
component: :term:`replica set`
154-
memoryWarning:
168+
memoryWarning: |
155169
156-
If this value is not set:
170+
If you have not set ``spec.podSpec.memory`` or
171+
``spec.podSpec.memoryRequests``:
157172
158173
- Monitoring tools report incorrect available memory capacity.
159174
- The WiredTiger cache cannot be calculated correctly. This
160175
impacts cluster performance.
161176
177+
---
178+
program: k8sRsConf
179+
name: spec.podSpec.memoryRequests
180+
type: string
181+
directive: setting
182+
optional: true
183+
inherit:
184+
name: spec.podSpec.memoryRequests
185+
program: _shared
186+
file: options-k8s-shared.yaml
187+
replacement:
188+
component: standalone database
189+
cpuLimit: :setting:`spec.podSpec.memory`
190+
162191
---
163192
program: k8sRsConf
164193
name: spec.podSpec.storage

source/includes/options-k8s-shared.yaml

Lines changed: 70 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ type: string
113113
directive: setting
114114
optional: false
115115
description: |
116-
*Required.* Name of the |k8s-configmap| with the |com| connection
116+
*Required.* Name of the |k8s-configmap| with the |com| connection
117117
configuration.
118118
119119
.. admonition:: Value must match namespace and name of ConfigMap
120120
:class: note
121121
122-
This value *must* match the value you provided for
123-
:setting:`metadata.name` in your |com|
122+
This value *must* match the value you provided for
123+
:setting:`metadata.name` in your |com|
124124
:ref:`project ConfigMap <create-k8s-project>`.
125125
126126
If this |k8s-mdbrsc| is in a different |k8s-ns| than the
@@ -169,23 +169,47 @@ description: |
169169
---
170170
program: _shared
171171
name: spec.podSpec.cpu
172-
type: string
172+
type: number
173173
directive: setting
174174
optional: true
175175
description: |
176-
Minimum CPU capacity that must be available on a |k8s|
176+
Maximum CPU capacity that must be available on a |k8s|
177177
|k8s-node| to host this {{component}} |k8s-mdbrsc|.
178+
179+
This value maps to the
180+
:k8sdocs:`limits field </reference/generated/kubernetes-api/v1.10/#resourcerequirements-v1-core>`
181+
for CPU for the created pod.
178182
replacement:
179183
component: :term:`standalone deployment`
180184

185+
---
186+
program: _shared
187+
name: spec.podSpec.cpuRequests
188+
type: number
189+
directive: setting
190+
optional: true
191+
description: |
192+
Minimum CPU capacity for the |k8s-node| being created to host
193+
this {{component}} |k8s-mdbrsc|. If omitted, this value is set to
194+
{{cpuLimit}}.
195+
196+
This value maps to the
197+
:k8sdocs:`requests field </reference/generated/kubernetes-api/v1.10/#resourcerequirements-v1-core>`
198+
for CPU for the created pod.
199+
200+
The requested value must be less than or equal to {{cpuLimit}}.
201+
replacement:
202+
component: standalone database
203+
cpuLimit: :setting:`spec.podSpec.cpu`
204+
181205
---
182206
program: _shared
183207
name: spec.podSpec.memory
184208
type: string
185209
directive: setting
186210
optional: false
187211
description: |
188-
*Required.* Minimum memory capacity that must be available on a
212+
Maximum memory capacity that must be available on a
189213
|k8s| |k8s-node| to host this |k8s-mdbrsc| on |k8s|. This value is
190214
expressed as an integer followed by a unit of memory in
191215
|jedec| notation.
@@ -195,14 +219,34 @@ description: |
195219
If this |k8s-mdbrsc| requires 4 gigabytes of memory, set
196220
this value to ``4G``.
197221
198-
This value maps both to
199-
:k8sdocs:`limits and requests fields </reference/generated/kubernetes-api/v1.10/#resourcerequirements-v1-core>`
200-
for memory for the pod created.
222+
This value maps to the
223+
:k8sdocs:`limits field </reference/generated/kubernetes-api/v1.10/#resourcerequirements-v1-core>`
224+
for memory for the created pod.
201225
202226
.. important::
203227
204228
{{memoryWarning}}
205229
230+
---
231+
program: _shared
232+
name: spec.podSpec.memoryRequests
233+
type: string
234+
directive: setting
235+
optional: false
236+
description: |
237+
Minimum memory capacity for the |k8s-node| being created to host
238+
this {{component}} |k8s-mdbrsc|. If omitted, this value is set to
239+
{{memoryLimit}}.
240+
241+
This value maps to the
242+
:k8sdocs:`requests field </reference/generated/kubernetes-api/v1.10/#resourcerequirements-v1-core>`
243+
for memory for the created pod.
244+
245+
246+
The requested value must be less than or equal to {{memoryLimit}}.
247+
replacement:
248+
memoryLimit: :setting:`spec.podSpec.memory`
249+
206250
---
207251
program: _shared
208252
name: spec.podSpec.storage
@@ -280,7 +324,7 @@ description: |
280324
281325
.. example::
282326
283-
A user can isolate "dev" and "testing" environments to ensure
327+
A user can isolate "dev" and "testing" environments to ensure
284328
|k8s-pods| go to |k8s-nodes| with appropriate labels.
285329
286330
---
@@ -335,7 +379,7 @@ description: |
335379
|k8s-obj| specification.
336380
337381
338-
.. note::
382+
.. note::
339383
340384
.. include:: /includes/fact-reclaimpolicy-to-retain.rst
341385
@@ -394,7 +438,7 @@ description: |
394438
this storage type as a |k8s-sc| object before using it in this
395439
|k8s-obj| specification.
396440
397-
.. note::
441+
.. note::
398442
399443
.. include:: /includes/fact-reclaimpolicy-to-retain.rst
400444
@@ -449,6 +493,7 @@ description: |
449493
The following are valid options:
450494
451495
.. include:: /includes/list-table-requiressl-modes.rst
496+
452497
---
453498
program: _shared
454499
name: spec.security.clusterAuthenticationMode
@@ -466,4 +511,17 @@ description: |
466511
467512
Once internal cluster authentication is enabled, it can not be
468513
disabled.
514+
515+
---
516+
program: _shared
517+
name: spec.externallyExposed
518+
type: boolean
519+
directive: setting
520+
optional: true
521+
default: "false"
522+
description: |
523+
524+
Determines whether the MongoDB deployment is exposed outside of the
525+
Kubernetes cluster. This results in |k8s| creating a `NodePort service <https://kubernetes.io/docs/concepts/services-networking/service/#nodeport>`__.
526+
469527
...

source/includes/options-k8s-shared_cluster.yaml

Lines changed: 99 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,20 @@ inherit:
166166
replacement:
167167
component: :term:`sharded cluster` :term:`config server` member
168168

169+
---
170+
program: k8sScConf
171+
name: spec.configSrvPodSpec.cpuRequests
172+
type: string
173+
directive: setting
174+
optional: true
175+
inherit:
176+
name: spec.podSpec.cpuRequests
177+
program: _shared
178+
file: options-k8s-shared.yaml
179+
replacement:
180+
component: :term:`sharded cluster` :term:`config server` member
181+
cpuLimit: :setting:`spec.configSrvPodSpec.cpu`
182+
169183
---
170184
program: k8sScConf
171185
name: spec.configSrvPodSpec.memory
@@ -178,14 +192,29 @@ inherit:
178192
file: options-k8s-shared.yaml
179193
replacement:
180194
component: :term:`sharded cluster` :term:`config server` member
181-
memoryWarning:
195+
memoryWarning: |
182196
183-
If this value is not set:
197+
If you have not set ``spec.configSrvPodSpec.memory`` or
198+
``spec.configSrvPodSpec.memoryRequests``:
184199
185200
- Monitoring tools report incorrect available memory capacity.
186201
- The WiredTiger cache cannot be calculated correctly. This
187202
impacts cluster performance.
188203
204+
---
205+
program: k8sScConf
206+
name: spec.configSrvPodSpec.memoryRequests
207+
type: string
208+
directive: setting
209+
optional: true
210+
inherit:
211+
name: spec.podSpec.memoryRequests
212+
program: _shared
213+
file: options-k8s-shared.yaml
214+
replacement:
215+
component: standalone database
216+
cpuLimit: :setting:`spec.configSrvPodSpec.memory`
217+
189218
---
190219
program: k8sScConf
191220
name: spec.configSrvPodSpec.storage
@@ -323,6 +352,20 @@ inherit:
323352
replacement:
324353
component: :term:`sharded cluster` shard member
325354

355+
---
356+
program: k8sScConf
357+
name: spec.mongosPodSpec.cpuRequests
358+
type: string
359+
directive: setting
360+
optional: true
361+
inherit:
362+
name: spec.podSpec.cpuRequests
363+
program: _shared
364+
file: options-k8s-shared.yaml
365+
replacement:
366+
component: standalone database
367+
cpuLimit: :setting:`spec.mongosPodSpec.cpu`
368+
326369
---
327370
program: k8sScConf
328371
name: spec.mongosPodSpec.memory
@@ -335,9 +378,29 @@ inherit:
335378
file: options-k8s-shared.yaml
336379
replacement:
337380
component: :term:`sharded cluster` shard member
338-
memoryWarning:
339-
If this value is not set, monitoring tools report incorrect
340-
available memory capacity.
381+
memoryWarning: |
382+
383+
If you have not set ``spec.mongosPodSpec.memory`` or
384+
``spec.mongosPodSpec.memoryRequests``:
385+
386+
- Monitoring tools report incorrect available memory capacity.
387+
- The WiredTiger cache cannot be calculated correctly. This
388+
impacts cluster performance.
389+
390+
---
391+
program: k8sScConf
392+
name: spec.mongosPodSpec.memoryRequests
393+
type: string
394+
directive: setting
395+
optional: true
396+
inherit:
397+
name: spec.podSpec.memoryRequests
398+
program: _shared
399+
file: options-k8s-shared.yaml
400+
replacement:
401+
component: :term:`sharded cluster` shard member
402+
cpuLimit: :setting:`spec.mongosPodSpec.memory`
403+
341404
---
342405
program: k8sScConf
343406
name: spec.mongosPodSpec.podAffinity
@@ -384,6 +447,20 @@ inherit:
384447
replacement:
385448
component: :term:`sharded cluster` shard member
386449

450+
---
451+
program: k8sScConf
452+
name: spec.shardPodSpec.cpuRequests
453+
type: string
454+
directive: setting
455+
optional: true
456+
inherit:
457+
name: spec.podSpec.cpuRequests
458+
program: _shared
459+
file: options-k8s-shared.yaml
460+
replacement:
461+
component: :term:`sharded cluster` shard member
462+
cpuLimit: :setting:`spec.shardPodSpec.cpu`
463+
387464
---
388465
program: k8sScConf
389466
name: spec.shardPodSpec.memory
@@ -396,14 +473,29 @@ inherit:
396473
file: options-k8s-shared.yaml
397474
replacement:
398475
component: :term:`sharded cluster` shard member
399-
memoryWarning:
476+
memoryWarning: |
400477
401-
If this value is not set:
478+
If you have not set ``spec.shardPodSpec.memory`` or
479+
``spec.shardPodSpec.memoryRequests``:
402480
403481
- Monitoring tools report incorrect available memory capacity.
404482
- The WiredTiger cache cannot be calculated correctly. This
405483
impacts cluster performance.
406484
485+
---
486+
program: k8sScConf
487+
name: spec.shardPodSpec.memoryRequests
488+
type: string
489+
directive: setting
490+
optional: true
491+
inherit:
492+
name: spec.podSpec.memoryRequests
493+
program: _shared
494+
file: options-k8s-shared.yaml
495+
replacement:
496+
component: :term:`sharded cluster` shard member
497+
cpuLimit: :setting:`spec.shardPodSpec.memory`
498+
407499
---
408500
program: k8sScConf
409501
name: spec.shardPodSpec.storage

0 commit comments

Comments
 (0)