Skip to content

Commit dc30178

Browse files
authored
(DOCSP-40117) Adds memberConfig settings to the appDB clusterSpec. (#1785)
* (DOCSP-40117) Adds memberConfig settings to the appDB clusterSpec. * Revises per feedback from Lukasz. * Revises per second-round tech review. * Revises per copy review.
1 parent 64dc495 commit dc30178

File tree

1 file changed

+169
-23
lines changed

1 file changed

+169
-23
lines changed

source/reference/k8s-operator-om-specification.txt

Lines changed: 169 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ After you create or update an |onprem| resource specification, you
2020
direct |k8s-op-full| to apply this specification to your |k8s|
2121
environment. |k8s-op-short| creates the services and custom |k8s|
2222
resources that |onprem| requires, then deploys |onprem| and its backing
23-
application database in containers in your |k8s| environment.
23+
{+appdb+} in containers in your |k8s| environment.
2424

2525
Each |onprem| resource uses an |k8s-obj| specification in |yaml| to
2626
define the characteristics and settings of the deployment.
@@ -272,7 +272,7 @@ resources.
272272
This |certauth| signs the certificates that:
273273

274274
- clients use to connect to the |application|, and
275-
- agents in the application database |k8s-pods| use to communicate
275+
- agents in the {+appdb+} |k8s-pods| use to communicate
276276
with |onprem|.
277277

278278
.. include:: /includes/admonitions/warning-concatenate-download-certs.rst
@@ -1019,12 +1019,12 @@ snapshots, and secure connections to |s3| with |tls| using keys
10191019
issued by custom |certauth|.
10201020

10211021
To configure custom CA keys, use the ConfigMap with which you
1022-
configured |tls| for your application database as described on
1022+
configured |tls| for your {+appdb+} as described on
10231023
the :guilabel:`TLS-Encrypted Connection (HTTPS)` tab of
10241024
:ref:`deploy-om-container`.
10251025
Set :opsmgrkube:`spec.applicationDatabase.security.tls.ca` to this ConfigMap.
10261026

1027-
You can use |tls| for both |s3| and your application database, or for
1027+
You can use |tls| for both |s3| and your {+appdb+}, or for
10281028
|s3| only.
10291029

10301030
- To use |tls| for both, get certificates for both purposes from the
@@ -1134,7 +1134,7 @@ You can use |tls| for both |s3| and your application database, or for
11341134

11351135
.. note::
11361136

1137-
Omit this setting to use the application database to store
1137+
Omit this setting to use the {+appdb+} to store
11381138
metadata for the |s3| oplog store.
11391139

11401140
If you omit this setting, you must also omit the
@@ -1350,7 +1350,7 @@ You can use |tls| for both |s3| and your application database, or for
13501350

13511351
.. note::
13521352

1353-
Omit this setting to use the application database to store
1353+
Omit this setting to use the {+appdb+} to store
13541354
metadata for the |s3| snapshot store.
13551355

13561356
If you omit this setting, you must also omit the
@@ -1640,11 +1640,58 @@ database settings specific to your |multi-cluster-om|, see
16401640
especially when the system is under heavy load. We recommend using the ``file``
16411641
option for production systems to ensure accurate timestamps.
16421642

1643-
.. opsmgrkube:: spec.applicationDatabase.memberConfig.priority
1643+
.. setting:: spec.applicationDatabase.memberConfig
1644+
1645+
*Type*: array of objects
1646+
1647+
Specification for each {+appdb+} replica set member in your |onprem| deployment.
1648+
1649+
.. important::
1650+
1651+
If you set :opsmgrkube:`spec.topology` to ``MultiCluster``, use
1652+
:setting:`spec.applicationDatabase.clusterSpecList.memberConfig` instead
1653+
of :setting:`spec.applicationDatabase.memberConfig`.
1654+
In a |multi-cluster-om|, the |k8s-op-short| ignores all parameters under
1655+
:setting:`spec.applicationDatabase.memberConfig`.
1656+
1657+
The number of elements in the ``memberConfig`` list must equal
1658+
:setting:`spec.applicationDatabase.members <spec.members>`.
1659+
1660+
The order of the elements in the ``memberConfig`` list must reflect the order
1661+
of members in the replica set. For example, the first element of the array
1662+
affects the Pod at index ``0``, the second element affects index ``1``, and so on.
1663+
1664+
.. example::
1665+
1666+
Consider the following example specification for a
1667+
three-member replica set for the {+appdb+}:
1668+
1669+
.. code-block:: yaml
1670+
1671+
spec:
1672+
applicationDatabase:
1673+
memberConfig:
1674+
- votes: 1
1675+
priority: "0.5"
1676+
tags:
1677+
tag1: "value1"
1678+
environment: "prod"
1679+
- votes: 1
1680+
priority: "1.5"
1681+
tags:
1682+
tag2: "value2"
1683+
environment: "prod"
1684+
- votes: 0
1685+
priority: "0"
1686+
tags:
1687+
tag2: "value2"
1688+
environment: "prod"
1689+
1690+
.. setting:: spec.applicationDatabase.memberConfig.priority
16441691

16451692
*Type*: string
16461693

1647-
Number that indicates the relative likelihood of an application database replica set member to become the `primary <https://www.mongodb.com/docs/manual/reference/glossary/#std-term-primary>`__.
1694+
Number that indicates the relative likelihood of an {+appdb+} replica set member to become the `primary <https://www.mongodb.com/docs/manual/reference/glossary/#std-term-primary>`__.
16481695

16491696
* To increase the relative likelihood that a replica set member becomes the primary, specify a higher ``priority`` value.
16501697

@@ -1654,18 +1701,18 @@ database settings specific to your |multi-cluster-om|, see
16541701

16551702
A member with a ``memberConfig.priority`` of ``0`` is ineligible to become the primary. To learn more, see :manual:`Member Priority </core/replica-set-elections/#voting-members>`.
16561703

1657-
.. opsmgrkube:: spec.applicationDatabase.memberConfig.tags
1704+
.. setting:: spec.applicationDatabase.memberConfig.tags
16581705

16591706
*Type*: map
16601707

16611708
Map of :manual:`replica set tags </tutorial/configure-replica-set-tag-sets/>` for directing
1662-
read and write operations to specific members of your application database replica set.
1709+
read and write operations to specific members of your {+appdb+} replica set.
16631710

1664-
.. opsmgrkube:: spec.applicationDatabase.memberConfig.votes
1711+
.. setting:: spec.applicationDatabase.memberConfig.votes
16651712

16661713
*Type*: number
16671714

1668-
Determines whether an application database replica set member can vote in an :manual:`election </core/replica-set-elections/#voting-members>`. Set to ``1`` to allow the member to vote. Set to ``0`` to exclude the member from an election.
1715+
Determines whether an {+appdb+} replica set member can vote in an :manual:`election </core/replica-set-elections/#voting-members>`. Set to ``1`` to allow the member to vote. Set to ``0`` to exclude the member from an election.
16691716

16701717
.. opsmgrkube:: spec.applicationDatabase.passwordSecretKeyRef.name
16711718

@@ -1692,7 +1739,7 @@ database settings specific to your |multi-cluster-om|, see
16921739
*Type*: string
16931740

16941741
Text to prefix to the |k8s| |k8s-secret| that you
1695-
created that contains your application database's |tls| key and
1742+
created that contains your {+appdb+}'s |tls| key and
16961743
certificate.
16971744

16981745
You must name your secret ``<prefix>-<metadata.name>-db-cert``.
@@ -1705,15 +1752,15 @@ database settings specific to your |multi-cluster-om|, see
17051752
*Type*: string
17061753

17071754
Name of the |k8s| |k8s-configmap| containing the |certauth| file for
1708-
the application database.
1755+
the {+appdb+}.
17091756

17101757
.. important::
17111758

17121759
:opsmgrkube:`spec.applicationDatabase.security.tls.ca` is required
1713-
if you use a custom |certauth| to sign your application database's
1760+
if you use a custom |certauth| to sign your {+appdb+}'s
17141761
|tls| certificates.
17151762

1716-
The |k8s-op-short| requires that you name the application database's
1763+
The |k8s-op-short| requires that you name the {+appdb+}'s
17171764
certificate ``ca-pem`` in the ConfigMap.
17181765

17191766
The |certauth| specified in this section is also used for
@@ -1724,9 +1771,9 @@ database settings specific to your |multi-cluster-om|, see
17241771

17251772
This |certauth| signs the certificates that:
17261773

1727-
- the application database replica set members use to communicate
1774+
- the {+appdb+} replica set members use to communicate
17281775
with one another, and
1729-
- |onprem| uses to communicate with the application database replica
1776+
- |onprem| uses to communicate with the {+appdb+} replica
17301777
set.
17311778

17321779
.. include:: /includes/admonitions/warning-concatenate-download-certs.rst
@@ -1742,15 +1789,15 @@ database settings specific to your |multi-cluster-om|, see
17421789
setting.
17431790

17441791
Encrypts communications using |tls| certificates between |onprem| and
1745-
the application database.
1792+
the {+appdb+}.
17461793

17471794
.. _om-prometheus-settings:
17481795

17491796
Prometheus Settings
17501797
~~~~~~~~~~~~~~~~~~~
17511798

17521799
The following settings apply when you use Prometheus with your
1753-
application database:
1800+
{+appdb+}:
17541801

17551802
.. setting:: spec.applicationDatabase.prometheus
17561803

@@ -1773,7 +1820,7 @@ application database:
17731820

17741821
*Conditional* Object that contains the details of the |k8s-secret| for
17751822
basic HTTP authentication. If you want to use Prometheus with your
1776-
application database, you must specify this setting.
1823+
{+appdb+}, you must specify this setting.
17771824

17781825
.. setting:: spec.applicationDatabase.prometheus.passwordSecretRef.key
17791826

@@ -1793,7 +1840,7 @@ application database:
17931840

17941841
Human-readable label that identifies the |k8s-secret| that contains
17951842
the password for basic HTTP authentication. If you want to use
1796-
Prometheus with your application database, you must specify this
1843+
Prometheus with your {+appdb+}, you must specify this
17971844
setting.
17981845

17991846
.. setting:: spec.applicationDatabase.prometheus.port
@@ -1828,7 +1875,7 @@ application database:
18281875

18291876
*Conditional*. Human-readable label that identifies the |k8s-secret|
18301877
that contains the password for |tls| authentication. If you want to use
1831-
Prometheus with your application database and you want to use |tls|
1878+
Prometheus with your {+appdb+} and you want to use |tls|
18321879
authentication, you must specify this setting.
18331880

18341881
.. setting:: spec.applicationDatabase.prometheus.username
@@ -2109,3 +2156,102 @@ This section describes settings specific to your
21092156

21102157
To learn more, see the :ref:`example of the multi-cluster resource specification <om_resource_spec_example_multi_cluster>`.
21112158

2159+
{+appdb+} Optional Settings
2160+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2161+
2162+
This section describes settings specific to your
2163+
|multi-cluster-om| that you can use for your {+appdb+}.
2164+
2165+
.. setting:: spec.applicationDatabase.clusterSpecList.memberConfig
2166+
2167+
*Type*: array of strings
2168+
2169+
Specification for each {+appdb+} replica set member in your |multi-cluster-om|.
2170+
2171+
.. important::
2172+
2173+
If you set :opsmgrkube:`spec.topology` to ``SingleCluster``, use
2174+
:setting:`spec.applicationDatabase.memberConfig` instead of :setting:`spec.applicationDatabase.clusterSpecList.memberConfig`.
2175+
2176+
The number of elements in the ``memberConfig`` list must equal
2177+
:opsmgrkube:`spec.applicationDatabase.clusterSpecList.members`.
2178+
2179+
The order of the elements in the ``memberConfig`` list must reflect the order
2180+
of members in the replica set. For example, the first element of the array
2181+
affects the Pod at index ``0``, the second element affects index ``1``, and so on.
2182+
2183+
.. example::
2184+
2185+
Consider the following example specification for a
2186+
three-member replica set for the {+appdb+}:
2187+
2188+
.. code-block:: yaml
2189+
2190+
spec:
2191+
replicas: 3
2192+
version: 4.4.1
2193+
backup:
2194+
enabled: true
2195+
storage:
2196+
resources:
2197+
requests:
2198+
storage: 10Gi
2199+
storageClassName: standard
2200+
applicationDatabase:
2201+
clusterSpecList:
2202+
- name: appdb
2203+
members: 3
2204+
memberConfig:
2205+
- votes: 1
2206+
priority: "0.5"
2207+
tags:
2208+
tag1: "value1"
2209+
environment: "prod"
2210+
- votes: 1
2211+
priority: "1.5"
2212+
tags:
2213+
tag2: "value2"
2214+
environment: "prod"
2215+
- votes: 0
2216+
priority: "0"
2217+
tags:
2218+
tag2: "value2"
2219+
environment: "prod"
2220+
2221+
.. setting:: spec.applicationDatabase.clusterSpecList.memberConfig.priority
2222+
2223+
*Type*: string
2224+
2225+
Number that indicates the relative likelihood of an {+appdb+} replica
2226+
set member to become the
2227+
`primary <https://www.mongodb.com/docs/manual/reference/glossary/#std-term-primary>`__.
2228+
2229+
* To increase the relative likelihood that a replica set member becomes the
2230+
primary, specify a higher ``priority`` value.
2231+
2232+
* To decrease the relative likelihood that a replica set member becomes the
2233+
primary, specify a lower ``priority`` value.
2234+
2235+
For example, a member with a ``memberConfig.priority`` of ``1.5`` is more
2236+
likely than a member with a ``memberConfig.priority`` of ``0.5`` to become the
2237+
primary.
2238+
2239+
A member with a ``memberConfig.priority`` of ``0`` is ineligible to become the
2240+
primary. To learn more,
2241+
see :manual:`Member Priority </core/replica-set-elections/#voting-members>`.
2242+
2243+
.. setting:: spec.applicationDatabase.clusterSpecList.memberConfig.tags
2244+
2245+
*Type*: map
2246+
2247+
Map of :manual:`replica set tags </tutorial/configure-replica-set-tag-sets/>`
2248+
for directing read and write operations to specific members of your {+appdb+} replica set.
2249+
2250+
.. setting:: spec.applicationDatabase.clusterSpecList.memberConfig.votes
2251+
2252+
*Type*: number
2253+
2254+
Determines whether an {+appdb+} replica set member can vote in an
2255+
:manual:`election </core/replica-set-elections/#voting-members>`. Set to ``1``
2256+
to allow the member to vote. Set to ``0`` to exclude the member from an election.
2257+

0 commit comments

Comments
 (0)