You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/virt-measuring-latency-vm-secondary-network.adoc
+93-59Lines changed: 93 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,38 +54,16 @@ rules:
54
54
- create
55
55
- update
56
56
- patch
57
-
- apiGroups: [ "" ]
58
-
resources: [ "namespaces" ]
59
-
verbs:
60
-
- get
61
-
- list
62
-
- create
63
57
- delete
64
-
- watch
65
-
- apiGroups: [ "" ]
66
-
resources: [ "serviceaccounts" ]
67
-
verbs:
68
-
- get
69
-
- list
70
-
- create
71
58
- apiGroups: [ "rbac.authorization.k8s.io" ]
72
59
resources:
73
60
- roles
74
61
- rolebindings
75
-
- clusterrolebindings
76
62
verbs:
77
63
- get
78
64
- list
79
65
- create
80
66
- delete
81
-
- apiGroups: [ "rbac.authorization.k8s.io" ]
82
-
resources:
83
-
- clusterroles
84
-
verbs:
85
-
- get
86
-
- list
87
-
- create
88
-
- bind
89
67
- apiGroups: [ "batch" ]
90
68
resources: [ "jobs" ]
91
69
verbs:
@@ -118,15 +96,25 @@ subjects:
118
96
$ oc apply -f <framework_manifest>.yaml
119
97
----
120
98
121
-
. Create a configuration file that contains the `ClusterRole` and `Role` objects with permissions that the checkup requires for cluster access:
99
+
. Create a manifest file that contains the `ServiceAccount`, `Role`, and `RoleBinding` objects with permissions that the checkup requires for cluster access:
122
100
+
123
-
.Example cluster role manifest file
101
+
.Example role manifest file
102
+
[%collapsible]
103
+
====
124
104
[source,yaml]
125
105
----
106
+
---
107
+
apiVersion: v1
108
+
kind: ServiceAccount
109
+
metadata:
110
+
name: vm-latency-checkup-sa
111
+
namespace: <target_namespace> <1>
112
+
---
126
113
apiVersion: rbac.authorization.k8s.io/v1
127
-
kind: ClusterRole
114
+
kind: Role
128
115
metadata:
129
116
name: kubevirt-vm-latency-checker
117
+
namespace: <target_namespace>
130
118
rules:
131
119
- apiGroups: ["kubevirt.io"]
132
120
resources: ["virtualmachineinstances"]
@@ -137,7 +125,22 @@ rules:
137
125
- apiGroups: ["k8s.cni.cncf.io"]
138
126
resources: ["network-attachment-definitions"]
139
127
verbs: ["get"]
128
+
---
129
+
apiVersion: rbac.authorization.k8s.io/v1
130
+
kind: RoleBinding
131
+
metadata:
132
+
name: kubevirt-vm-latency-checker
133
+
namespace: <target_namespace>
134
+
subjects:
135
+
- kind: ServiceAccount
136
+
name: vm-latency-checkup-sa
137
+
roleRef:
138
+
kind: Role
139
+
name: kubevirt-vm-latency-checker
140
+
apiGroup: rbac.authorization.k8s.io
140
141
----
142
+
====
143
+
<1> Specify the namespace where the checkup is to be executed. This must be an existing namespace where the `NetworkAttachmentDefinition` object resides.
<1> The namespace where the `NetworkAttachmentDefinition` object resides.
170
-
<2> The name of the `NetworkAttachmentDefinition` object.
171
-
<3> Optional: The maximum desired latency, in milliseconds, between the virtual machines. If the measured latency exceeds this value, the check fails.
172
-
<4> Optional: The duration of the latency check, in seconds.
173
+
<1> The namespace where the checkup is to be executed. This must be an existing namespace where the `NetworkAttachmentDefinition` object resides.
174
+
<2> The namespace where the `NetworkAttachmentDefinition` object resides.
175
+
<3> The name of the `NetworkAttachmentDefinition` object.
176
+
<4> Optional: The maximum desired latency, in milliseconds, between the virtual machines. If the measured latency exceeds this value, the checkup fails.
177
+
<5> Optional: The duration of the latency check, in seconds.
178
+
<6> Optional: When specified, latency is measured from this node to the target node. If the source node is specified, the `spec.param.target_node` field cannot be empty.
179
+
<7> Optional: When specified, latency is measured from the source node to this node.
173
180
174
-
. Create the config map in the framework’s namespace:
181
+
. Apply the config map manifest in the framework’s namespace:
. Review the results of the latency checkup by retrieving the status of the `ConfigMap` object. If the measured latency is greater than the value of the `spec.param.max_desired_latency_milliseconds` attribute, the checkup fails and returns an error.
228
+
. Review the results of the latency checkup by retrieving the status of the `ConfigMap` object. If the maximum measured latency is greater than the value of the `spec.param.max_desired_latency_milliseconds` attribute, the checkup fails and returns an error.
222
229
+
223
230
[source,terminal]
224
231
----
225
-
$ oc get configmap kubevirt-vm-latency-checkup -n kiagnose -o yaml
232
+
$ oc get configmap kubevirt-vm-latency-checkup-config -n <target_namespace> -o yaml
. Delete the framework and checkup resources that you previously created. This includes the job, config map, cluster role, and framework manifest files.
266
+
. Optional: To view the detailed job log in case of checkup failure, use the following command:
247
267
+
248
-
[NOTE]
249
-
====
250
-
Do not delete the framework and cluster role manifest files if you plan to run another checkup.
0 commit comments