Skip to content

Commit 63f8d22

Browse files
authored
[Redis] add resources to init-cluster job (#680)
* [rabbitmq-cluster-operator] rename artifacthub to .yml * [redis] add resources to job template * [redis] bump chartversion * [redis] add newline to values.yaml --------- Signed-off-by: Dominik Löwen <[email protected]>
1 parent 1219e3d commit 63f8d22

File tree

4 files changed

+70
-49
lines changed

4 files changed

+70
-49
lines changed

charts/redis/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: redis
33
description: An open source, in-memory data structure store used as a database, cache, and message broker.
44
type: application
5-
version: 0.16.2
5+
version: 0.16.3
66
appVersion: "8.4.0"
77
keywords:
88
- redis

charts/redis/README.md

Lines changed: 58 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -144,35 +144,35 @@ cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/redis:<version>
144144

145145
### Metrics
146146

147-
| Parameter | Description | Default |
148-
| ------------------------------------------ | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
149-
| `metrics.enabled` | Start a sidecar Prometheus exporter to expose Redis metrics | `false` |
150-
| `metrics.image.registry` | Redis exporter image registry | `docker.io` |
151-
| `metrics.image.repository` | Redis exporter image repository | `oliver006/redis_exporter` |
152-
| `metrics.image.tag` | Redis exporter image tag | `v1.80.1` |
153-
| `metrics.image.pullPolicy` | Redis exporter image pull policy | `Always` |
154-
| `metrics.resources.requests.cpu` | CPU request for the metrics container | `50m` |
155-
| `metrics.resources.requests.memory` | Memory request for the metrics container | `64Mi` |
156-
| `metrics.resources.limits.cpu` | CPU limit for the metrics container | `nil` |
157-
| `metrics.resources.limits.memory` | Memory limit for the metrics container | `64Mi` |
158-
| `metrics.extraArgs` | Extra arguments for Redis exporter (e.g. `--redis.addr`, `--web.listen-address`) | `[]` |
159-
| `metrics.service.type` | Metrics service type | `ClusterIP` |
160-
| `metrics.service.port` | Metrics service port | `9121` |
161-
| `metrics.service.annotations` | Additional custom annotations for Metrics service | `{}` |
162-
| `metrics.service.loadBalancerIP` | LoadBalancer IP if metrics service type is `LoadBalancer` | `""` |
163-
| `metrics.service.loadBalancerSourceRanges` | Addresses allowed when metrics service is `LoadBalancer` | `[]` |
164-
| `metrics.service.clusterIP` | Static clusterIP or None for headless services when metrics service type is `ClusterIP` | `""` |
165-
| `metrics.service.nodePort` | NodePort value for LoadBalancer and NodePort service types | `""` |
166-
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor resource(s) for scraping metrics using Prometheus Operator | `false` |
167-
| `metrics.serviceMonitor.namespace` | Namespace in which to create ServiceMonitor resource(s) | `""` |
168-
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
169-
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
170-
| `metrics.serviceMonitor.relabelings` | Additional relabeling of metrics | `[]` |
171-
| `metrics.serviceMonitor.metricRelabelings` | Additional metric relabeling of metrics | `[]` |
172-
| `metrics.serviceMonitor.honorLabels` | Honor metrics labels | `false` |
173-
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
174-
| `metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
175-
| `metrics.serviceMonitor.namespaceSelector` | Namespace selector for ServiceMonitor | `{}` |
147+
| Parameter | Description | Default |
148+
| ------------------------------------------ | --------------------------------------------------------------------------------------- | -------------------------- |
149+
| `metrics.enabled` | Start a sidecar Prometheus exporter to expose Redis metrics | `false` |
150+
| `metrics.image.registry` | Redis exporter image registry | `docker.io` |
151+
| `metrics.image.repository` | Redis exporter image repository | `oliver006/redis_exporter` |
152+
| `metrics.image.tag` | Redis exporter image tag | `v1.80.1` |
153+
| `metrics.image.pullPolicy` | Redis exporter image pull policy | `Always` |
154+
| `metrics.resources.requests.cpu` | CPU request for the metrics container | `50m` |
155+
| `metrics.resources.requests.memory` | Memory request for the metrics container | `64Mi` |
156+
| `metrics.resources.limits.cpu` | CPU limit for the metrics container | `nil` |
157+
| `metrics.resources.limits.memory` | Memory limit for the metrics container | `64Mi` |
158+
| `metrics.extraArgs` | Extra arguments for Redis exporter (e.g. `--redis.addr`, `--web.listen-address`) | `[]` |
159+
| `metrics.service.type` | Metrics service type | `ClusterIP` |
160+
| `metrics.service.port` | Metrics service port | `9121` |
161+
| `metrics.service.annotations` | Additional custom annotations for Metrics service | `{}` |
162+
| `metrics.service.loadBalancerIP` | LoadBalancer IP if metrics service type is `LoadBalancer` | `""` |
163+
| `metrics.service.loadBalancerSourceRanges` | Addresses allowed when metrics service is `LoadBalancer` | `[]` |
164+
| `metrics.service.clusterIP` | Static clusterIP or None for headless services when metrics service type is `ClusterIP` | `""` |
165+
| `metrics.service.nodePort` | NodePort value for LoadBalancer and NodePort service types | `""` |
166+
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor resource(s) for scraping metrics using Prometheus Operator | `false` |
167+
| `metrics.serviceMonitor.namespace` | Namespace in which to create ServiceMonitor resource(s) | `""` |
168+
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
169+
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
170+
| `metrics.serviceMonitor.relabelings` | Additional relabeling of metrics | `[]` |
171+
| `metrics.serviceMonitor.metricRelabelings` | Additional metric relabeling of metrics | `[]` |
172+
| `metrics.serviceMonitor.honorLabels` | Honor metrics labels | `false` |
173+
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
174+
| `metrics.serviceMonitor.annotations` | Additional custom annotations for the ServiceMonitor | `{}` |
175+
| `metrics.serviceMonitor.namespaceSelector` | Namespace selector for ServiceMonitor | `{}` |
176176

177177
### Pod Disruption Budget
178178

@@ -263,25 +263,25 @@ cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/redis:<version>
263263

264264
Redis Sentinel provides high availability for Redis through automatic failover. When enabled in `replication` mode, Sentinel monitors the master and replicas, and promotes a replica to master if the current master becomes unavailable. When disabled with `replication` mode, pod-0 is always the master.
265265

266-
| Parameter | Description | Default |
267-
| ------------------------------------ | --------------------------------------------------------------------------------------------- | ------------------ |
268-
| `sentinel.enabled` | Enable Redis Sentinel for high availability. When disabled, pod-0 is master (manual failover) | `false` |
269-
| `sentinel.image.repository` | Redis Sentinel image repository | `redis` |
270-
| `sentinel.image.tag` | Redis Sentinel image tag | `8.4.0` |
271-
| `sentinel.image.pullPolicy` | Sentinel image pull policy | `Always` |
272-
| `sentinel.config.announceHostnames` | Use the hostnames instead of the IP in "announce-ip" commands | `true` |
273-
| `sentinel.masterName` | Name of the master server | `mymaster` |
274-
| `sentinel.quorum` | Number of Sentinels needed to agree on master failure | `2` |
275-
| `sentinel.downAfterMilliseconds` | Time in ms after master is declared down | `30000` |
276-
| `sentinel.failoverTimeout` | Timeout for failover in ms | `180000` |
277-
| `sentinel.parallelSyncs` | Number of replicas to reconfigure during failover | `1` |
278-
| `sentinel.port` | Sentinel port | `26379` |
279-
| `sentinel.service.type` | Kubernetes service type for Sentinel | `ClusterIP` |
280-
| `sentinel.service.port` | Sentinel service port | `26379` |
281-
| `sentinel.resources.limits.memory` | Memory limit for Sentinel pods | `128Mi` |
282-
| `sentinel.resources.requests.cpu` | CPU request for Sentinel pods | `25m` |
283-
| `sentinel.resources.requests.memory` | Memory request for Sentinel pods | `64Mi` |
284-
| `sentinel.extraVolumeMounts` | Additional volume mounts for Sentinel container | `[]` |
266+
| Parameter | Description | Default |
267+
| ------------------------------------ | --------------------------------------------------------------------------------------------- | ----------- |
268+
| `sentinel.enabled` | Enable Redis Sentinel for high availability. When disabled, pod-0 is master (manual failover) | `false` |
269+
| `sentinel.image.repository` | Redis Sentinel image repository | `redis` |
270+
| `sentinel.image.tag` | Redis Sentinel image tag | `8.4.0` |
271+
| `sentinel.image.pullPolicy` | Sentinel image pull policy | `Always` |
272+
| `sentinel.config.announceHostnames` | Use the hostnames instead of the IP in "announce-ip" commands | `true` |
273+
| `sentinel.masterName` | Name of the master server | `mymaster` |
274+
| `sentinel.quorum` | Number of Sentinels needed to agree on master failure | `2` |
275+
| `sentinel.downAfterMilliseconds` | Time in ms after master is declared down | `30000` |
276+
| `sentinel.failoverTimeout` | Timeout for failover in ms | `180000` |
277+
| `sentinel.parallelSyncs` | Number of replicas to reconfigure during failover | `1` |
278+
| `sentinel.port` | Sentinel port | `26379` |
279+
| `sentinel.service.type` | Kubernetes service type for Sentinel | `ClusterIP` |
280+
| `sentinel.service.port` | Sentinel service port | `26379` |
281+
| `sentinel.resources.limits.memory` | Memory limit for Sentinel pods | `128Mi` |
282+
| `sentinel.resources.requests.cpu` | CPU request for Sentinel pods | `25m` |
283+
| `sentinel.resources.requests.memory` | Memory request for Sentinel pods | `64Mi` |
284+
| `sentinel.extraVolumeMounts` | Additional volume mounts for Sentinel container | `[]` |
285285

286286
### ServiceAccount
287287

@@ -302,6 +302,16 @@ Redis Sentinel provides high availability for Redis through automatic failover.
302302
| `extraObjects` | A list of additional Kubernetes objects to deploy alongside the release | `[]` |
303303
| `extraPorts` | Additional ports to be exposed by Services and StatefulSet | `[]` |
304304

305+
### Configurations for the Job-Template
306+
307+
| Parameter | Description | Default |
308+
| ------------------------------------------ | ------------------------------------------------ | ------- |
309+
| `clusterInitJob.resources` | Resource limits and requests for clusterInit Job | `{}` |
310+
| `clusterInitJob.resources.limits.memory` | Memory limit for clusterInit Job | `128Mi` |
311+
| `clusterInitJob.resources.requests.cpu` | CPU request for clusterInit Job | `10m` |
312+
| `clusterInitJob.resources.requests.memory` | Memory request for clusterInit Job | `64Mi` |
313+
314+
305315
#### Extra Objects
306316

307317
You can use the `extraObjects` array to deploy additional Kubernetes resources (such as NetworkPolicies, ConfigMaps, etc.) alongside the release. This is useful for customizing your deployment with extra manifests that are not covered by the default chart options.

charts/redis/templates/job.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
image: {{ include "redis.image" . | quote }}
2424
securityContext: {{ include "cloudpirates.renderContainerSecurityContext" . | nindent 12 }}
2525
imagePullPolicy: {{ include "cloudpirates.imagePullPolicy" (dict "image" .Values.image) }}
26+
resources: {{- toYaml .Values.clusterInitJob.resources | nindent 12 }}
2627
env:
2728
{{- if .Values.auth.enabled }}
2829
- name: REDIS_PASSWORD

charts/redis/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,3 +460,13 @@ customScripts:
460460
# - |
461461
# sleep 10
462462
# redis-cli shutdown
463+
464+
## @section clusterInitJob Configurations for the Job-Template
465+
clusterInitJob:
466+
## @param clusterInitJob.resources Resource limits and requests for clusterInit Job
467+
resources:
468+
limits:
469+
memory: 128Mi
470+
requests:
471+
cpu: 10m
472+
memory: 64Mi

0 commit comments

Comments
 (0)