Skip to content

Commit 7e91c66

Browse files
authored
Merge pull request #68666 from sheriff-rh/OCPBUGS-18377.1
2 parents b596776 + 35a0f14 commit 7e91c66

File tree

5 files changed

+52
-5
lines changed

5 files changed

+52
-5
lines changed

modules/spo-applying-profiles.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ spec:
8585
localhostProfile: operator/my-namespace/profile1.json
8686
----
8787

88-
. Apply the profile to a `Deployment` object by running the following command:
88+
. Apply the profile to any other workload, such as a `Deployment` object, by running the following command:
8989
+
9090
[source,terminal]
9191
----

modules/spo-binding-workloads.adoc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,31 @@ spec:
4747
$ oc label ns my-namespace spo.x-k8s.io/enable-binding=true
4848
----
4949

50-
. Delete and re-create the pod to use the `ProfileBinding` object:
50+
. Define a pod named `test-pod.yaml`:
5151
+
52-
[source,terminal,subs="attributes+"]
52+
[source,yaml]
5353
----
54-
$ oc delete pods test-pod && oc create -f pod01.yaml
54+
apiVersion: v1
55+
kind: Pod
56+
metadata:
57+
name: test-pod
58+
spec:
59+
containers:
60+
- name: test-container
61+
image: quay.io/security-profiles-operator/test-nginx-unprivileged:1.21
62+
----
63+
64+
. Create the pod:
65+
+
66+
[source,terminal]
5567
----
68+
$ oc create -f test-pod.yaml
69+
----
70+
+
71+
[NOTE]
72+
====
73+
If the pod already exists, you must re-create the pod for the binding to work properly.
74+
====
5675

5776
.Verification
5877

modules/spo-creating-profiles.adoc

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,14 @@ ifdef::seccomp[]
2626

2727
.Procedure
2828

29-
* Create the `{kind}` object:
29+
. Create a project by running the following command:
30+
+
31+
[source,terminal]
32+
----
33+
$ oc new-project my-namespace
34+
----
35+
36+
. Create the `{kind}` object:
3037
+
3138
[source,yaml,subs="attributes+"]
3239
----
@@ -54,6 +61,13 @@ The `{kind}` object has several features that allow for better security hardenin
5461
5562
.Procedure
5663

64+
. Create a project by running the following command:
65+
+
66+
[source,terminal]
67+
----
68+
$ oc new-project nginx-deploy
69+
----
70+
5771
. Create a policy that can be used with a non-privileged workload by creating the following `{kind}` object:
5872
+
5973
[source,yaml,subs="attributes+"]

modules/spo-recording-profiles.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ A container with `privileged: true` security context restraints prevents log-bas
3232

3333
.Procedure
3434

35+
. Create a project by running the following command:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc new-project my-namespace
40+
----
41+
3542
. Label the namespace with `enable-recording=true` by running the following command:
3643
+
3744
[source,terminal]

modules/spo-replicating-controllers.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ When you deploy SELinux policies for replicating controllers, such as deployment
1010

1111
.Procedure
1212

13+
. Create a project by running the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc new-project nginx-secure
18+
----
19+
1320
. Create the following `RoleBinding` object to allow SELinux policies to be used in the `nginx-secure` namespace:
1421
+
1522
[source,yaml]

0 commit comments

Comments
 (0)