Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ ARANGOSYNCTESTCTRLBINNAME := $(PROJECT)_sync_test_ctrl
ARANGOSYNCTESTCTRLBIN := $(BINDIR)/$(ARANGOSYNCTESTCTRLBINNAME)

.PHONY: all
all: verify-generated build
all: build

.PHONY: allall
allall: verify-generated build

#
# Tip: Run `eval $(minikube docker-env)` before calling make if you're developing on minikube.
Expand Down
50 changes: 49 additions & 1 deletion docs/Manual/Deployment/Kubernetes/DeploymentResource.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,54 @@ There are two magic values for the secret name:
- `None` specifies no action. This disables root password randomization. This is the default value. (Thus the root password is empty - not recommended)
- `Auto` specifies automatic name generation, which is `<deploymentname>-root-password`.

### `spec.metrics.enabled: bool`

If this is set to `true`, the operator runs a sidecar container for
every DBserver pod and every coordinator pod. The sidecar container runs
the ArangoDB-exporter and exposes metrics of the corresponding `arangod`
instance in Prometheus format on port 9101 under path `/metrics`. You
also have to specify a string for `spec.metrics.image`, which is the
Docker image name of the `arangodb-exporter`. At the time of this
writing you should use `arangodb/arangodb-exporter:0.1.6`. See [this
repository](https://github.com/arangodb-helper/arangodb-exporter) for
the latest version. If the image name is left empty, the same image as
for the main deployment is used. Note however, that current ArangoDB
releases (<= 3.4.5) do not ship the exporter in their image. This is
going to change in the future.

In addition to the sidecar containers the operator will deploy a service
to access the exporter ports (from within the k8s cluster), and a
resource of type `ServiceMonitor`, provided the corresponding custom
resource definition is deployed in the k8s cluster. If you are running
Prometheus in the same k8s cluster with the Prometheus operator, this
will be the case. The `ServiceMonitor` will have the following labels
set:

- `app: arangodb`
- `arango_deployment: YOUR_DEPLOYMENT_NAME`
- `context: metrics`
- `metrics: prometheus`

This makes it possible that you configure your Prometheus deployment to
automatically start monitoring on the available Prometheus feeds. To
this end, you must configure the `serviceMonitorSelector` in the specs
of your Prometheus deployment to match these labels. For example:

```yaml
serviceMonitorSelector:
matchLabels:
metrics: prometheus
```

would automatically select all pods of all ArangoDB cluster deployments
which have metrics enabled.

### `spec.metrics.image: string`

See above, this is the name of the Docker image for the ArangoDB
exporter to expose metrics. If empty, the same image as for the main
deployment is used.

### `spec.<group>.count: number`

This setting specifies the number of servers to start for the given group.
Expand Down Expand Up @@ -457,4 +505,4 @@ because servers in these groups do not need persistent storage.

Please use VolumeClaimTemplate from now on. This field is not considered if
VolumeClaimTemplate is set. Note however, that the information in requests
is completely handed over to the pod in this case.
is completely handed over to the pod in this case.
5 changes: 5 additions & 0 deletions docs/Manual/Deployment/Kubernetes/Metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ The metrics are exposed through HTTPS on port `8528` under path `/metrics`.
Look at [examples/metrics](https://github.com/arangodb/kube-arangodb/tree/master/examples/metrics)
for examples of `Services` and `ServiceMonitors` you can use to integrate
with Prometheus through the [Prometheus-Operator by CoreOS](https://github.com/coreos/prometheus-operator).

Furthermore, the operator can run sidecar containers for ArangoDB
deployments of type Cluster which expose metrics in Prometheus format.
Use the attribute `spec.metrics` to set this up see the [spec
reference](./DeploymentResource.md) for details.
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ require (
github.com/coreos/go-semver v0.3.0
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
github.com/coreos/prometheus-operator v0.30.0
github.com/cpuguy83/go-md2man v1.0.10
github.com/davecgh/go-spew v1.1.1
github.com/dchest/uniuri v0.0.0-20160212164326-8902c56451e9
Expand All @@ -45,7 +46,7 @@ require (
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
github.com/dustin/go-broadcast v0.0.0-20171205050544-f664265f5a66
github.com/dustin/go-humanize v1.0.0
github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633
github.com/emicklei/go-restful v2.6.0+incompatible
github.com/evanphx/json-patch v4.2.0+incompatible // indirect
github.com/ewoutp/go-gitlab-client v0.0.0-20150214183219-6e4464cd3221
github.com/ghodss/yaml v1.0.0
Expand All @@ -55,8 +56,8 @@ require (
github.com/go-kit/kit v0.8.0
github.com/go-openapi/analysis v0.19.0
github.com/go-openapi/errors v0.19.0
github.com/go-openapi/jsonpointer v0.18.0
github.com/go-openapi/jsonreference v0.18.0
github.com/go-openapi/jsonpointer v0.19.0
github.com/go-openapi/jsonreference v0.19.0
github.com/go-openapi/loads v0.19.0
github.com/go-openapi/runtime v0.19.0
github.com/go-openapi/spec v0.18.0
Expand Down Expand Up @@ -130,7 +131,7 @@ require (
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20190506115046-ca7f33d4116e
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db
golang.org/x/text v0.3.1
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc
google.golang.org/api v0.4.0 // indirect
Expand All @@ -147,9 +148,8 @@ require (
k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
k8s.io/client-go v11.0.0+incompatible
k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6
k8s.io/gengo v0.0.0-20190327210449-e17681d19d3a
k8s.io/klog v0.3.0
k8s.io/kube-openapi v0.0.0-20190502190224-411b2483e503 // indirect
k8s.io/utils v0.0.0-20190506122338-8fab8cb257d5 // indirect
sigs.k8s.io/yaml v1.1.0 // indirect
)
Loading