Skip to content

Commit

Permalink
Add resource limits and requests to clickhouse and tabix (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha-alisch authored Jul 23, 2020
1 parent a61af24 commit a9047db
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clickhouse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ keywords:
name: clickhouse
sources:
- https://github.com/sentry-kubernetes/charts
version: 1.4.1
version: 1.5.0
3 changes: 3 additions & 0 deletions clickhouse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ The following tables lists the configurable parameters of the Clickhouse chart a
| `clickhouse.readinessProbe.timeoutSeconds` | When the probe times out | `5` |
| `clickhouse.readinessProbe.failureThreshold` | Minimum consecutive successes for the probe | `3` |
| `clickhouse.readinessProbe.successThreshold` | Minimum consecutive failures for the probe | `1` |
|`clickhouse.resources` | The resource requests and limits for Clickhouse pods |`{}` |
| `clickhouse.persistentVolumeClaim.enabled` | Enable persistence using a `PersistentVolumeClaim` | `false` |
| `clickhouse.persistentVolumeClaim.dataPersistentVolume.enabled` | Turn on and off dataPersistentVolume | `false` |
| `clickhouse.persistentVolumeClaim.dataPersistentVolume.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
Expand Down Expand Up @@ -154,6 +155,8 @@ The following tables lists the configurable parameters of the Clickhouse chart a
| `tabix.readinessProbe.timeoutSeconds` | When the probe times out | `5` |
| `tabix.readinessProbe.failureThreshold` | Minimum consecutive successes for the probe | `3` |
| `tabix.readinessProbe.successThreshold` | Minimum consecutive failures for the probe | `1` |
|`tabix.resources` | The resource requests and limits for Tabix pods |`{}` |

| `tabix.security.user` | Tabix login username | `admin` |
| `tabix.security.password` | Tabix login password | `admin` |
| `tabix.automaticConnection.chName` | Automatic connection Clickhouse name | `` |
Expand Down
4 changes: 4 additions & 0 deletions clickhouse/templates/deployment-tabix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,8 @@ spec:
failureThreshold: {{ .Values.tabix.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.tabix.readinessProbe.successThreshold }}
{{- end }}
{{- if .Values.tabix.resources }}
resources:
{{ toYaml .Values.tabix.resources | indent 10 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions clickhouse/templates/statefulset-clickhouse-replica.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ spec:
timeoutSeconds: {{ .Values.clickhouse.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.clickhouse.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.clickhouse.readinessProbe.successThreshold }}
{{- end }}
{{- if .Values.clickhouse.resources }}
resources:
{{ toYaml .Values.clickhouse.resources | indent 10 }}
{{- end }}
volumeMounts:
- name: {{ include "clickhouse.fullname" . }}-replica-data
Expand Down
4 changes: 4 additions & 0 deletions clickhouse/templates/statefulset-clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ spec:
timeoutSeconds: {{ .Values.clickhouse.readinessProbe.timeoutSeconds }}
failureThreshold: {{ .Values.clickhouse.readinessProbe.failureThreshold }}
successThreshold: {{ .Values.clickhouse.readinessProbe.successThreshold }}
{{- end }}
{{- if .Values.clickhouse.resources }}
resources:
{{ toYaml .Values.clickhouse.resources | indent 10 }}
{{- end }}
volumeMounts:
- name: {{ include "clickhouse.fullname" . }}-data
Expand Down
6 changes: 6 additions & 0 deletions clickhouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ clickhouse:
imageVersion: "19.14"
imagePullPolicy: "IfNotPresent"

## The resource limits and requests used by clickhouse
resources: {}

init:
image: "busybox"
imageVersion: "1.31.0"
Expand Down Expand Up @@ -425,3 +428,6 @@ tabix:
# - "tabix.domain.com"
# - "tabix.domain1.com"
# secretName: "tabix-secret"

## The resource limits and requests used by tabix
resources: {}

0 comments on commit a9047db

Please sign in to comment.