diff --git a/keydb/Chart.yaml b/keydb/Chart.yaml index 9f19729..bfe96f2 100644 --- a/keydb/Chart.yaml +++ b/keydb/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: keydb description: A Helm chart for KeyDB multimaster setup type: application -version: 0.10.1 +version: 0.11.0 keywords: - keydb - redis diff --git a/keydb/README.md b/keydb/README.md index 5bcdac9..a99734d 100644 --- a/keydb/README.md +++ b/keydb/README.md @@ -30,25 +30,34 @@ helm install keydb enapter/keydb The following table lists the configurable parameters of the KeyDB chart and their default values. -| Parameter | Description | Default | -|:--------------------------------|:------------------------------------------------|:------------------------------| -| `image` | KeyDB docker image | `eqalpha/keydb:x86_64_v5.3.3` | -| `imagePullPolicy` | K8s imagePullPolicy | `IfNotPresent` | -| `nodes` | Number of KeyDB master pods | `3` | -| `password` | If enabled KeyDB servers are password-protected | `""` | -| `port` | KeyDB service port clients connect to | `6379` | -| `threads` | KeyDB server-threads per node | `2` | -| `appendonly` | KeyDB appendonly setting | `"no"` | -| `persistentVolume.enabled` | Should PVC be created via volumeClaimTemplates | `true` | -| `persistentVolume.accessModes` | Volume access modes | `[ReadWriteOnce]` | -| `persistentVolume.size` | Size of the volume | `1Gi` | -| `persistentVolume.storageClass` | StorageClassName for volume | `` | -| `configExtraArgs` | Additional configuration arguments for KeyDB | `{}` | -| `resources` | K8s Resources for KeyDB containers | `{}` | -| `securityContext` | K8s SecurityContext for KeyDB pods | `{}` | -| `loadBalancer.enabled` | Create LoadBalancer service | `false` | -| `loadBalancer.annotations` | Annotations for LB | `{}` | -| `loadBalancer.extraSpec` | Additional spec for LB | `{}` | -| `additionalAffinities` | Additional affinities for StatefulSet | `{}` | -| `livenessProbe` | LivenessProbe for StatefulSet | Look values.yaml | -| `readinessProbe` | ReadinessProbe for StatefulSet | Look values.yaml | +| Parameter | Description | Default | +|:--------------------------------|:------------------------------------------------|:-----------------------------------------| +| `image` | KeyDB docker image | `eqalpha/keydb:x86_64_v5.3.3` | +| `imagePullPolicy` | K8s imagePullPolicy | `IfNotPresent` | +| `nodes` | Number of KeyDB master pods | `3` | +| `password` | If enabled KeyDB servers are password-protected | `""` | +| `port` | KeyDB service port clients connect to | `6379` | +| `threads` | KeyDB server-threads per node | `2` | +| `appendonly` | KeyDB appendonly setting | `"no"` | +| `persistentVolume.enabled` | Should PVC be created via volumeClaimTemplates | `true` | +| `persistentVolume.accessModes` | Volume access modes | `[ReadWriteOnce]` | +| `persistentVolume.size` | Size of the volume | `1Gi` | +| `persistentVolume.storageClass` | StorageClassName for volume | `` | +| `configExtraArgs` | Additional configuration arguments for KeyDB | `{}` | +| `resources` | Resources for KeyDB containers | `{}` | +| `securityContext` | SecurityContext for KeyDB pods | `{}` | +| `loadBalancer.enabled` | Create LoadBalancer service | `false` | +| `loadBalancer.annotations` | Annotations for LB | `{}` | +| `loadBalancer.extraSpec` | Additional spec for LB | `{}` | +| `additionalAffinities` | Additional affinities for StatefulSet | `{}` | +| `livenessProbe` | LivenessProbe for StatefulSet | Look values.yaml | +| `readinessProbe` | ReadinessProbe for StatefulSet | Look values.yaml | +| `exporter.enabled` | Prometheus Exporter sidecar contaner | `false` | +| `exporter.image` | Exporter Image | `oliver006/redis_exporter:v1.8.0-alpine` | +| `exporter.pullPolicy` | Exporter imagePullPolicy | `IfNotPresent` | +| `exporter.port` | `prometheus.io/port` | `9121` | +| `exporter.scrapePath` | `prometheus.io/path` | `/metrics` | +| `exporter.livenessProbe` | LivenessProbe for sidecar Prometheus exporter | Look values.yaml | +| `exporter.readinessProbe` | ReadinessProbe for sidecar Prometheus exporter | Look values.yaml | +| `exporter.resources` | Resources for sidecar Prometheus container | `{}` | +| `exporter.extraArgs` | Additional arguments for exporter | `{}` | diff --git a/keydb/templates/sts.yaml b/keydb/templates/sts.yaml index c4d0cb9..42cadce 100644 --- a/keydb/templates/sts.yaml +++ b/keydb/templates/sts.yaml @@ -15,9 +15,9 @@ spec: annotations: checksum/secret-utils: {{ include (print $.Template.BasePath "/secret-utils.yaml") . | sha256sum }} {{- if .Values.exporter.enabled }} - prometheus.io/port: "{{ .Values.exporter.port }}" - prometheus.io/scrape: "{{ .Values.exporter.scrape }}" + prometheus.io/scrape: "true" prometheus.io/path: "{{ .Values.exporter.scrapePath }}" + prometheus.io/port: "{{ .Values.exporter.port }}" {{- end }} labels: {{ include "keydb.labels" . | indent 8 }} @@ -69,7 +69,7 @@ spec: readOnly: true {{- if .Values.exporter.enabled }} - name: redis-exporter - image: "{{ .Values.exporter.image }}:{{ .Values.exporter.tag }}" + image: {{ .Values.exporter.image }} imagePullPolicy: {{ .Values.exporter.pullPolicy }} args: {{- range $key, $value := .Values.exporter.extraArgs }} @@ -77,18 +77,19 @@ spec: {{- end }} env: - name: REDIS_ADDR - value: redis://{{ default "localhost" .Values.exporter.address }}:{{ .Values.port }} + value: redis://localhost:6379 {{- if .Values.password }} - name: REDIS_PASSWORD value: "{{ .Values.password }}" {{- end }} + {{- if .Values.exporter.livenessProbe }} livenessProbe: - httpGet: - path: {{ .Values.exporter.scrapePath }} - port: {{ .Values.exporter.port }} - initialDelaySeconds: 10 - timeoutSeconds: 1 - periodSeconds: 15 +{{ toYaml .Values.exporter.livenessProbe | indent 10 }} + {{- end }} + {{- if .Values.exporter.readinessProbe }} + readinessProbe: +{{ toYaml .Values.exporter.readinessProbe | indent 10 }} + {{- end }} resources: {{ toYaml .Values.exporter.resources | indent 10 }} ports: diff --git a/keydb/values.yaml b/keydb/values.yaml index 1849acf..20b5cfe 100644 --- a/keydb/values.yaml +++ b/keydb/values.yaml @@ -75,21 +75,30 @@ readinessProbe: # Redis exporter exporter: - enabled: true - image: oliver006/redis_exporter - tag: v1.8.0-alpine + enabled: false + image: oliver006/redis_exporter:v1.8.0-alpine pullPolicy: IfNotPresent - # prometheus port & scrape path - scrape: true + # Prometheus port & scrape path port: 9121 scrapePath: /metrics - # Address/Host for Redis instance. - address: localhost - - # cpu/memory resource limits/requests + # Liveness Probe + livenessProbe: + httpGet: + path: /metrics + port: 9121 + initialDelaySeconds: 15 + + # Readiness Probe + readinessProbe: + httpGet: + path: /metrics + port: 9121 + initialDelaySeconds: 10 + + # CPU/Memory resource limits/requests resources: {} # Additional args for redis exporter - extraArgs: {} \ No newline at end of file + extraArgs: {}