@@ -354,6 +354,54 @@ 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. If the image name is left empty, the same image as
368+ for the main deployment is used. Note however, that current ArangoDB
369+ releases (<= 3.4.5) do not ship the exporter in their image. This is
370+ going to change in the future.
371+
372+ In addition to the sidecar containers the operator will deploy a service
373+ to access the exporter ports (from within the k8s cluster), and a
374+ resource of type `ServiceMonitor`, provided the corresponding custom
375+ resource definition is deployed in the k8s cluster. If you are running
376+ Prometheus in the same k8s cluster with the Prometheus operator, this
377+ will be the case. The `ServiceMonitor` will have the following labels
378+ set :
379+
380+ - `app : arangodb`
381+ - `arango_deployment : YOUR_DEPLOYMENT_NAME`
382+ - `context : metrics`
383+ - `metrics : prometheus`
384+
385+ This makes it possible that you configure your Prometheus deployment to
386+ automatically start monitoring on the available Prometheus feeds. To
387+ this end, you must configure the `serviceMonitorSelector` in the specs
388+ of your Prometheus deployment to match these labels. For example :
389+
390+ ` ` ` yaml
391+ serviceMonitorSelector:
392+ matchLabels:
393+ metrics: prometheus
394+ ` ` `
395+
396+ would automatically select all pods of all ArangoDB cluster deployments
397+ which have metrics enabled.
398+
399+ # ## `spec.metrics.image: string`
400+
401+ See above, this is the name of the Docker image for the ArangoDB
402+ exporter to expose metrics. If empty, the same image as for the main
403+ deployment is used.
404+
357405# ## `spec.<group>.count: number`
358406
359407This setting specifies the number of servers to start for the given group.
@@ -457,4 +505,4 @@ because servers in these groups do not need persistent storage.
457505
458506Please use VolumeClaimTemplate from now on. This field is not considered if
459507VolumeClaimTemplate is set. Note however, that the information in requests
460- is completely handed over to the pod in this case.
508+ is completely handed over to the pod in this case.
0 commit comments