Skip to content

Commit 220f640

Browse files
spacing
1 parent 93a3350 commit 220f640

File tree

1 file changed

+54
-54
lines changed

1 file changed

+54
-54
lines changed

content/operate/kubernetes/deployment/openshift/openshift-cli.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ To see which version of Redis Enterprise for Kubernetes supports your OpenShift
2323

2424
1. Create a new project.
2525

26-
```bash
26+
```sh
2727
oc new-project <your-project-name>
2828
```
2929

3030
1. Verify the newly created project.
3131

32-
```bash
32+
```sh
3333
oc project <your-project-name>
3434
```
3535

3636
1. Get the deployment files.
3737

38-
```bash
38+
```sh
3939
git clone https://github.com/RedisLabs/redis-enterprise-k8s-docs
4040
```
4141

@@ -52,13 +52,13 @@ To see which version of Redis Enterprise for Kubernetes supports your OpenShift
5252

5353
1. Verify that your `redis-enterprise-operator` deployment is running.
5454

55-
```bash
55+
```sh
5656
oc get deployment
5757
```
5858

5959
A typical response looks like this:
6060

61-
```bash
61+
```sh
6262
NAME READY UP-TO-DATE AVAILABLE AGE
6363
redis-enterprise-operator 1/1 1 1 0m36s
6464
```
@@ -115,7 +115,7 @@ The Redis Enterprise pods must run in OpenShift with privileges set in a [Securi
115115

116116
1. Apply the custom resource file to create your Redis Enterprise cluster.
117117

118-
```bash
118+
```sh
119119
oc apply -f <rec_rhel>.yaml
120120
```
121121

@@ -149,38 +149,38 @@ If not limited, the webhook intercepts requests from all namespaces. If you have
149149
150150
1. Verify your namespace is labeled and the label is unique to this namespace, as shown in the next example.
151151
152-
```bash
153-
apiVersion: v1
154-
kind: Namespace
155-
metadata:
156-
labels:
157-
namespace-name: staging
158-
name: staging
159-
```
152+
```sh
153+
apiVersion: v1
154+
kind: Namespace
155+
metadata:
156+
labels:
157+
namespace-name: staging
158+
name: staging
159+
```
160160
161161
1. Patch the webhook spec with the `namespaceSelector` field.
162-
```bash
163-
cat > modified-webhook.yaml <<EOF
164-
webhooks:
165-
- name: redisenterprise.admission.redislabs
166-
namespaceSelector:
167-
matchLabels:
168-
namespace-name: staging
169-
EOF
170-
```
162+
```sh
163+
cat > modified-webhook.yaml <<EOF
164+
webhooks:
165+
- name: redisenterprise.admission.redislabs
166+
namespaceSelector:
167+
matchLabels:
168+
namespace-name: staging
169+
EOF
170+
```
171171
172172
1. Apply the patch.
173173
174-
```bash
175-
oc patch ValidatingWebhookConfiguration \
176-
redis-enterprise-admission --patch "$(cat modified-webhook.yaml)"
177-
```
174+
```sh
175+
oc patch ValidatingWebhookConfiguration \
176+
redis-enterprise-admission --patch "$(cat modified-webhook.yaml)"
177+
```
178178
{{<note>}}
179179
For releases before 6.4.2-4, use this command instead:
180-
```sh
181-
oc patch ValidatingWebhookConfiguration \
182-
redb-admission --patch "$(cat modified-webhook.yaml)"
183-
```
180+
```sh
181+
oc patch ValidatingWebhookConfiguration \
182+
redb-admission --patch "$(cat modified-webhook.yaml)"
183+
```
184184
185185
The 6.4.2-4 release introduces a new `ValidatingWebhookConfiguration` to replace `redb-admission`. See the [6.4.2-4 release notes]({{< relref "/operate/kubernetes/release-notes/6-4-2-releases/" >}}).
186186
{{</note>}}
@@ -189,22 +189,22 @@ If not limited, the webhook intercepts requests from all namespaces. If you have
189189
190190
Apply an invalid resource as shown below to force the admission controller to reject it. If it applies successfully, the admission controller is not installed correctly.
191191
192-
```bash
193-
oc apply -f - << EOF
194-
apiVersion: app.redislabs.com/v1alpha1
195-
kind: RedisEnterpriseDatabase
196-
metadata:
197-
name: redis-enterprise-database
198-
spec:
199-
evictionPolicy: illegal
200-
EOF
192+
```sh
193+
oc apply -f - << EOF
194+
apiVersion: app.redislabs.com/v1alpha1
195+
kind: RedisEnterpriseDatabase
196+
metadata:
197+
name: redis-enterprise-database
198+
spec:
199+
evictionPolicy: illegal
200+
EOF
201201
```
202202
203203
You should see this error from the admission controller webhook `redisenterprise.admission.redislabs`.
204204
205-
```bash
206-
Error from server: error when creating "STDIN": admission webhook "redisenterprise.admission.redislabs" denied the request: eviction_policy: u'illegal' is not one of [u'volatile-lru', u'volatile-ttl', u'volatile-random', u'allkeys-lru', u'allkeys-random', u'noeviction', u'volatile-lfu', u'allkeys-lfu']
207-
```
205+
```sh
206+
Error from server: error when creating "STDIN": admission webhook "redisenterprise.admission.redislabs" denied the request: eviction_policy: u'illegal' is not one of [u'volatile-lru', u'volatile-ttl', u'volatile-random', u'allkeys-lru', u'allkeys-random', u'noeviction', u'volatile-lfu', u'allkeys-lfu']
207+
```
208208
209209
## Create a Redis Enterprise database custom resource
210210
@@ -214,20 +214,20 @@ The operator uses the instructions in the Redis Enterprise database (REDB) custo
214214
215215
This example creates a test database. For production databases, see [create a database]({{< relref "/operate/kubernetes/re-databases/db-controller.md#create-a-database" >}}) and [RedisEnterpriseDatabase API reference]({{< relref "/operate/kubernetes/reference/redis_enterprise_database_api" >}}).
216216
217-
```bash
218-
cat << EOF > /tmp/redis-enterprise-database.yml
219-
apiVersion: app.redislabs.com/v1alpha1
220-
kind: RedisEnterpriseDatabase
221-
metadata:
222-
name: redis-enterprise-database
223-
spec:
224-
memorySize: 100MB
225-
EOF
226-
```
217+
```sh
218+
cat << EOF > /tmp/redis-enterprise-database.yml
219+
apiVersion: app.redislabs.com/v1alpha1
220+
kind: RedisEnterpriseDatabase
221+
metadata:
222+
name: redis-enterprise-database
223+
spec:
224+
memorySize: 100MB
225+
EOF
226+
```
227227
228228
1. Apply the newly created REDB resource.
229229
230-
```bash
230+
```sh
231231
oc apply -f /tmp/redis-enterprise-database.yml
232232
```
233233

0 commit comments

Comments
 (0)