Skip to content

Commit 5b332a5

Browse files
author
Ubuntu
committed
promoting version 7.8.6-2
1 parent e0bd7d2 commit 5b332a5

24 files changed

+1143
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*bundle.yaml

bundle.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16843,7 +16843,7 @@ spec:
1684316843
- configMapRef:
1684416844
name: "operator-environment-config"
1684516845
optional: true
16846-
image: redislabs/operator:7.8.6-1
16846+
image: redislabs/operator:7.8.6-2
1684716847
imagePullPolicy: Always
1684816848
livenessProbe:
1684916849
failureThreshold: 3
@@ -16891,7 +16891,7 @@ spec:
1689116891
- configMapRef:
1689216892
name: "operator-environment-config"
1689316893
optional: true
16894-
image: redislabs/operator:7.8.6-1
16894+
image: redislabs/operator:7.8.6-2
1689516895
imagePullPolicy: Always
1689616896
livenessProbe:
1689716897
failureThreshold: 3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.helmignore
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v2
2+
type: application
3+
4+
name: redis-enterprise-operator
5+
description: A Helm chart for Redis Enterprise Operator for Kubernetes
6+
7+
version: 7.8.6-2
8+
appVersion: 7.8.6-2
9+
10+
home: https://redis.com
11+
icon: https://redis.io/wp-content/uploads/2024/04/Logotype.svg
12+
keywords:
13+
- redis
14+
- database
15+
maintainers:
16+
- name: Redis
17+
url: https://redis.com/company/contact/
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Redis Enterprise Operator Helm Chart
2+
3+
Official Helm chart for installing, configuring and upgrading **Redis Enterprise Operator for Kubernetes**.
4+
5+
[Redis Enterprise](https://redis.com/redis-enterprise-software/overview/) is a self-managed data platform that unlocks the full potential of Redis at enterprise scale - on premises or in the cloud.
6+
[Redis Enterprise Operator for Kubernetes](https://redis.com/redis-enterprise-software/redis-enterprise-on-kubernetes/) provides a simple, Kubernetes-native way for deploying and managing Redis Enterprise on Kubernetes.
7+
8+
## Prerequisites
9+
10+
- Kubernetes 1.23+
11+
Supported Kubernetes versions can vary according to the Kubernetes distribution being used.
12+
Please consult the [release notes](https://redis.io/docs/latest/operate/kubernetes/release-notes/) for detailed supported distributions information per operator version.
13+
- Helm 3.10+
14+
15+
## Installing the Chart
16+
17+
To install the chart:
18+
19+
```sh
20+
helm install [RELEASE_NAME] [PATH_TO_CHART]
21+
```
22+
23+
The `[PATH_TO_CHART]` may be a path to the chart root directory, or a chart archive on the local filesystem.
24+
25+
Install using the Redis helm repository.
26+
27+
```sh
28+
helm repo add redis-enterprise-operator https://helm.redis.io/
29+
helm install my-redis-enterprise-operator redis-enterprise-operator/redis-enterprise-operator --version 7.8.6-2
30+
```
31+
32+
To install the chart on **OpenShift**, set the `openshift.mode=true` value:
33+
34+
```sh
35+
helm install [RELEASE_NAME] [PATH_TO_CHART] \
36+
--set openshift.mode=true
37+
```
38+
39+
To create and select a namespace for the installation, specify the `--namespace` and `--create-namespace` flags:
40+
41+
```sh
42+
helm install [RELEASE_NAME] [PATH_TO_CHART] \
43+
--namespace [NAMESPACE] \
44+
--create-namespace
45+
```
46+
47+
For example, to install the chart with release name "my-redis-enterprise" from within the chart's root directory:
48+
49+
```sh
50+
helm install my-redis-enterprise . \
51+
--namespace redis-enterprise \
52+
--create-namespace
53+
```
54+
55+
Note: the chart installation includes several jobs that configure the CRDs and admission controller used by the operator.
56+
These jobs run synchronously during the execution of `helm install` command, and may take around 1 minute to complete.
57+
To view additional progress information during the `helm install` execution, use the `--debug` flag:
58+
59+
```sh
60+
helm install [RELEASE_NAME] [PATH_TO_CHART] \
61+
--debug
62+
```
63+
64+
See [Configuration](#configuration) section below for various configuration options.
65+
See [Creating a Redis Enterprise Cluster](#creating-a-redis-enterprise-cluster) section below for instructions for creating a Redis Enterprise Cluster.
66+
See [helm install](https://helm.sh/docs/helm/helm_install/) and [Using Helm](https://helm.sh/docs/intro/using_helm/#helm-install-installing-a-package) for more information and options when installing charts.
67+
68+
## Uninstalling the Chart
69+
70+
Before uninstalling the chart, delete any custom resources managed by the Redis Enterprise Operator:
71+
72+
```sh
73+
kubectl delete redb <name>
74+
kubectl delete rerc <name>
75+
kubectl delete reaadb <name>
76+
kubectl delete rec <name>
77+
```
78+
79+
To uninstall a previously installed chart:
80+
81+
```sh
82+
helm uninstall [RELEASE_NAME]
83+
```
84+
85+
This removes all the Kubernetes resources associated with the chart and deletes the release.
86+
87+
See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for more information and options when uninstalling charts.
88+
89+
## Creating a Redis Enterprise Cluster
90+
91+
Once the chart is installed and the Redis Enterprise Operator is running, a Redis Enterprise Cluster can be created.
92+
As of now, the Redis Enterprise Cluster is created directly via custom resources, and not via Helm.
93+
94+
To create a Redis Enterprise Cluster:
95+
96+
1. Validate that the `redis-enterprise-operator` pod is in `RUNNING` state:
97+
98+
```sh
99+
kubectl get pods -n [NAMESPACE]
100+
```
101+
102+
2. Create a file for the `RedisEnterpriseCluster` custom resource:
103+
104+
```yaml
105+
apiVersion: app.redislabs.com/v1
106+
kind: RedisEnterpriseCluster
107+
metadata:
108+
name: rec
109+
spec:
110+
nodes: 3
111+
```
112+
113+
3. Apply the custom resource:
114+
115+
```sh
116+
kubectl apply -f rec.yaml -n [NAMESPACE]
117+
```
118+
119+
See [Create a Redis Enterprise cluster](https://redis.io/docs/latest/operate/kubernetes/deployment/quick-start/#create-a-redis-enterprise-cluster-rec) and [Redis Enterprise Cluster API](https://github.com/RedisLabs/redis-enterprise-k8s-docs/blob/master/redis_enterprise_cluster_api.md) for more information and options for creating a Redis Enterprise Cluster.
120+
121+
## Configuration
122+
123+
The chart supports several configuration options that allows to customize the behavior and capabilities of the Redis Enterprise Operator.
124+
For a list of configurable options and their descriptions, please refer to the `values.yaml` file at the root of the chart.
125+
126+
To install the chart with a customized values file:
127+
128+
```sh
129+
helm install [RELEASE_NAME] [PATH_TO_CHART] \
130+
--values [PATH_TO_VALUES_FILE]
131+
```
132+
133+
To install the chart with the default values files but with some specific values overriden:
134+
135+
```sh
136+
helm install [RELEASE_NAME] [PATH_TO_CHART] \
137+
--set key1=value1 \
138+
--set key2=value2
139+
```
140+
141+
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing) for additional information on how to customize the chart installation.
142+
143+
## Known Limitations
144+
145+
This is a preliminary release of this Helm chart, and as of now some if its functionality is still limited:
146+
147+
- The chart only installs the Redis Enterprise Operator, but doesn't create a Redis Enterprise Cluster. See [Creating a Redis Enterprise Cluster](#creating-a-redis-enterprise-cluster) section for instructions on how to directly create a Redis Enterprise Cluster.
148+
- Several configuration options for the operator are still unsupported, including multiple REDB namespaces, rack-aware, and vault integration. These options can be enabled by following the relevant instructions in the [product documentation](https://redis.io/docs/latest/operate/kubernetes/).
149+
- CRDs installed by the chart are not removed upon chart uninstallation. These could be manually removed when the chart is uninstalled and are no longer needed, using the following command:
150+
```sh
151+
kubectl delete crds -l app=redis-enterprise
152+
```
153+
- Helm chart upgrades are not supported, nor migrations from a non-Helm deployment to a Helm deployment.
154+
- Limited testing in advanced setups such as Active-Active configurations, airgapped deployments, IPv6/dual-stack environments.
155+
- The chart is still unpublished in a "helm repo" or ArtifactHub, and thus can only be installed from a local source (chart directory/archive).
156+
- While not really a limitation, please note that this chart also installs the [admission controller](https://redis.io/docs/latest/operate/kubernetes/deployment/quick-start/#enable-the-admission-controller) by default, and there's no option to disable it (as opposed to the non-Helm deployment).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{{- define "redis-enterprise-operator.operator.image" }}
2+
{{- if (.Values.global).azure }}
3+
{{- with .Values.global.azure.images.operator }}
4+
{{ .registry }}/{{ .image }}@{{ .digest }}
5+
{{- end }}
6+
{{- else }}
7+
{{- $defaultRepository := ternary "registry.connect.redhat.com/redislabs/redis-enterprise-operator" "redislabs/operator" .Values.openshift.mode }}
8+
{{- $repository := default $defaultRepository .Values.operator.image.repository }}
9+
{{ $repository }}:{{ .Values.operator.image.tag }}
10+
{{- end }}
11+
{{- end }}
12+
13+
{{- define "redis-enterprise-operator.annotations" }}
14+
{{- if ne .Values.versionAnnotations false -}}
15+
redis.io/helm-chart-ver: {{ .Chart.Version }}
16+
redis.io/operator-ver: {{ .Values.operator.image.tag }}
17+
{{- end }}
18+
{{- end }}
19+
20+
{{/*
21+
Evaluates to a TLS configuration for the admission webhook, either by retrieving an
22+
existing configuration from the "admission-tls" Secret, or by generating a new one.
23+
Returns a TLS configuration YAML object with a "cert" and "privateKey" keys.
24+
*/}}
25+
{{- define "redis-enterprise-operator.admissionTLSConfig" }}
26+
{{- $tlsConfig := dict }}
27+
{{- $secret := (lookup "v1" "Secret" .Release.Namespace "admission-tls") }}
28+
{{- if $secret }}
29+
{{ $tlsConfig = $secret.data }}
30+
{{- else}}
31+
{{ $cna := printf "admission.%s" .Release.Namespace }}
32+
{{ $cnb := printf "admission.%s.svc" .Release.Namespace }}
33+
{{ $cnc := printf "admission.%s.svc.cluster.local" .Release.Namespace }}
34+
{{ $cert := genSelfSignedCert $cnb nil (list $cna $cnb $cnc) (int (mul 365 5)) }}
35+
{{ $_ := set $tlsConfig "cert" ($cert.Cert | b64enc) }}
36+
{{ $_ := set $tlsConfig "privateKey" ($cert.Key | b64enc) }}
37+
{{- end }}
38+
{{ $tlsConfig | toYaml | nindent 2 }}
39+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: admission
5+
labels:
6+
app: redis-enterprise
7+
annotations:
8+
{{- include "redis-enterprise-operator.annotations" . | nindent 4}}
9+
spec:
10+
ports:
11+
- port: 443
12+
protocol: TCP
13+
targetPort: 8443
14+
selector:
15+
name: redis-enterprise-operator
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
apiVersion: batch/v1
2+
kind: Job
3+
metadata:
4+
namespace: {{ .Release.Namespace }}
5+
name: redis-enterprise-crds
6+
annotations:
7+
"redis/operator-ver": {{ .Values.operator.image.tag }}
8+
"redis/helm-chart-ver": {{ .Chart.Version }}
9+
"helm.sh/hook": pre-install, pre-upgrade
10+
"helm.sh/hook-weight": "-4"
11+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
12+
labels:
13+
app: redis-enterprise
14+
spec:
15+
template:
16+
metadata:
17+
labels:
18+
app: redis-enterprise
19+
spec:
20+
containers:
21+
- name: gatekeeper-crds
22+
image: {{ include "redis-enterprise-operator.operator.image" . | printf "%s" | trim }}
23+
securityContext:
24+
allowPrivilegeEscalation: false
25+
capabilities:
26+
drop: ["ALL"]
27+
runAsNonRoot: true
28+
seccompProfile:
29+
type: "RuntimeDefault"
30+
command:
31+
- crd-installer
32+
args:
33+
- "-action=applyCRD"
34+
- "-crdPaths=/crds/rec_crd.yaml,/crds/redb_crd.yaml,/crds/reaadb_crd.yaml,/crds/rerc_crd.yaml"
35+
resources:
36+
limits:
37+
cpu: 100m
38+
memory: 100Mi
39+
serviceAccountName: redis-enterprise-crds
40+
restartPolicy: OnFailure
41+
imagePullSecrets:
42+
{{- range .Values.imagePullSecrets }}
43+
- name: {{ . }}
44+
{{- end }}
45+
46+
---
47+
apiVersion: rbac.authorization.k8s.io/v1
48+
kind: ClusterRole
49+
metadata:
50+
name: redis-enterprise-crds
51+
annotations:
52+
"redis/operator-ver": {{ .Values.operator.image.tag }}
53+
"redis/helm-chart-ver": {{ .Chart.Version }}
54+
"helm.sh/hook": pre-install, pre-upgrade
55+
"helm.sh/hook-weight": "-5"
56+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
57+
labels:
58+
app: redis-enterprise
59+
rules:
60+
- apiGroups: ["apiextensions.k8s.io"]
61+
resources: ["customresourcedefinitions"]
62+
verbs: ["create", "get", "list", "watch", "patch"]
63+
---
64+
apiVersion: rbac.authorization.k8s.io/v1
65+
kind: ClusterRoleBinding
66+
metadata:
67+
name: redis-enterprise-crds
68+
annotations:
69+
"redis/operator-ver": {{ .Values.operator.image.tag }}
70+
"redis/helm-chart-ver": {{ .Chart.Version }}
71+
"helm.sh/hook": pre-install, pre-upgrade
72+
"helm.sh/hook-weight": "-5"
73+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
74+
labels:
75+
app: redis-enterprise
76+
roleRef:
77+
apiGroup: rbac.authorization.k8s.io
78+
kind: ClusterRole
79+
name: redis-enterprise-crds
80+
subjects:
81+
- kind: ServiceAccount
82+
name: redis-enterprise-crds
83+
namespace: {{ .Release.Namespace }}
84+
---
85+
apiVersion: v1
86+
kind: ServiceAccount
87+
metadata:
88+
name: redis-enterprise-crds
89+
namespace: {{ .Release.Namespace }}
90+
annotations:
91+
"redis/operator-ver": {{ .Values.operator.image.tag }}
92+
"redis/helm-chart-ver": {{ .Chart.Version }}
93+
"helm.sh/hook": pre-install, pre-upgrade
94+
"helm.sh/hook-weight": "-5"
95+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
96+
labels:
97+
app: redis-enterprise

0 commit comments

Comments
 (0)