Compare commits

...

4 Commits

Author SHA1 Message Date
12764c8d0f Update helm/chart-testing-action action to v2.8.0
Some checks failed
lint-and-test / chart-testing (pull_request) Failing after 2m36s
lint-and-test / lint-helm (pull_request) Failing after 24s
2025-12-15 06:14:10 +00:00
d4eeea5c99 adjustments to layout
All checks were successful
renovate / renovate (push) Successful in 23s
lint-and-test / lint-helm (push) Successful in 10s
release-charts-redis-replication / release (push) Successful in 15s
lint-and-test / chart-testing (push) Successful in 20s
2025-12-15 00:13:45 -06:00
510c575424 enable on enable
All checks were successful
renovate / renovate (push) Successful in 29s
lint-and-test / lint-helm (push) Successful in 9s
release-charts-redis-replication / release (push) Successful in 17s
lint-and-test / chart-testing (push) Successful in 24s
2025-12-15 00:05:10 -06:00
10d67f205d add service monitor
All checks were successful
lint-and-test / lint-helm (push) Successful in 8s
release-charts-redis-replication / release (push) Successful in 18s
lint-and-test / chart-testing (push) Successful in 25s
renovate / renovate (push) Successful in 22s
2025-12-15 00:02:54 -06:00
7 changed files with 87 additions and 14 deletions

View File

@@ -42,7 +42,7 @@ jobs:
python-version: '3.14'
- name: Set up Chart Testing
uses: helm/chart-testing-action@v2.7.0
uses: helm/chart-testing-action@v2.8.0
with:
yamale_version: "6.0.0"

View File

@@ -1,6 +1,6 @@
apiVersion: v2
name: redis-replication
version: 0.1.0
version: 0.4.0
description: Redis Replication with Sentinel
keywords:
- redis-operator

View File

@@ -1,6 +1,6 @@
# redis-replication
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: v0.21.0](https://img.shields.io/badge/AppVersion-v0.21.0-informational?style=flat-square)
![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![AppVersion: v0.21.0](https://img.shields.io/badge/AppVersion-v0.21.0-informational?style=flat-square)
Redis Replication with Sentinel
@@ -22,15 +22,16 @@ Redis Replication with Sentinel
| additionalLabels | object | `{}` | Add additional labels |
| existingSecret | object | `{"enabled":false,"key":"password","name":"secret-name"}` | Password |
| namespaceOverride | string | `""` | Override the namespace of the chart |
| redisReplication | object | `{"clusterSize":3,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis","tag":"v8.4.0"},"podSecurityContext":{"fsGroup":1000,"runAsUser":1000},"redisExporter":{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"}},"resources":{"requests":{"cpu":"10m","memory":"128Mi"}},"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"ceph-block"}}}` | Redis Replication settings |
| redisReplication | object | `{"clusterSize":3,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis","tag":"v8.4.0"},"podSecurityContext":{"fsGroup":1000,"runAsUser":1000},"redisExporter":{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"},"serviceMonitor":{"enabled":true,"extraLabels":{},"interval":"30s","scrapeTimeout":"10s"}},"resources":{"requests":{"cpu":"10m","memory":"32Mi"}},"volumeClaimTemplate":{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"ceph-block"}}}` | Redis Replication settings |
| redisReplication.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis","tag":"v8.4.0"}` | Image |
| redisReplication.podSecurityContext | object | `{"fsGroup":1000,"runAsUser":1000}` | Security |
| redisReplication.redisExporter | object | `{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"}}` | Metrics |
| redisReplication.resources | object | `{"requests":{"cpu":"10m","memory":"128Mi"}}` | Resources |
| redisReplication.redisExporter | object | `{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"},"serviceMonitor":{"enabled":true,"extraLabels":{},"interval":"30s","scrapeTimeout":"10s"}}` | Metrics |
| redisReplication.resources | object | `{"requests":{"cpu":"10m","memory":"32Mi"}}` | Resources |
| redisReplication.volumeClaimTemplate | object | `{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"ceph-block"}}` | Storage |
| redisSentinel | object | `{"clusterSize":3,"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"},"podSecurityContext":{"fsGroup":1000,"runAsUser":1000},"resources":{"requests":{"cpu":"10m","memory":"128Mi"}}}` | Redis Sentinel settings |
| redisSentinel | object | `{"clusterSize":3,"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"},"podSecurityContext":{"fsGroup":1000,"runAsUser":1000},"redisExporter":{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"},"serviceMonitor":{"enabled":true,"extraLabels":{},"interval":"30s","scrapeTimeout":"10s"}},"resources":{"requests":{"cpu":"10m","memory":"128Mi"}}}` | Redis Sentinel settings |
| redisSentinel.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"}` | Image |
| redisSentinel.podSecurityContext | object | `{"fsGroup":1000,"runAsUser":1000}` | Security |
| redisSentinel.redisExporter | object | `{"enabled":true,"image":{"repository":"quay.io/opstree/redis-exporter","tag":"v1.80.1"},"serviceMonitor":{"enabled":true,"extraLabels":{},"interval":"30s","scrapeTimeout":"10s"}}` | Metrics |
| redisSentinel.resources | object | `{"requests":{"cpu":"10m","memory":"128Mi"}}` | Resources |
| replicationNameOverride | string | `""` | Override the name of the resources |
| sentinelNameOverride | string | `""` | |

View File

@@ -11,7 +11,7 @@ spec:
podSecurityContext:
{{- with .Values.redisReplication.podSecurityContext }}
{{- toYaml . | nindent 10 }}
{{- toYaml . | nindent 4 }}
{{ end }}
kubernetesConfig:
@@ -19,7 +19,7 @@ spec:
imagePullPolicy: {{ .Values.redisReplication.image.pullPolicy }}
resources:
{{- with .Values.redisReplication.resources }}
{{- toYaml . | nindent 10 }}
{{- toYaml . | nindent 6 }}
{{ end }}
{{ if .Values.existingSecret.enabled }}
@@ -31,7 +31,7 @@ spec:
storage:
volumeClaimTemplate:
{{- with .Values.redisReplication.volumeClaimTemplate }}
{{- toYaml . | nindent 10 }}
{{- toYaml . | nindent 6 }}
{{ end }}
redisExporter:

View File

@@ -38,4 +38,9 @@ spec:
name: {{ .Values.existingSecret.name }}
key: {{ .Values.existingSecret.key }}
{{ end }}
redisExporter:
enabled: {{ .Values.redisSentinel.redisExporter.enabled }}
image: "{{ .Values.redisSentinel.redisExporter.image.repository }}:{{ .Values.redisSentinel.redisExporter.image.tag }}"
{{- end }}

View File

@@ -0,0 +1,49 @@
{{- if .Values.redisReplication.redisExporter.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "redis.replicationName" . }}
namespace: {{ include "redis.namespace" . }}
labels:
{{- include "redis.labels" . | nindent 4 }}
{{- include "redis.replicationSelectorLabels" . | nindent 4 }}
{{- with .Values.redisReplication.redisExporter.serviceMonitor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: {{ include "redis.replicationName" . }}
redis_setup_type: replication
role: replication
endpoints:
- port: redis-exporter
interval: {{ .Values.redisReplication.redisExporter.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.redisReplication.redisExporter.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if and (.Values.redisSentinel.redisExporter.serviceMonitor.enabled) (.Values.redisSentinel.enabled) }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "redis.sentinelName" . }}
namespace: {{ include "redis.namespace" . }}
labels:
{{- include "redis.labels" . | nindent 4 }}
{{- include "redis.sentinelSelectorLabels" . | nindent 4 }}
{{- with .Values.redisSentinel.redisExporter.serviceMonitor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: {{ include "redis.sentinelName" . }}
redis_setup_type: sentinel
role: sentinel
endpoints:
- port: sentinel-client
interval: {{ .Values.redisSentinel.redisExporter.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.redisSentinel.redisExporter.serviceMonitor.scrapeTimeout }}
{{- end }}

View File

@@ -20,8 +20,8 @@ redisReplication:
# -- Security
podSecurityContext:
runAsUser: 1000
fsGroup: 1000
runAsUser: 1000
# -- Image
image:
@@ -33,16 +33,17 @@ redisReplication:
resources:
requests:
cpu: 10m
memory: 128Mi
memory: 32Mi
# -- Storage
volumeClaimTemplate:
spec:
storageClassName: ceph-block
accessModes: ["ReadWriteOnce"]
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: ceph-block
# -- Metrics
redisExporter:
@@ -50,6 +51,11 @@ redisReplication:
image:
repository: quay.io/opstree/redis-exporter
tag: v1.80.1
serviceMonitor:
enabled: true
interval: 30s
scrapeTimeout: 10s
extraLabels: {}
# -- Redis Sentinel settings
redisSentinel:
@@ -72,3 +78,15 @@ redisSentinel:
requests:
cpu: 10m
memory: 128Mi
# -- Metrics
redisExporter:
enabled: true
image:
repository: quay.io/opstree/redis-exporter
tag: v1.80.1
serviceMonitor:
enabled: true
interval: 30s
scrapeTimeout: 10s
extraLabels: {}