@@ -175,6 +175,41 @@ but make the following adjustments:
175
175
helm template --set namespace=<namespace> \
176
176
helm_chart -x templates/database-roles.yaml | kubectl apply -f -
177
177
178
+ Customize the CustomResourceDefinitions the |k8s-op-short| Watches
179
+ ------------------------------------------------------------------
180
+
181
+ Earlier versions of the |k8s-op-short| would crash on start up if
182
+ any one of the MongoDB |k8s-crds| was not present in the cluster.
183
+ For instance, you had to install the CustomResourceDefinition for
184
+ |onprem| even if you did not plan to deploy it with the |k8s-op-short|.
185
+
186
+ You can now specify which custom resources you want the
187
+ |k8s-op-short| to watch. This allows you to install the
188
+ CustomResourceDefinition for only the resources that you want the
189
+ |k8s-op-short| to manage.
190
+
191
+ You must use ``helm`` to configure the |k8s-op-short| to watch only the
192
+ custom resources you specify. Follow the relevant ``helm``
193
+ :ref:`installation instructions <install-k8s-operator>`,
194
+ but make the following adjustments:
195
+
196
+ 1. Decide which CustomResourceDefinitions you want to install. You can
197
+ install any number of the following:
198
+
199
+ .. include:: /includes/list-tables/crds.rst
200
+
201
+ #. Use the ``-- set`` option on the ``operator.watchedResources`` field
202
+ with the ``helm template`` command to specify which
203
+ CustomResourceDefinitions you want to install and configure the
204
+ |k8s-op-short| to watch them.
205
+
206
+ Separate each custom resource with a comma:
207
+
208
+ .. code-block:: sh
209
+
210
+ helm template --set operator.watchedResources="{mongodb,mongodbusers}" \
211
+ helm_chart | kubectl apply -f -
212
+
178
213
.. _k8s-prerequisites:
179
214
180
215
Prerequisites
0 commit comments