Skip to content

Commit f722734

Browse files
authored
Promote 7.8.2-6 (#1)
1 parent 00dce20 commit f722734

17 files changed

+389
-177
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
# sample-charts
2-
3-
My sample charts
4-
small change
1+
# Redis Enterprise Operator Helm Chart
2+
# IMPORTANT preview version - don't use in production.

charts/redis-enterprise-operator/CHANGELOG.md

Lines changed: 0 additions & 16 deletions
This file was deleted.

charts/redis-enterprise-operator/Chart.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ type: application
44
name: redis-enterprise-operator
55
description: A Helm chart for Redis Enterprise Operator for Kubernetes
66

7-
version: 0.2.6
8-
appVersion: 7.4.2-2
7+
version: 7.8.2-6
8+
appVersion: 7.8.2-6
99

10-
home: https://redis.io
11-
icon: https://redis.io/wp-content/uploads/2024/04/Logotype.svg
10+
home: https://redis.com
11+
icon: https://redis.com/wp-content/themes/wpx/assets/images/logo-redis.svg
1212
keywords:
13-
- redis
14-
- database
13+
- redis
14+
- database
1515
maintainers:
16-
- name: Redis
17-
url: https://redis.com/company/contact/
16+
- name: Redis
17+
url: https://redis.com/company/contact/

charts/redis-enterprise-operator/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Official Helm chart for installing, configuring and upgrading **Redis Enterprise
99

1010
- Kubernetes 1.23+
1111
Supported Kubernetes versions can vary according to the Kubernetes distribution being used.
12-
Please consult the [release notes](https://docs.redis.com/latest/kubernetes/release-notes/) for detailed supported distributions information per operator version.
12+
Please consult the [release notes](https://redis.io/docs/latest/operate/kubernetes/release-notes/) for detailed supported distributions information per operator version.
1313
- Helm 3.10+
1414

1515
## Installing the Chart
@@ -22,11 +22,11 @@ helm install [RELEASE_NAME] [PATH_TO_CHART]
2222

2323
The `[PATH_TO_CHART]` may be a path to the chart root directory, or a chart archive on the local filesystem.
2424

25-
To install the chart on **OpenShift**, set the `isOpenshift=true` value:
25+
To install the chart on **OpenShift**, set the `openshift.mode=true` value:
2626

2727
```sh
2828
helm install [RELEASE_NAME] [PATH_TO_CHART] \
29-
--set isOpenshift=true
29+
--set openshift.mode=true
3030
```
3131

3232
To create and select a namespace for the installation, specify the `--namespace` and `--create-namespace` flags:
@@ -109,7 +109,7 @@ spec:
109109
kubectl apply -f rec.yaml -n [NAMESPACE]
110110
```
111111

112-
See [Create a Redis Enterprise cluster](https://docs.redis.com/latest/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.
112+
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.
113113

114114
## Configuration
115115

@@ -138,14 +138,12 @@ See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_h
138138
This is a preliminary release of this Helm chart, and as of now some if its functionality is still limited:
139139

140140
- 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.
141-
- 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://docs.redis.com/latest/kubernetes/).
141+
- 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/).
142142
- 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:
143143
```sh
144144
kubectl delete crds -l app=redis-enterprise
145145
```
146146
- Helm chart upgrades are not supported, nor migrations from a non-Helm deployment to a Helm deployment.
147147
- Limited testing in advanced setups such as Active-Active configurations, airgapped deployments, IPv6/dual-stack environments.
148148
- The chart is still unpublished in a "helm repo" or ArtifactHub, and thus can only be installed from a local source (chart directory/archive).
149-
- While not really a limitation, please note that this chart also installs the [admission controller](https://docs.redis.com/latest/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).
150-
151-
small change
149+
- 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: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,39 @@
11
{{- define "redis-enterprise-operator.operator.image" }}
2-
{{- if and .Values.global .Values.global.azure .Values.global.azure.images .Values.global.azure.images.operator }}
2+
{{- if (.Values.global).azure }}
33
{{- with .Values.global.azure.images.operator }}
44
{{ .registry }}/{{ .image }}@{{ .digest }}
55
{{- end }}
66
{{- else }}
7-
{{- $defaultRepository := ternary "registry.connect.redhat.com/redislabs/redis-enterprise-operator" "redislabs/operator" .Values.isOpenshift }}
7+
{{- $defaultRepository := ternary "registry.connect.redhat.com/redislabs/redis-enterprise-operator" "redislabs/operator-internal" .Values.openshift.mode }}
88
{{- $repository := default $defaultRepository .Values.operator.image.repository }}
99
{{ $repository }}:{{ .Values.operator.image.tag }}
1010
{{- end }}
1111
{{- 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 }}

charts/redis-enterprise-operator/templates/admission-service.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ metadata:
44
name: admission
55
labels:
66
app: redis-enterprise
7+
annotations:
8+
{{- include "redis-enterprise-operator.annotations" . | nindent 4}}
79
spec:
810
ports:
9-
- port: 443
10-
protocol: TCP
11-
targetPort: 8443
11+
- port: 443
12+
protocol: TCP
13+
targetPort: 8443
1214
selector:
1315
name: redis-enterprise-operator

charts/redis-enterprise-operator/templates/jobs/install_crds_job.yaml renamed to charts/redis-enterprise-operator/templates/jobs/install-crds.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ spec:
1717
labels:
1818
app: redis-enterprise
1919
spec:
20-
serviceAccountName: redis-enterprise-crds
2120
containers:
2221
- name: gatekeeper-crds
2322
image: {{ include "redis-enterprise-operator.operator.image" . | printf "%s" | trim }}
@@ -35,9 +34,15 @@ spec:
3534
- "-crdPaths=/crds/rec_crd.yaml,/crds/redb_crd.yaml,/crds/reaadb_crd.yaml,/crds/rerc_crd.yaml"
3635
resources:
3736
limits:
38-
cpu: 500m
39-
memory: 256Mi
37+
cpu: 100m
38+
memory: 100Mi
39+
serviceAccountName: redis-enterprise-crds
4040
restartPolicy: OnFailure
41+
imagePullSecrets:
42+
{{- range .Values.imagePullSecrets }}
43+
- name: {{ . }}
44+
{{- end }}
45+
4146
---
4247
apiVersion: rbac.authorization.k8s.io/v1
4348
kind: ClusterRole
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
{{- if .Values.admission.limitToNamespace }}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: redis-enterprise-namespace-labels
6+
labels:
7+
app: redis-enterprise
8+
namespace: {{ .Release.Namespace }}
9+
annotations:
10+
"helm.sh/hook": post-install,post-upgrade,post-delete
11+
"helm.sh/hook-weight": "1"
12+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
13+
{{- include "redis-enterprise-operator.annotations" . | nindent 4}}
14+
---
15+
apiVersion: rbac.authorization.k8s.io/v1
16+
kind: ClusterRole
17+
metadata:
18+
name: redis-enterprise-namespace-labels
19+
labels:
20+
app: redis-enterprise
21+
annotations:
22+
"helm.sh/hook": post-install,post-upgrade,post-delete
23+
"helm.sh/hook-weight": "1"
24+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
25+
{{- include "redis-enterprise-operator.annotations" . | nindent 4}}
26+
rules:
27+
- apiGroups: [""]
28+
resources: ["namespaces"]
29+
verbs: ["patch"]
30+
---
31+
apiVersion: rbac.authorization.k8s.io/v1
32+
kind: ClusterRoleBinding
33+
metadata:
34+
name: redis-enterprise-namespace-labels
35+
labels:
36+
app: redis-enterprise
37+
annotations:
38+
"helm.sh/hook": post-install,post-upgrade,post-delete
39+
"helm.sh/hook-weight": "1"
40+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
41+
{{- include "redis-enterprise-operator.annotations" . | nindent 4}}
42+
subjects:
43+
- kind: ServiceAccount
44+
name: redis-enterprise-namespace-labels
45+
namespace: {{ .Release.Namespace }}
46+
roleRef:
47+
kind: ClusterRole
48+
name: redis-enterprise-namespace-labels
49+
apiGroup: rbac.authorization.k8s.io
50+
51+
---
52+
apiVersion: batch/v1
53+
kind: Job
54+
metadata:
55+
name: redis-enterprise-namespace-labels
56+
labels:
57+
app: redis-enterprise
58+
annotations:
59+
"helm.sh/hook": post-install,post-upgrade
60+
"helm.sh/hook-weight": "1"
61+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
62+
{{- include "redis-enterprise-operator.annotations" . | nindent 4}}
63+
spec:
64+
backoffLimit: 6
65+
completions: 1
66+
parallelism: 1
67+
template:
68+
metadata:
69+
labels:
70+
app: redis-enterprise
71+
spec:
72+
containers:
73+
- name: redis-enterprise-namespace-labels
74+
resources:
75+
limits:
76+
cpu: 100m
77+
memory: 100Mi
78+
image: {{ include "redis-enterprise-operator.operator.image" . | printf "%s" | trim }}
79+
imagePullPolicy: IfNotPresent
80+
securityContext:
81+
allowPrivilegeEscalation: false
82+
capabilities:
83+
drop: ["ALL"]
84+
runAsNonRoot: true
85+
seccompProfile:
86+
type: "RuntimeDefault"
87+
command:
88+
- crd-installer
89+
args:
90+
- "-action=patchNamespace"
91+
- -namespace={{ .Release.Namespace }}
92+
restartPolicy: OnFailure
93+
serviceAccountName: redis-enterprise-namespace-labels
94+
imagePullSecrets:
95+
{{- range .Values.imagePullSecrets }}
96+
- name: {{ . }}
97+
{{- end }}
98+
---
99+
100+
apiVersion: batch/v1
101+
kind: Job
102+
metadata:
103+
name: redis-enterprise-namespace-labels-cleanup
104+
labels:
105+
app: redis-enterprise
106+
annotations:
107+
"helm.sh/hook": post-delete
108+
"helm.sh/hook-weight": "1"
109+
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
110+
{{- include "redis-enterprise-operator.annotations" . | nindent 4}}
111+
spec:
112+
backoffLimit: 6
113+
completions: 1
114+
parallelism: 1
115+
template:
116+
metadata:
117+
labels:
118+
app: redis-enterprise
119+
spec:
120+
containers:
121+
- name: redis-enterprise-namespace-labels-cleanup
122+
resources:
123+
limits:
124+
cpu: 100m
125+
memory: 100Mi
126+
image: {{ include "redis-enterprise-operator.operator.image" . | printf "%s" | trim }}
127+
imagePullPolicy: IfNotPresent
128+
securityContext:
129+
allowPrivilegeEscalation: false
130+
capabilities:
131+
drop: ["ALL"]
132+
runAsNonRoot: true
133+
seccompProfile:
134+
type: "RuntimeDefault"
135+
command:
136+
- crd-installer
137+
args:
138+
- "-action=unpatchNamespace"
139+
- -namespace={{ .Release.Namespace }}
140+
restartPolicy: OnFailure
141+
serviceAccountName: redis-enterprise-namespace-labels
142+
imagePullSecrets:
143+
{{- range .Values.imagePullSecrets }}
144+
- name: {{ . }}
145+
{{- end }}
146+
{{- end }}{{- /* if limitToNamespace */ -}}

0 commit comments

Comments
 (0)