Skip to content

Commit 65ab877

Browse files
authored
Merge pull request #62529 from bergerhoffer/OSDOCS-6914-scalability
OSDOCS 6914: Updating pod examples to comply with restricted PSA (Sca…
2 parents 9b14245 + 251e551 commit 65ab877

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

modules/cnf-configure_for_irq_dynamic_load_balancing.adoc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ metadata:
4949
irq-load-balancing.crio.io: "disable"
5050
cpu-quota.crio.io: "disable"
5151
spec:
52+
securityContext:
53+
runAsNonRoot: true
54+
seccompProfile:
55+
type: RuntimeDefault
5256
containers:
5357
- name: dynamic-irq-pod
5458
image: "registry.redhat.io/openshift4/cnf-tests-rhel8:v{product-version}"
@@ -60,10 +64,14 @@ spec:
6064
limits:
6165
cpu: 2
6266
memory: "200M"
67+
securityContext:
68+
allowPrivilegeEscalation: false
69+
capabilities:
70+
drop: [ALL]
6371
nodeSelector:
6472
node-role.kubernetes.io/worker-cnf: ""
6573
runtimeClassName: performance-dynamic-irq-profile
66-
...
74+
# ...
6775
----
6876

6977
. Enter the pod `runtimeClassName` in the form performance-<profile_name>, where <profile_name> is the `name` from the `PerformanceProfile` YAML, in this example, `performance-dynamic-irq-profile`.
@@ -176,4 +184,4 @@ find /proc/irq/ -name smp_affinity_list -exec sh -c 'i="$1"; mask=$(cat $i); fil
176184
/proc/irq/28/smp_affinity_list: 1
177185
/proc/irq/29/smp_affinity_list: 0
178186
/proc/irq/30/smp_affinity_list: 0-5
179-
----
187+
----

modules/cnf-provisioning-real-time-and-low-latency-workloads.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ metadata:
173173
name: qos-demo
174174
namespace: qos-example
175175
spec:
176+
securityContext:
177+
runAsNonRoot: true
178+
seccompProfile:
179+
type: RuntimeDefault
176180
containers:
177181
- name: qos-demo-ctr
178182
image: <image-pull-spec>
@@ -183,6 +187,10 @@ spec:
183187
requests:
184188
memory: "200Mi"
185189
cpu: "1"
190+
securityContext:
191+
allowPrivilegeEscalation: false
192+
capabilities:
193+
drop: [ALL]
186194
----
187195

188196
. Create the pod:

modules/setting-up-cpu-manager.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ kind: Pod
116116
metadata:
117117
generateName: cpumanager-
118118
spec:
119+
securityContext:
120+
runAsNonRoot: true
121+
seccompProfile:
122+
type: RuntimeDefault
119123
containers:
120124
- name: cpumanager
121125
image: gcr.io/google_containers/pause:3.2
@@ -126,6 +130,10 @@ spec:
126130
limits:
127131
cpu: 1
128132
memory: "1G"
133+
securityContext:
134+
allowPrivilegeEscalation: false
135+
capabilities:
136+
drop: [ALL]
129137
nodeSelector:
130138
cpumanager: "true"
131139
----

0 commit comments

Comments
 (0)