[incubator/cassandra] Cassandra Exporter (#8325)

* Fix Statefulset definition

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

* Cassandra exporter

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>
This commit is contained in:
Maciej Bryński
2018-10-14 01:44:58 -07:00
committed by k8s-ci-robot
parent 68da43ea17
commit 8879323c13
4 changed files with 49 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: cassandra
version: 0.6.4
version: 0.7.0
appVersion: 3.11.3
description: Apache Cassandra is a free and open-source distributed database management
system designed to handle large amounts of data across many commodity servers, providing
+6
View File
@@ -104,6 +104,7 @@ The following table lists the configurable parameters of the Cassandra chart and
| `resources` | CPU/Memory resource requests/limits | Memory: `4Gi`, CPU: `2` |
| `service.type` | k8s service type exposing ports, e.g. `NodePort`| `ClusterIP` |
| `podManagementPolicy` | podManagementPolicy of the StatefulSet | `OrderedReady` |
| `podAnnotations` | pod annotations for the StatefulSet | `{}` |
| `updateStrategy.type` | UpdateStrategy of the StatefulSet | `OnDelete` |
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `90` |
| `livenessProbe.periodSeconds` | How often to perform the probe | `30` |
@@ -126,6 +127,11 @@ The following table lists the configurable parameters of the Cassandra chart and
| `backup.env` | Backup environment variables | AWS_REGION: `us-east-1` |
| `backup.resources` | Backup CPU/Memory resource requests/limits | Memory: `1Gi`, CPU: `1` |
| `backup.destination` | Destination to store backup artifacts | `s3://bucket/cassandra` |
| `exporter.enabled` | Enable Cassandra exporter | `false` |
| `exporter.image.repo` | Exporter image repository | `criteord/cassandra_exporter` |
| `exporter.image.tag` | Exporter image tag | `2.0.2` |
| `exporter.port` | Exporter port | `5556` |
| `exporter.jvmOpts` | Exporter additional JVM options | |
## Scale cassandra
When you want to change the cluster size of your cassandra, you can use the helm upgrade command.
@@ -24,6 +24,10 @@ spec:
release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
{{- if .Values.podAnnotations }}
annotations:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if .Values.selector }}
@@ -39,6 +43,30 @@ spec:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
containers:
{{- if .Values.exporter.enabled }}
- name: cassandra-exporter
image: "{{ .Values.exporter.image.repo }}:{{ .Values.exporter.image.tag }}"
env:
- name: CASSANDRA_EXPORTER_CONFIG_listenPort
value: {{ .Values.exporter.port | quote }}
- name: JVM_OPTS
value: {{ .Values.exporter.jvmOpts | quote }}
ports:
- name: metrics
containerPort: {{ .Values.exporter.port }}
protocol: TCP
- name: jmx
containerPort: 5555
livenessProbe:
tcpSocket:
port: {{ .Values.exporter.port }}
readinessProbe:
httpGet:
path: /metrics
port: {{ .Values.exporter.port }}
initialDelaySeconds: 20
timeoutSeconds: 45
{{- end }}
- name: {{ template "cassandra.fullname" . }}
image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+14
View File
@@ -87,6 +87,10 @@ readinessProbe:
# nodeSelector:
# cloud.google.com/gke-nodepool: pool-db
## Additional pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podAnnotations: {}
## Additional pod labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podLabels: {}
@@ -162,3 +166,13 @@ backup:
# Additional support can added.
# Ref: https://github.com/maorfr/skbn
destination: s3://bucket/cassandra
## Cassandra exported configuration
## ref: https://github.com/criteo/cassandra_exporter
exporter:
enabled: false
image:
repo: criteord/cassandra_exporter
tag: 2.0.2
port: 5556
jvmOpts: ""