Skip to content

Commit

Permalink
[bitnami/redis-cluster] feat: add support for svc bindings (#31330)
Browse files Browse the repository at this point in the history
  • Loading branch information
juan131 authored Jan 13, 2025
1 parent 03d96f7 commit c409f1f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bitnami/redis-cluster/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 11.4.0 (2025-01-13)

* [bitnami/redis-cluster] feat: add support for svc bindings ([#31330](https://github.com/bitnami/charts/pull/31330))

## 11.3.0 (2025-01-10)

* [bitnami/redis-cluster] feat: add support for customizing loadBalancerClass on services ([#31288](https://github.com/bitnami/charts/pull/31288))
* [bitnami/redis-cluster] feat: add support for customizing loadBalancerClass on services (#31288) ([ca6048a](https://github.com/bitnami/charts/commit/ca6048a15b45d61c0f590f6b98041ac92bac61c0)), closes [#31288](https://github.com/bitnami/charts/issues/31288)

## <small>11.2.3 (2025-01-08)</small>

Expand Down
2 changes: 1 addition & 1 deletion bitnami/redis-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ maintainers:
name: redis-cluster
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/redis-cluster
version: 11.3.0
version: 11.4.0
1 change: 1 addition & 0 deletions bitnami/redis-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ See [#15075](https://github.com/bitnami/charts/issues/15075)
| `volumePermissions.containerSecurityContext.privileged` | Run container as privileged | `false` |
| `volumePermissions.resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if volumePermissions.resources is set (volumePermissions.resources is recommended for production). | `nano` |
| `volumePermissions.resources` | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | `{}` |
| `serviceBindings.enabled` | Create secret for service binding (Experimental) | `false` |
| `podSecurityPolicy.create` | Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later | `false` |

### Redis&reg; statefulset parameters
Expand Down
27 changes: 27 additions & 0 deletions bitnami/redis-cluster/templates/svc-binding-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if .Values.serviceBindings.enabled }}
{{- $host := include "common.names.fullname" . }}
{{- $port := print .Values.service.ports.redis }}
{{- $password := include "redis-cluster.password" . }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-svc-binding" (include "common.names.fullname" .) }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: servicebinding.io/redis
data:
provider: {{ print "bitnami" | b64enc | quote }}
type: {{ print "redis" | b64enc | quote }}
host: {{ print $host | b64enc | quote }}
port: {{ print $port | b64enc | quote }}
password: {{ print $password | b64enc | quote }}
uri: {{ printf "redis://:%s@%s:%s" $password $host $port | b64enc | quote }}
{{- end }}
5 changes: 5 additions & 0 deletions bitnami/redis-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,11 @@ volumePermissions:
## memory: 1024Mi
##
resources: {}
## @param serviceBindings.enabled Create secret for service binding (Experimental)
## Ref: https://servicebinding.io/service-provider/
##
serviceBindings:
enabled: false
## PodSecurityPolicy configuration
## ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/
## @param podSecurityPolicy.create Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later
Expand Down

0 comments on commit c409f1f

Please sign in to comment.