diff --git a/charts/redis/Chart.yaml b/charts/redis/Chart.yaml index 599b37f6bb19848cf743245a6dca0b2985cf0fc0..11104b3bd7a9e4362add67742d8dd7aa605beefd 100644 --- a/charts/redis/Chart.yaml +++ b/charts/redis/Chart.yaml @@ -12,8 +12,10 @@ keywords: - cache - redis +icon: https://redis.io/wp-content/uploads/2024/04/Logotype.svg + # This is the chart version -version: "0.7.10" +version: "1.0.0" # This is the version number of the application being deployed. -appVersion: "7.2.4" +appVersion: "6.2.14" diff --git a/charts/redis/README.md b/charts/redis/README.md index fecbde19a2870efde53c20b2960042784ecd53c8..ab202d72cbd75a58b63d15d6a76c4107a09a7cea 100644 --- a/charts/redis/README.md +++ b/charts/redis/README.md @@ -147,7 +147,11 @@ helm uninstall my-release | metrics.exporter.extraExporterEnvSecrets | list | `[]` | A list of existing secrets that will be mounted into the exporter container as environment variables | | metrics.exporter.extraExporterSecrets | list | `[]` | A list of additional existing secrets that will be mounted into the exporter container | | metrics.exporter.extraExporterSecrets[].name | string | `nil` | Name of the existing K8s secret | +| metrics.exporter.extraExporterSecrets[].defaultMode | int | `0440` | Mount default access mode | | metrics.exporter.extraExporterSecrets[].mountPath | string | `nil` | Mount path where the secret should be mounted into the container (f.e. /mysecretfolder) | +| metrics.exporter.extraExporterConfigs[].name | string | `nil` | Name of the existing K8s configMap | +| metrics.exporter.extraExporterConfigs[].defaultMode | int | `0440` | Mount default access mode | +| metrics.exporter.extraExporterConfigs[].mountPath | string | `nil` | Mount path where the configMap should be mounted into the container (f.e. /myconfigfolder) | | metrics.service.type | string | `"ClusterIP"` | Service type (not available when haMode is enabled) | | metrics.service.servicePort | int | `9121` | Redis metrics exporter service port | | metrics.service.containerPort | int | `9121` | Redis metrics exporter container port | @@ -188,6 +192,10 @@ helm uninstall my-release | storage.keepPvc | bool | `false` | Keep a created Persistent volume claim when uninstalling the helm chart (only for `useDeploymentWhenNonHA`) | | storage.annotations | object | `{}` | Additional storage annotations | | storage.labels | object | `{}` | Additional storage labels | +| extraStorage | list | `[]` | A list of additional existing PVC that will be mounted into the container | +| extraStorage[].name | string | `nil` | Internal name of the volume | +| extraStorage[].pvcName | string | `nil` | Name of the existing PVC | +| extraStorage[].mountPath | string | `nil` | Mount path where the PVC should be mounted into the container | ## Network policies @@ -210,13 +218,21 @@ The policyTypes will be automatically set | extraSecretRedisConfigs | string | `nil` | An existing secret with files that will be added to the `redis.conf` | | extraRedisSecrets | list | `[]` | A list of additional existing secrets that will be mounted into the redis container | | extraRedisSecrets[].name | string | `nil` | Name of the existing K8s secret | +| extraRedisSecrets[].defaultMode | int | `0440` | Mount default access mode | | extraRedisSecrets[].mountPath | string | `nil` | Mount path where the secret should be mounted into the container (f.e. /mysecretfolder) | +| extraRedisConfigs[].name | string | `nil` | Name of the existing K8s configMap | +| extraRedisConfigs[].defaultMode | int | `0440` | Mount default access mode | +| extraRedisConfigs[].mountPath | string | `nil` | Mount path where the configMap should be mounted into the container (f.e. /myconfigfolder) | | extraSentinelEnvSecrets | list | `[]` | A list of existing secrets that will be mounted into the sentinel container as environment variables | | sentinelConfig | string | `nil` | Additional sentinel.conf (only when haMode is enabled) | | extraSecretSentinelConfigs | string | `nil` | An existing secret with files that will be added to the `sentinel.conf` | | extraSentinelSecrets | list | `[]` | A list of additional existing secrets that will be mounted into the sentinel container | | extraSentinelSecrets[].name | string | `nil` | Name of the existing K8s secret | +| extraSentinelSecrets[].defaultMode | int | `0440` | Mount default access mode | | extraSentinelSecrets[].mountPath | string | `nil` | Mount path where the secret should be mounted into the container (f.e. /mysecretfolder) | +| extraSentinelConfigs[].name | string | `nil` | Name of the existing K8s configMap | +| extraSentinelConfigs[].defaultMode | int | `0440` | Mount default access mode | +| extraSentinelConfigs[].mountPath | string | `nil` | Mount path where the configMap should be mounted into the container (f.e. /myconfigfolder) | | useDeploymentWhenNonHA | bool | `true` | Use Deployment instead of StatefulSet for Non-HA deployments | | haMode.enabled | bool | `false` | Enable Redis high availibility mode with master-slave replication and sentinel | | haMode.useDnsNames | bool | `false` | Use DNS names instead of Pod IPs to build the cluster | diff --git a/charts/redis/templates/statefulset.yaml b/charts/redis/templates/statefulset.yaml index 03109ad5624a0e5e0973cc384c6321ab7fa7289c..85ba7a5efc1bbfa203b8fb060c52aac378d9b2dd 100644 --- a/charts/redis/templates/statefulset.yaml +++ b/charts/redis/templates/statefulset.yaml @@ -200,6 +200,14 @@ spec: - name: {{ $secret.name }}-redis mountPath: {{ $secret.mountPath }} {{- end }} + {{- range $config := .Values.extraRedisConfigs }} + - name: {{ $config.name }}-redis + mountPath: {{ $config.mountPath }} + {{- end }} + {{- range $storage := .Values.extraStorage }} + - name: {{ $storage.name }} + mountPath: {{ $storage.mountPath }} + {{- end }} {{- if .Values.haMode.enabled }} - name: {{ .Chart.Name }}-sentinel {{- with .Values.securityContext }} @@ -279,8 +287,11 @@ spec: - name: {{ $secret.name }}-sentinel mountPath: {{ $secret.mountPath }} {{- end }} + {{- range $config := .Values.extraSentinelConfigs }} + - name: {{ $config.name }}-sentinel + mountPath: {{ $config.mountPath }} + {{- end }} {{- end }} - {{- if .Values.metrics.enabled }} {{- with .Values.metrics }} - name: {{ $.Chart.Name }}-exporter @@ -372,6 +383,10 @@ spec: - name: {{ $secret.name }}-exporter mountPath: {{ $secret.mountPath }} {{- end }} + {{- range $config := .exporter.extraExporterConfigs }} + - name: {{ $config.name }}-exporter + mountPath: {{ $config.mountPath }} + {{- end }} {{- end }} {{- end }} {{- with .Values.extraContainers }} @@ -407,20 +422,38 @@ spec: - name: {{ $secret.name }}-redis secret: secretName: {{ $secret.name }} - defaultMode: 0440 + defaultMode: {{ $secret.defaultMode | default 0440 }} + {{- end }} + {{- range $config := .Values.extraRedisConfigs }} + - name: {{ $config.name }}-redis + configMap: + name: {{ $config.name }} + defaultMode: {{ $config.defaultMode | default 0440 }} {{- end }} {{- range $secret := .Values.extraSentinelSecrets }} - name: {{ $secret.name }}-sentinel secret: secretName: {{ $secret.name }} - defaultMode: 0440 + defaultMode: {{ $secret.defaultMode | default 0440 }} + {{- end }} + {{- range $config := .Values.extraSentinelConfigs }} + - name: {{ $config.name }}-sentinel + configMap: + name: {{ $config.name }} + defaultMode: {{ $config.defaultMode | default 0440 }} {{- end }} {{- if .Values.metrics.enabled }} {{- range $secret := .Values.metrics.exporter.extraExporterSecrets }} - name: {{ $secret.name }}-exporter secret: secretName: {{ $secret.name }} - defaultMode: 0440 + defaultMode: {{ $secret.defaultMode | default 0440 }} + {{- end }} + {{- range $config := .Values.metrics.exporter.extraExporterConfigs }} + - name: {{ $config.name }}-exporter + configMap: + name: {{ $config.name }} + defaultMode: {{ $config.defaultMode | default 0440 }} {{- end }} {{- end }} {{- if .Values.extraSecretRedisConfigs }} @@ -433,6 +466,11 @@ spec: secret: secretName: {{ .Values.extraSecretSentinelConfigs }} {{- end }} + {{- range $storage := .Values.extraStorage }} + - name: {{ $storage.name }} + persistentVolumeClaim: + claimName: {{ $storage.pvcName }} + {{- end }} {{- with .Values.storage }} {{- if not $createPvc }} - name: {{ .volumeName }} diff --git a/charts/redis/values.yaml b/charts/redis/values.yaml index fe85e2f5de208d0cafcd86bb9aa0618ab20cc0de..08b3302dc808dd03b0bffa84a65725d10d0d9bf4 100644 --- a/charts/redis/values.yaml +++ b/charts/redis/values.yaml @@ -70,7 +70,7 @@ metrics: registry: "docker.io" repository: "oliver006/redis_exporter" pullPolicy: IfNotPresent - tag: "v1.55.0" + tag: "v1.59.0" ## Default security options to run Exporter as non-root, read only container without privilege escalation securityContext: allowPrivilegeEscalation: false @@ -138,8 +138,19 @@ metrics: extraExporterSecrets: [] ## Name of the existing K8s secret # - name: + ## Mount default mode (0440 if parameter is omitted) + # defaultMode: 0440 ## Mount path where the secret should be mounted into the container (f.e. /mysecretfolder) # mountPath: + ## A list of additional existing configMaps that will be mounted into the exporter container + extraExporterConfigs: [] + ## Name of the existing K8s configMap + # - name: + ## Mount default mode (0440 if parameter is omitted) + # defaultMode: 0440 + ## Mount path where the configMap should be mounted into the container (f.e. /mysecretfolder) + # mountPath: + ## Exporter service configuration service: ## Enable metrics service