mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
74 lines
2.6 KiB
Plaintext
74 lines
2.6 KiB
Plaintext
:_mod-docs-content-type: SNIPPET
|
|
[source,yaml]
|
|
----
|
|
apiVersion: policy.open-cluster-management.io/v1
|
|
kind: PolicyGenerator
|
|
metadata:
|
|
name: example-sno-workers
|
|
placementBindingDefaults:
|
|
name: example-sno-workers-placement-binding
|
|
policyDefaults:
|
|
namespace: example-sno
|
|
placement:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: sites
|
|
operator: In
|
|
values:
|
|
- example-sno <1>
|
|
remediationAction: inform
|
|
severity: low
|
|
namespaceSelector:
|
|
exclude:
|
|
- kube-*
|
|
include:
|
|
- '*'
|
|
evaluationInterval:
|
|
compliant: 10m
|
|
noncompliant: 10s
|
|
policies:
|
|
- name: example-sno-workers-config-policy
|
|
policyAnnotations:
|
|
ran.openshift.io/ztp-deploy-wave: "10"
|
|
manifests:
|
|
- path: source-crs/PerformanceProfile-MCP-worker.yaml
|
|
patches:
|
|
- metadata:
|
|
name: openshift-worker-node-performance-profile
|
|
spec:
|
|
cpu: <2>
|
|
isolated: 4-47
|
|
reserved: 0-3
|
|
hugepages:
|
|
defaultHugepagesSize: 1G
|
|
pages:
|
|
- count: 32
|
|
size: 1G
|
|
realTimeKernel:
|
|
enabled: true
|
|
- path: source-crs/TunedPerformancePatch-MCP-worker.yaml
|
|
patches:
|
|
- metadata:
|
|
name: performance-patch-worker
|
|
spec:
|
|
profile:
|
|
- data: |
|
|
[main]
|
|
summary=Configuration changes profile inherited from performance created tuned
|
|
include=openshift-node-performance-openshift-worker-node-performance-profile
|
|
[bootloader]
|
|
cmdline_crash=nohz_full=4-47 <3>
|
|
[sysctl]
|
|
kernel.timer_migration=1
|
|
[scheduler]
|
|
group.ice-ptp=0:f:10:*:ice-ptp.*
|
|
[service]
|
|
service.stalld=start,enable
|
|
service.chronyd=stop,disable
|
|
name: performance-patch-worker
|
|
recommend:
|
|
- profile: performance-patch-worker
|
|
----
|
|
<1> The policies are applied to all clusters with this label.
|
|
<2> The `cpu.isolated` and `cpu.reserved` fields must be configured for each specific hardware platform.
|
|
<3> The `cmdline_crash` CPU set must match the `cpu.isolated` set in the `PerformanceProfile` section. |