add redis replication chart
All checks were successful
renovate / renovate (push) Successful in 34s
lint-and-test / lint-helm (push) Successful in 12s
lint-and-test / chart-testing (push) Successful in 20s
release-charts-generic-device-plugin / release (push) Successful in 18s
release-charts-redis-replication / release (push) Successful in 15s

This commit is contained in:
2025-12-14 23:32:36 -06:00
parent 06a206e4b3
commit 96154b9be9
8 changed files with 403 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
apiVersion: v2
name: redis-replication
version: 0.1.0
description: Redis Replication with Sentinel
keywords:
- redis-operator
- redis
- kubernetes
sources:
- https://github.com/OT-CONTAINER-KIT/redis-operator
- https://github.com/OT-CONTAINER-KIT/redis-operator/tree/main/charts/redis-operator
maintainers:
- name: alexlebens
icon: https://github.com/OT-CONTAINER-KIT/redis-operator/raw/main/static/redis-operator-logo.svg
appVersion: v0.21.0

View File

@@ -0,0 +1,39 @@
# 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)
Redis Replication with Sentinel
## Maintainers
| Name | Email | Url |
| ---- | ------ | --- |
| alexlebens | | |
## Source Code
* <https://github.com/OT-CONTAINER-KIT/redis-operator>
* <https://github.com/OT-CONTAINER-KIT/redis-operator/tree/main/charts/redis-operator>
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| 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.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.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.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/opstree/redis-sentinel","tag":"v8.4.0"}` | Image |
| redisSentinel.podSecurityContext | object | `{"fsGroup":1000,"runAsUser":1000}` | Security |
| redisSentinel.resources | object | `{"requests":{"cpu":"10m","memory":"128Mi"}}` | 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)

View File

@@ -0,0 +1,65 @@
{{/*
Expand the names
*/}}
{{- define "redis.replicationName" -}}
{{- if .Values.replicationNameOverride }}
{{- .Values.replicationNameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "redis-replication-%s" .Release.Name -}}
{{- 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
*/}}
{{- define "redis.namespace" -}}
{{- if .Values.namespaceOverride -}}
{{- .Values.namespaceOverride -}}
{{- else -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "redis.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "redis.labels" -}}
helm.sh/chart: {{ include "redis.chart" $ }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.Version | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- with .Values.additionalLabels }}
{{ toYaml . }}
{{- end }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "redis.replicationSelectorLabels" -}}
app.kubernetes.io/name: {{ include "redis.replicationName" $ }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}
{{- 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

@@ -0,0 +1,39 @@
apiVersion: redis.redis.opstreelabs.in/v1beta2
kind: RedisReplication
metadata:
name: {{ include "redis.replicationName" . }}
namespace: {{ include "redis.namespace" . }}
labels:
{{- include "redis.labels" . | nindent 4 }}
{{- include "redis.replicationSelectorLabels" . | nindent 4 }}
spec:
clusterSize: {{ .Values.redisReplication.clusterSize }}
podSecurityContext:
{{- with .Values.redisReplication.podSecurityContext }}
{{- toYaml . | nindent 10 }}
{{ end }}
kubernetesConfig:
image: "{{ .Values.redisReplication.image.repository }}:{{ .Values.redisReplication.image.tag }}"
imagePullPolicy: {{ .Values.redisReplication.image.pullPolicy }}
resources:
{{- with .Values.redisReplication.resources }}
{{- toYaml . | nindent 10 }}
{{ end }}
{{ if .Values.existingSecret.enabled }}
redisSecret:
name: {{ .Values.existingSecret.name }}
key: {{ .Values.existingSecret.key }}
{{ end }}
storage:
volumeClaimTemplate:
{{- with .Values.redisReplication.volumeClaimTemplate }}
{{- toYaml . | nindent 10 }}
{{ end }}
redisExporter:
enabled: {{ .Values.redisReplication.redisExporter.enabled }}
image: "{{ .Values.redisReplication.redisExporter.image.repository }}:{{ .Values.redisReplication.redisExporter.image.tag }}"

View File

@@ -0,0 +1,41 @@
{{- 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 }}
{{- end }}

View File

@@ -0,0 +1,74 @@
# -- Override the name of the resources
replicationNameOverride: ""
sentinelNameOverride: ""
# -- Override the namespace of the chart
namespaceOverride: ""
# -- Password
existingSecret:
enabled: false
name: secret-name
key: password
# -- Add additional labels
additionalLabels: {}
# -- Redis Replication settings
redisReplication:
clusterSize: 3
# -- Security
podSecurityContext:
runAsUser: 1000
fsGroup: 1000
# -- Image
image:
repository: quay.io/opstree/redis
tag: v8.4.0
pullPolicy: IfNotPresent
# -- Resources
resources:
requests:
cpu: 10m
memory: 128Mi
# -- Storage
volumeClaimTemplate:
spec:
storageClassName: ceph-block
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 1Gi
# -- Metrics
redisExporter:
enabled: true
image:
repository: quay.io/opstree/redis-exporter
tag: v1.80.1
# -- Redis Sentinel settings
redisSentinel:
enabled: false
clusterSize: 3
# -- Security
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: 128Mi