Skip to content

Commit 5eded8a

Browse files
(DOCS-13693): added MANAGED_SECURITY_CONTEXT to install instructions (#308)
* (DOCS-13693): added MANAGED_SECURITY_CONTEXT to install instructions * (DOCS-13693): updated per @zach-carr review
1 parent 8196400 commit 5eded8a

File tree

5 files changed

+120
-0
lines changed

5 files changed

+120
-0
lines changed

source/includes/list-tables/k8s-helm-install-options.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@
1919
2020
- ``mongodb``
2121

22+
* - ``managedSecurityContext``
23+
24+
- Flag that determines if the |k8s-op-short| inherits the
25+
``securityContext`` settings that your |k8s| cluster manages.
26+
27+
Set this field to ``true`` if your cluster manages the
28+
``securityContext`` for your |k8s| resources.
29+
30+
.. example::
31+
32+
.. code-block:: yaml
33+
:emphasize-lines: 3
34+
35+
# Set this to true if your cluster is managing SecurityContext for you.
36+
# If running OpenShift (Cloud, Minishift, etc.), set this to true.
37+
managedSecurityContext: false
38+
39+
- ``false``
40+
2241
* - | ``operator``
2342
| ``.env``
2443

source/includes/list-tables/k8s-kubectl-install-options.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,3 +391,37 @@
391391
env:
392392
- name: INIT_APPDB_VERSION
393393
value: latest
394+
395+
* - ``MANAGED_SECURITY_CONTEXT``
396+
- Flag that determines if the |k8s-op-short| inherits the
397+
``securityContext`` settings that your |k8s| cluster manages.
398+
399+
Set this field to ``true`` if you want to run the |k8s-op-short|
400+
in OpenShift or in a restrictive environment.
401+
402+
Default value is ``false``.
403+
404+
.. code-block:: yaml
405+
406+
spec.template.spec.containers.name.env.name:
407+
MANAGED_SECURITY_CONTEXT
408+
spec.template.spec.containers.name.env.value:
409+
false
410+
411+
.. example::
412+
413+
.. code-block:: yaml
414+
:linenos:
415+
:emphasize-lines: 9-11
416+
417+
spec:
418+
template:
419+
spec:
420+
serviceAccountName: mongodb-enterprise-operator
421+
containers:
422+
- name: mongodb-enterprise-operator
423+
image: <operatorVersionUrl>
424+
imagePullPolicy: <policyChoice>
425+
env:
426+
- name: MANAGED_SECURITY_CONTEXT
427+
value: true

source/includes/list-tables/k8s-oc-install-options.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,37 @@
392392
env:
393393
- name: INIT_APPDB_VERSION
394394
value: latest
395+
396+
* - ``MANAGED_SECURITY_CONTEXT``
397+
- Flag that determines if the |k8s-op-short| inherits the
398+
``securityContext`` settings that your |k8s| cluster manages.
399+
400+
For OpenShift, ``MANAGED_SECURITY_CONTEXT`` must always be
401+
``true``.
402+
403+
Default value is ``true``.
404+
405+
.. code-block:: yaml
406+
407+
spec.template.spec.containers.name.env.name:
408+
MANAGED_SECURITY_CONTEXT
409+
spec.template.spec.containers.name.env.value:
410+
true
411+
412+
.. example::
413+
414+
.. code-block:: yaml
415+
:linenos:
416+
:emphasize-lines: 9-11
417+
418+
spec:
419+
template:
420+
spec:
421+
serviceAccountName: mongodb-enterprise-operator
422+
containers:
423+
- name: mongodb-enterprise-operator
424+
image: <operatorVersionUrl>
425+
imagePullPolicy: <policyChoice>
426+
env:
427+
- name: MANAGED_SECURITY_CONTEXT
428+
value: true

source/includes/list-tables/os-helm-install-options.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,24 @@
2121
2222
- ``mongodb``
2323

24+
* - ``managedSecurityContext``
25+
26+
- Flag that determines if the |k8s-op-short| inherits the
27+
``securityContext`` settings that your |k8s| cluster manages.
28+
29+
For OpenShift, ``managedSecurityContext`` must always be
30+
``true``.
31+
32+
.. example::
33+
34+
.. code-block:: yaml
35+
:emphasize-lines: 2
36+
37+
# OpenShift manages security context on its own
38+
managedSecurityContext: true
39+
40+
- ``true``
41+
2442
* - | ``operator``
2543
| ``.env``
2644

source/tutorial/plan-k8s-operator-install.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ Versions in *italics* are deprecated.
4444

4545
.. include:: /includes/list-tables/compatibility.rst
4646

47+
``MANAGED_SECURITY_CONTEXT`` for |k8s-op-short| OpenShift Deployments
48+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49+
50+
When you deploy the |k8s-op-short| to OpenShift, you must set the
51+
``MANAGED_SECURITY_CONTEXT`` flag to ``true``. This value is set for you
52+
in the :gh:`mongodb-enterprise-openshift.yaml
53+
</mongodb/mongodb-enterprise-kubernetes/blob/master/mongodb-enterprise-openshift.yaml>`
54+
and :gh:`values-openshift.yaml
55+
</mongodb/mongodb-enterprise-kubernetes/blob/master/helm_chart/values-openshift.yaml>`
56+
files included in the :gh:`MongoDB Enterprise Kubernetes Operator
57+
repository </mongodb/mongodb-enterprise-kubernetes>`.
58+
59+
For more information on modifying this value, see the :ref:`instructions
60+
<install-k8s-operator>` for the installation method you want to use.
61+
4762
Docker Container Details
4863
~~~~~~~~~~~~~~~~~~~~~~~~
4964

0 commit comments

Comments
 (0)