move sentinel inside replication
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: redis-replication
|
||||
version: 0.5.0
|
||||
version: 0.6.0
|
||||
description: Redis Replication with Sentinel
|
||||
keywords:
|
||||
- redis-operator
|
||||
@@ -12,4 +12,4 @@ sources:
|
||||
maintainers:
|
||||
- name: alexlebens
|
||||
icon: https://github.com/OT-CONTAINER-KIT/redis-operator/raw/main/static/redis-operator-logo.svg
|
||||
appVersion: v0.21.0
|
||||
appVersion: v0.23.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# redis-replication
|
||||
|
||||
 
|
||||
 
|
||||
|
||||
Redis Replication with Sentinel
|
||||
|
||||
|
||||
@@ -37,3 +37,22 @@ spec:
|
||||
redisExporter:
|
||||
enabled: {{ .Values.redisReplication.redisExporter.enabled }}
|
||||
image: "{{ .Values.redisReplication.redisExporter.image.repository }}:{{ .Values.redisReplication.redisExporter.image.tag }}"
|
||||
|
||||
{{- if .Values.redisSentinel.enabled }}
|
||||
sentinel:
|
||||
image: "{{ .Values.redisSentinel.image.repository }}:{{ .Values.redisSentinel.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.redisSentinel.image.pullPolicy }}
|
||||
|
||||
{{ if .Values.existingSecret.enabled }}
|
||||
redisSecret:
|
||||
name: {{ .Values.existingSecret.name }}
|
||||
key: {{ .Values.existingSecret.key }}
|
||||
{{ end }}
|
||||
|
||||
resources:
|
||||
{{- with .Values.redisSentinel.resources }}
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{ end }}
|
||||
|
||||
size: {{ .Values.redisSentinel.clusterSize }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
{{- 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 }}
|
||||
# {{- 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 }}
|
||||
# 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 }}
|
||||
# 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 }}
|
||||
# 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 }}
|
||||
# {{ 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 }}"
|
||||
# redisExporter:
|
||||
# enabled: {{ .Values.redisSentinel.redisExporter.enabled }}
|
||||
# image: "{{ .Values.redisSentinel.redisExporter.image.repository }}:{{ .Values.redisSentinel.redisExporter.image.tag }}"
|
||||
|
||||
{{- end }}
|
||||
# {{- end }}
|
||||
|
||||
@@ -23,27 +23,27 @@ spec:
|
||||
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 }}
|
||||
# {{- 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 }}
|
||||
|
||||
Reference in New Issue
Block a user