Compare commits
2 Commits
redis-repl
...
redis-repl
| Author | SHA1 | Date | |
|---|---|---|---|
| 510c575424 | |||
| 10d67f205d |
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: redis-replication
|
||||
version: 0.1.0
|
||||
version: 0.3.0
|
||||
description: Redis Replication with Sentinel
|
||||
keywords:
|
||||
- redis-operator
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# redis-replication
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
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":"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.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":"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 | 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 | `""` | |
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
49
charts/redis-replication/templates/service-monitor.yaml
Normal file
49
charts/redis-replication/templates/service-monitor.yaml
Normal 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 }}
|
||||
@@ -50,6 +50,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 +77,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: {}
|
||||
|
||||
Reference in New Issue
Block a user