Compare commits

...

2 Commits

Author SHA1 Message Date
57c2ce938f refactor sentinel
All checks were successful
lint-and-test / lint-helm (push) Successful in 13s
release-charts-redis-replication / release (push) Successful in 21s
lint-and-test / chart-testing (push) Successful in 34s
renovate / renovate (push) Successful in 38s
2026-01-08 15:42:48 -06:00
2fd3129e70 remove sentinel
All checks were successful
lint-and-test / lint-helm (push) Successful in 11s
release-charts-redis-replication / release (push) Successful in 55s
renovate / renovate (push) Successful in 54s
lint-and-test / chart-testing (push) Successful in 3m3s
2026-01-08 15:15:36 -06:00
7 changed files with 32 additions and 139 deletions

View File

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

View File

@@ -1,6 +1,6 @@
# redis-replication # redis-replication
![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![AppVersion: v0.23.0](https://img.shields.io/badge/AppVersion-v0.23.0-informational?style=flat-square) ![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: v0.23.0](https://img.shields.io/badge/AppVersion-v0.23.0-informational?style=flat-square)
Redis Replication with Sentinel Redis Replication with Sentinel
@@ -22,19 +22,16 @@ Redis Replication with Sentinel
| additionalLabels | object | `{}` | Add additional labels | | additionalLabels | object | `{}` | Add additional labels |
| existingSecret | object | `{"enabled":false,"key":"password","name":"secret-name"}` | Password | | existingSecret | object | `{"enabled":false,"key":"password","name":"secret-name"}` | Password |
| namespaceOverride | string | `""` | Override the namespace of the chart | | 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"},"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 | 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"}},"sentinel":{"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"},"resources":{"requests":{"cpu":"10m","memory":"32Mi"}},"size":3},"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.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis","tag":"v8.4.0"}` | Image |
| redisReplication.podSecurityContext | object | `{"fsGroup":1000,"runAsUser":1000}` | Security | | redisReplication.podSecurityContext | object | `{"fsGroup":1000,"runAsUser":1000}` | Security |
| 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.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.resources | object | `{"requests":{"cpu":"10m","memory":"32Mi"}}` | Resources |
| redisReplication.sentinel | object | `{"enabled":false,"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"},"resources":{"requests":{"cpu":"10m","memory":"32Mi"}},"size":3}` | Redis Sentinel settings |
| redisReplication.sentinel.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"}` | Image |
| redisReplication.sentinel.resources | object | `{"requests":{"cpu":"10m","memory":"32Mi"}}` | Resources |
| redisReplication.volumeClaimTemplate | object | `{"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"storageClassName":"ceph-block"}}` | Storage | | 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},"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"}}}` | 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":"32Mi"}}` | Resources |
| replicationNameOverride | string | `""` | Override the name of the resources | | replicationNameOverride | string | `""` | Override the name of the resources |
| sentinelNameOverride | string | `""` | |
---------------------------------------------- ----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

View File

@@ -9,14 +9,6 @@ Expand the names
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- define "redis.sentinelName" -}}
{{- if .Values.sentinelNameOverride }}
{{- .Values.sentinelNameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "redis-sentinel-%s" .Release.Name -}}
{{- end }}
{{- end }}
{{/* {{/*
Allow the release namespace to be overridden for multi-namespace deployments in combined charts Allow the release namespace to be overridden for multi-namespace deployments in combined charts
*/}} */}}
@@ -57,9 +49,3 @@ app.kubernetes.io/name: {{ include "redis.replicationName" $ }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }} app.kubernetes.io/part-of: {{ .Release.Name }}
{{- end }} {{- end }}
{{- define "redis.sentinelSelectorLabels" -}}
app.kubernetes.io/name: {{ include "redis.sentinelName" $ }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
{{- end }}

View File

@@ -12,7 +12,7 @@ spec:
podSecurityContext: podSecurityContext:
{{- with .Values.redisReplication.podSecurityContext }} {{- with .Values.redisReplication.podSecurityContext }}
{{- toYaml . | nindent 4 }} {{- toYaml . | nindent 4 }}
{{ end }} {{- end }}
kubernetesConfig: kubernetesConfig:
image: "{{ .Values.redisReplication.image.repository }}:{{ .Values.redisReplication.image.tag }}" image: "{{ .Values.redisReplication.image.repository }}:{{ .Values.redisReplication.image.tag }}"
@@ -20,39 +20,38 @@ spec:
resources: resources:
{{- with .Values.redisReplication.resources }} {{- with .Values.redisReplication.resources }}
{{- toYaml . | nindent 6 }} {{- toYaml . | nindent 6 }}
{{ end }} {{- end }}
{{- if .Values.existingSecret.enabled }}
{{ if .Values.existingSecret.enabled }}
redisSecret: redisSecret:
name: {{ .Values.existingSecret.name }} name: {{ .Values.existingSecret.name }}
key: {{ .Values.existingSecret.key }} key: {{ .Values.existingSecret.key }}
{{ end }} {{- end }}
storage: storage:
volumeClaimTemplate: volumeClaimTemplate:
{{- with .Values.redisReplication.volumeClaimTemplate }} {{- with .Values.redisReplication.volumeClaimTemplate }}
{{- toYaml . | nindent 6 }} {{- toYaml . | nindent 6 }}
{{ end }} {{- end }}
redisExporter: redisExporter:
enabled: {{ .Values.redisReplication.redisExporter.enabled }} enabled: {{ .Values.redisReplication.redisExporter.enabled }}
image: "{{ .Values.redisReplication.redisExporter.image.repository }}:{{ .Values.redisReplication.redisExporter.image.tag }}" image: "{{ .Values.redisReplication.redisExporter.image.repository }}:{{ .Values.redisReplication.redisExporter.image.tag }}"
{{- if .Values.redisSentinel.enabled }} {{- if .Values.redisReplication.sentinel.enabled }}
sentinel: sentinel:
image: "{{ .Values.redisSentinel.image.repository }}:{{ .Values.redisSentinel.image.tag }}" image: "{{ .Values.redisReplication.sentinel.image.repository }}:{{ .Values.redisReplication.sentinel.image.tag }}"
imagePullPolicy: {{ .Values.redisSentinel.image.pullPolicy }} imagePullPolicy: {{ .Values.redisReplication.sentinel.image.pullPolicy }}
{{ if .Values.existingSecret.enabled }} {{ if .Values.existingSecret.enabled }}
redisSecret: redisSecret:
name: {{ .Values.existingSecret.name }} name: {{ .Values.existingSecret.name }}
key: {{ .Values.existingSecret.key }} key: {{ .Values.existingSecret.key }}
{{ end }} {{- end }}
resources: resources:
{{- with .Values.redisSentinel.resources }} {{- with .Values.redisReplication.sentinel.resources }}
{{- toYaml . | nindent 10 }} {{- toYaml . | nindent 10 }}
{{ end }} {{- end }}
size: {{ .Values.redisSentinel.clusterSize }} size: {{ .Values.redisReplication.sentinel.size }}
{{- end }} {{- end }}

View File

@@ -1,46 +0,0 @@
# {{- if .Values.redisSentinel.enabled }}
# ---
# apiVersion: redis.redis.opstreelabs.in/v1beta2
# kind: RedisSentinel
# metadata:
# name: {{ include "redis.sentinelName" . }}
# namespace: {{ include "redis.namespace" . }}
# labels:
# {{- include "redis.labels" . | nindent 4 }}
# {{- include "redis.sentinelSelectorLabels" . | nindent 4 }}
# spec:
# clusterSize: {{ .Values.redisSentinel.clusterSize }}
# podSecurityContext:
# {{- with .Values.redisSentinel.podSecurityContext }}
# {{- toYaml . | nindent 10 }}
# {{ end }}
# redisSentinelConfig:
# redisReplicationName: {{ include "redis.replicationName" . }}
# {{ if .Values.existingSecret.enabled }}
# redisReplicationPassword:
# secretKeyRef:
# name: {{ .Values.existingSecret.name }}
# key: {{ .Values.existingSecret.key }}
# {{ end }}
# kubernetesConfig:
# image: "{{ .Values.redisSentinel.image.repository }}:{{ .Values.redisSentinel.image.tag }}"
# imagePullPolicy: {{ .Values.redisSentinel.image.pullPolicy }}
# resources:
# {{- with .Values.redisSentinel.resources }}
# {{- toYaml . | nindent 10 }}
# {{ end }}
# {{ if .Values.existingSecret.enabled }}
# redisSecret:
# 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

@@ -22,28 +22,3 @@ spec:
interval: {{ .Values.redisReplication.redisExporter.serviceMonitor.interval }} interval: {{ .Values.redisReplication.redisExporter.serviceMonitor.interval }}
scrapeTimeout: {{ .Values.redisReplication.redisExporter.serviceMonitor.scrapeTimeout }} scrapeTimeout: {{ .Values.redisReplication.redisExporter.serviceMonitor.scrapeTimeout }}
{{- end }} {{- 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: redis-exporter
# interval: {{ .Values.redisSentinel.redisExporter.serviceMonitor.interval }}
# scrapeTimeout: {{ .Values.redisSentinel.redisExporter.serviceMonitor.scrapeTimeout }}
# {{- end }}

View File

@@ -1,6 +1,5 @@
# -- Override the name of the resources # -- Override the name of the resources
replicationNameOverride: "" replicationNameOverride: ""
sentinelNameOverride: ""
# -- Override the namespace of the chart # -- Override the namespace of the chart
namespaceOverride: "" namespaceOverride: ""
@@ -57,36 +56,19 @@ redisReplication:
scrapeTimeout: 10s scrapeTimeout: 10s
extraLabels: {} extraLabels: {}
# -- Redis Sentinel settings # -- Redis Sentinel settings
redisSentinel: sentinel:
enabled: false enabled: false
clusterSize: 3 size: 3
# -- Security # -- Image
podSecurityContext:
runAsUser: 1000
fsGroup: 1000
# -- Image
image:
repository: quay.io/opstree/redis-sentinel
tag: v8.4.0
pullPolicy: IfNotPresent
# -- Resources
resources:
requests:
cpu: 10m
memory: 32Mi
# -- Metrics
redisExporter:
enabled: true
image: image:
repository: quay.io/opstree/redis-exporter repository: quay.io/opstree/redis-sentinel
tag: v1.80.1 tag: v8.4.0
serviceMonitor: pullPolicy: IfNotPresent
enabled: true
interval: 30s # -- Resources
scrapeTimeout: 10s resources:
extraLabels: {} requests:
cpu: 10m
memory: 32Mi