@@ -354,6 +354,50 @@ There are two magic values for the secret name:
354354- ` None` specifies no action. This disables root password randomization. This is the default value. (Thus the root password is empty - not recommended)
355355- ` Auto` specifies automatic name generation, which is `<deploymentname>-root-password`.
356356
357+ # ## `spec.metrics.enabled: bool`
358+
359+ If this is set to `true`, the operator runs a sidecar container for
360+ every DBserver pod and every coordinator pod. The sidecar container runs
361+ the ArangoDB-exporter and exposes metrics of the corresponding `arangod`
362+ instance in Prometheus format on port 9101 under path `/metrics`. You
363+ also have to specify a string for `spec.metrics.image`, which is the
364+ Docker image name of the `arangodb-exporter`. At the time of this
365+ writing you should use `arangodb/arangodb-exporter:0.1.6`. See [this
366+ repository](https://github.com/arangodb-helper/arangodb-exporter) for
367+ the latest version.
368+
369+ In addition to the sidecar containers the operator will deploy a service
370+ to access the exporter ports (from within the k8s cluster), and a
371+ resource of type `ServiceMonitor`, provided the corresponding custom
372+ resource definition is deployed in the k8s cluster. If you are running
373+ Prometheus in the same k8s cluster with the Prometheus operator, this
374+ will be the case. The `ServiceMonitor` will have the following labels
375+ set :
376+
377+ - `app : arangodb`
378+ - `arango_deployment : YOUR_DEPLOYMENT_NAME`
379+ - `context : metrics`
380+ - `metrics : prometheus`
381+
382+ This makes it possible that you configure your Prometheus deployment to
383+ automatically start monitoring on the available Prometheus feeds. To
384+ this end, you must configure the `serviceMonitorSelector` in the specs
385+ of your Prometheus deployment to match these labels. For example :
386+
387+ ` ` ` yaml
388+ serviceMonitorSelector:
389+ matchLabels:
390+ metrics: prometheus
391+ ` ` `
392+
393+ would automatically select all pods of all ArangoDB cluster deployments
394+ which have metrics enabled.
395+
396+ # ## `spec.metrics.image: string`
397+
398+ See above, this is the name of the Docker image for the ArangoDB
399+ exporter to expose metrics.
400+
357401# ## `spec.<group>.count: number`
358402
359403This setting specifies the number of servers to start for the given group.
@@ -457,4 +501,4 @@ because servers in these groups do not need persistent storage.
457501
458502Please use VolumeClaimTemplate from now on. This field is not considered if
459503VolumeClaimTemplate is set. Note however, that the information in requests
460- is completely handed over to the pod in this case.
504+ is completely handed over to the pod in this case.
0 commit comments