Skip to content

Commit 9e54298

Browse files
authored
Release 5.4.2 (#51)
Release 5.4.2
2 parents 1c2e56d + 43c5a00 commit 9e54298

9 files changed

+119
-41
lines changed

README.md

+37-18
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
* [Prerequisites](#prerequisites)
66
* [Deployment](#deployment)
77
* [Configuration Options](#configuration)
8+
* [IPV4 enforcement](#ipv4-enforcement)
89

910

1011

1112
#### Prerequisites:
12-
* A minimum of 3 nodes which support the following [requirements][]
13+
* A minimum of 3 nodes which support the following [requirements][]
1314
* A kubernetes version of 1.8 or higher
1415
* For service broker - a k8s distribution that supports service catalog (see also: [service-catalog][])
15-
> Note: For RHEL based images and/or deployments on OpenShift, please use redis-enterprise-cluster_rhel.yaml and operator_rhel.yaml.
16-
For Service Broker, please see examples/with_service_broker_rhel.yaml. RedHat certified images are available on: https://access.redhat.com/containers/#/product/71f6d1bb3408bd0d
16+
> Note: For RHEL based images and/or deployments on OpenShift, please use redis-enterprise-cluster_rhel.yaml and operator_rhel.yaml.
17+
For Service Broker, please see examples/with_service_broker_rhel.yaml. RedHat certified images are available on: https://access.redhat.com/containers/#/product/71f6d1bb3408bd0d
1718

1819

1920
#### Deployment:
@@ -27,7 +28,7 @@ git clone https://github.com/RedisLabs/redis-enterprise-k8s-docs.git
2728
```
2829
oc new-project my-project
2930
```
30-
31+
3132
> For non-OpenShift deployment - create a new namespace:
3233
```
3334
kubectl create namespace demo
@@ -56,52 +57,62 @@ git clone https://github.com/RedisLabs/redis-enterprise-k8s-docs.git
5657
```
5758
clusterrole "redis-enterprise-operator-sb" configured
5859
```
59-
60+
6061
Bind the Cluster Service Broker role to the operator service account (in the current namespace):
6162
```
6263
oc adm policy add-cluster-role-to-user redis-enterprise-operator-sb --serviceaccount redis-enterprise-operator --rolebinding-name=redis-enterprise-operator-sb
6364
```
64-
65+
6566
> You should receive the following response:
6667
```
6768
cluster role "redis-enterprise-operator-sb" added: "redis-enterprise-operator"
6869
```
6970
70-
3) The next step applies rbac.yaml, creating a service account, role, and role-binding to allow resources access control (provides permissions to create and manage resources):
71+
3) You can optionally use pod security policy.
72+
```
73+
kubectl apply -f psp.yaml
74+
```
75+
If you use this option, you should add the policy name to REC configuration, in redis-enterprise-cluster.yaml.
76+
```
77+
podSecurityPolicyName: "redis-enterprise-psp"
78+
```
79+
80+
81+
4) The next step applies rbac.yaml, creating a service account, role, and role-binding to allow resources access control (provides permissions to create and manage resources):
7182
```
7283
kubectl apply -f rbac.yaml
7384
```
74-
85+
7586
> You should receive the following response:
7687
```
7788
clusterrolebinding.rbac.authorization.k8s.io/redis-enterprise-operator configured
7889
```
7990
80-
4) The next step applies crd.yaml, creating a CustomResourceDefinition for redis enterprise cluster resource.
91+
5) The next step applies crd.yaml, creating a CustomResourceDefinition for redis enterprise cluster resource.
8192
This creates another API resource to be handled by the k8s API server and managed by the operator we will deploy next.
8293
```
8394
kubectl apply -f crd.yaml
8495
```
85-
96+
8697
> You should receive the following response:
8798
```
8899
customresourcedefinition.apiextensions.k8s.io/redisenterpriseclusters.app.redislabs.com configured
89100
```
90101
91-
5) Create the operator deployment: a deployment responsible for managing the k8s deployment and lifecycle of a redis-enterprise-cluster.
102+
6) Create the operator deployment: a deployment responsible for managing the k8s deployment and lifecycle of a redis-enterprise-cluster.
92103
Among many other responsibilities, it creates a stateful set that runs the redis enterprise nodes (as pods).
93-
104+
94105
Before applying - edit the tag according to the relevant operator version: ```image: redislabs/operator:tag```
95106
```
96107
kubectl apply -f operator.yaml
97108
```
98-
109+
99110
> You should receive the following response:
100111
```
101112
deployment.apps/redis-enterprise-operator created
102113
```
103114
104-
6) Run ```kubectl get Deployment``` and verify redis-enterprise-operator deployment is running
115+
7) Run ```kubectl get Deployment``` and verify redis-enterprise-operator deployment is running
105116
106117
A typical response may look like this:
107118
```
@@ -110,12 +121,12 @@ This creates another API resource to be handled by the k8s API server and manage
110121
|redis-enterprise-operator|1 | 1 | 1 | 1 | 2m |
111122
```
112123
113-
7) Create A Redis Enterprise Cluster:
124+
8) Create A Redis Enterprise Cluster:
114125
Choose the configuration relevant for you (see next section) - you may find additional examples in the examples folder. Note that you need to specify an image tag if you'd like to pull a RHEL image.
115126
116127
```kubectl apply -f redis-enterprise-cluster.yaml```
117128
118-
8) Run ```kubectl get rec``` and verify creation was successful. rec is a shortcut for RedisEnterpriseClusters.
129+
9) Run ```kubectl get rec``` and verify creation was successful. rec is a shortcut for RedisEnterpriseClusters.
119130
120131
121132
#### Configuration:
@@ -126,7 +137,7 @@ Redis Image
126137
redisEnterpriseImageSpec:
127138
imagePullPolicy: IfNotPresent
128139
repository: redislabs/redis
129-
versionTag: 5.2.2-14
140+
versionTag: 5.4.2-27
130141
```
131142

132143
Persistence
@@ -137,7 +148,7 @@ Persistence
137148
storageClassName: "standard" #on AWS common storage class is gp2
138149
```
139150
140-
Redis Enterprise Nodes (podes)
151+
Redis Enterprise Nodes (pods)
141152
```yaml
142153
redisEnterpriseNodeResources:
143154
limits:
@@ -216,5 +227,13 @@ activeActive: # edit values according to your cluster
216227
fqdn: <cluster3_name>.<cluster3_namespace>.svc.cluster.local
217228
```
218229
230+
#### IPV4 enforcement
231+
You might not have IPV6 support in your K8S cluster.
232+
In this case, you could enforce the use of IPV4, by adding the following attribute to the REC spec:
233+
```yaml
234+
enforceIPv4: true
235+
```
236+
Note: Setting 'enforceIPv4' to 'true' is a requirement for running REC on PKS.
237+
219238
[requirements]: https://redislabs.com/redis-enterprise-documentation/administering/designing-production/hardware-requirements/
220239
[service-catalog]: https://kubernetes.io/docs/concepts/extend-kubernetes/service-catalog/

examples/with_service_broker_rhel.yaml

+1-9
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,8 @@ spec:
88
enabled: true
99
persistentSpec:
1010
storageClassName: "gp2"
11-
imageSpec:
12-
imagePullPolicy: Always
13-
repository: redislabs/service-broker
14-
versionTag: 78_4b9b17f.rhel7
1511
redisEnterpriseImageSpec:
1612
imagePullPolicy: IfNotPresent
1713
repository: redislabs/redis
18-
versionTag: 5.4.0-19.rhel7-openshift
19-
redisEnterpriseServicesRiggerImageSpec:
20-
imagePullPolicy: IfNotPresent
21-
repository: redislabs/k8s-controller
22-
versionTag: 109_5c9af60.rhel7
14+
versionTag: 5.4.2-27.rhel7-openshift
2315

operator.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ spec:
1515
serviceAccount: redis-enterprise-operator
1616
containers:
1717
- name: redis-enterprise-operator
18-
image: redislabs/operator:498_f987b08
18+
image: redislabs/operator:804_c4987427
19+
securityContext:
20+
runAsUser: 1001
1921
command:
2022
- redis-enterprise-operator
2123
imagePullPolicy: Always

operator_rhel.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ spec:
1515
serviceAccount: redis-enterprise-operator
1616
containers:
1717
- name: redis-enterprise-operator
18-
image: redislabs/operator:498_f987b08.rhel7
18+
image: redislabs/operator:804_c4987427.rhel7
19+
securityContext:
20+
runAsUser: 1001
1921
command:
2022
- redis-enterprise-operator
2123
imagePullPolicy: Always

psp.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: extensions/v1beta1
2+
kind: PodSecurityPolicy
3+
metadata:
4+
name: redis-enterprise-psp
5+
spec:
6+
privileged: false
7+
allowPrivilegeEscalation: true
8+
allowedCapabilities:
9+
- SYS_RESOURCE
10+
- NET_RAW
11+
runAsUser:
12+
rule: MustRunAsNonRoot
13+
fsGroup:
14+
rule: MustRunAs
15+
ranges:
16+
- min: 1001
17+
max: 1001
18+
seLinux:
19+
rule: RunAsAny
20+
supplementalGroups:
21+
rule: RunAsAny
22+
volumes:
23+
- '*'

rbac.yaml

+44-4
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,57 @@ apiVersion: rbac.authorization.k8s.io/v1
33
metadata:
44
name: redis-enterprise-operator
55
rules:
6-
- apiGroups: ["", "extensions", "apps", "rbac.authorization.k8s.io", "policy"]
7-
resources: ["*"]
6+
- apiGroups: ["rbac.authorization.k8s.io", ""]
7+
resources: ["roles", "serviceaccounts", "rolebindings"]
88
verbs: ["*"]
99
- apiGroups:
1010
- app.redislabs.com
11-
resources: ["*"]
11+
resources:
12+
- "*"
13+
verbs:
14+
- "*"
15+
- apiGroups: [""]
16+
resources: ["secrets"]
1217
verbs: ["*"]
18+
- apiGroups: [""]
19+
resources: ["endpoints"]
20+
verbs: ["get"]
21+
- apiGroups: [""]
22+
resources: ["events"]
23+
verbs: ["create"]
24+
- apiGroups: ["apps"]
25+
resources: ["deployments", "statefulsets"]
26+
verbs: ["*"]
27+
- apiGroups: ["policy"]
28+
resources: ["poddisruptionbudgets"]
29+
verbs: ["create", "delete", "get"]
30+
- apiGroups: [""]
31+
resources: ["configmaps"]
32+
verbs: ["create", "delete", "get" , "update"]
33+
- apiGroups: [""]
34+
resources: ["persistentvolumeclaims"]
35+
verbs: ["create", "delete", "get" , "update"]
36+
37+
# needed rbac rules for services controller
38+
- apiGroups: [""]
39+
resources: ["pods"]
40+
verbs: ["get", "watch", "list", "update", "patch"]
41+
- apiGroups: [""]
42+
resources: ["services"]
43+
verbs: ["get", "watch", "list", "update", "patch", "create", "delete"]
1344
- apiGroups:
1445
- route.openshift.io
1546
resources: ["routes", "routes/custom-host"]
1647
verbs: ["*"]
48+
- apiGroups: ["extensions"]
49+
resources: ["podsecuritypolicies"]
50+
resourceNames:
51+
- redis-enterprise-psp
52+
verbs:
53+
- use
54+
- apiGroups: ["extensions"]
55+
resources: ["ingresses"]
56+
verbs: ["*"]
1757
---
1858
kind: ServiceAccount
1959
apiVersion: v1
@@ -30,4 +70,4 @@ subjects:
3070
roleRef:
3171
kind: Role
3272
name: redis-enterprise-operator
33-
apiGroup: rbac.authorization.k8s.io
73+
apiGroup: rbac.authorization.k8s.io

redis-enterprise-cluster.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ spec:
1919
redisEnterpriseImageSpec:
2020
imagePullPolicy: IfNotPresent
2121
repository: redislabs/redis
22-
versionTag: 5.4.0-19
22+
versionTag: 5.4.2-27
2323

redis-enterprise-cluster_rhel.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,5 @@ spec:
1919
redisEnterpriseImageSpec:
2020
imagePullPolicy: IfNotPresent
2121
repository: redislabs/redis
22-
versionTag: 5.4.0-19.rhel7-openshift
23-
redisEnterpriseServicesRiggerImageSpec:
24-
imagePullPolicy: IfNotPresent
25-
repository: redislabs/k8s-controller
26-
versionTag: 109_5c9af60.rhel7
22+
versionTag: 5.4.0-27.rhel7-openshift
2723

scc.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
kind: SecurityContextConstraints
2-
apiVersion: v1
2+
apiVersion: security.openshift.io/v1
33
metadata:
44
name: redis-enterprise-scc
55
allowPrivilegedContainer: false
66
allowedCapabilities:
77
- SYS_RESOURCE
88
runAsUser:
9-
type: RunAsAny
9+
type: MustRunAs
10+
uid: 1001
11+
FSGroup:
12+
type: MustRunAs
13+
ranges: 1001,1001
1014
seLinuxContext:
1115
type: RunAsAny

0 commit comments

Comments
 (0)