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: input/kube-cli/site-configuration.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,10 @@ For example
72
72
```
73
73
You can check the status of the site at any time using `skupper site status`.
74
74
75
+
By default, the router CPU allocation is BestEffort as described in [Pod Quality of Service Classes](https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/) and this might affect performance under network load.
76
+
To configure site resources, see [Setting site resources](../kube-yaml/site-configuration.html#kube-site-resources-yaml).
Copy file name to clipboardExpand all lines: input/kube-yaml/site-configuration.md
+117-2Lines changed: 117 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,121 @@ Procedure
60
60
```
61
61
You can now link this site to another site to create an application network.
62
62
63
-
There are many options to consider when creating sites using YAML, see [YAML Reference][yaml-ref], including *frequently used* options.
63
+
By default, the router CPU allocation is BestEffort as described in [Pod Quality of Service Classes](https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/) and this might affect performance under network load.
64
+
Consider setting resources as described in [Setting site resources](#kube-site-resources-yaml).
65
+
66
+
There are many options to consider when creating sites using YAML, see the [YAML Reference][yaml-ref], including *frequently used* options.
You can configure the Skupper Router and Kube Adaptor components with minimum and maximum CPU and memory resources by defining sizing models using ConfigMaps.
75
+
76
+
**Note:** Increasing the number of routers does not improve network performance. An incoming router-to-router link is associated with just one active router. Additional routers do not receive traffic while that router is responding.
77
+
78
+
**Prerequisites**
79
+
80
+
* The Skupper V2 controller is running in your cluster.
81
+
* You have determined the router CPU allocation you require.
82
+
83
+
Consider the following CPU allocation options:
84
+
85
+
| Router CPU | Description |
86
+
|------------|-------------|
87
+
| 1 | Helps avoid issues with BestEffort on low resource clusters |
88
+
| 2 | Suitable for production environments |
89
+
| 5 | Maximum performance |
90
+
91
+
Procedure
92
+
93
+
1. Create a sizing ConfigMap in the same namespace where your Skupper V2 controller is running.
94
+
95
+
The following example defines a sizing configuration named `medium` with 2 CPU cores suitable for production:
96
+
97
+
```yaml
98
+
apiVersion: v1
99
+
kind: ConfigMap
100
+
metadata:
101
+
name: sizing-medium
102
+
labels:
103
+
skupper.io/site-sizing: "medium"
104
+
annotations:
105
+
skupper.io/default-site-sizing: "true"
106
+
data:
107
+
router-cpu-limit: "2"
108
+
router-memory-limit: 1024Mi
109
+
```
110
+
111
+
The Skupper controller selects ConfigMaps based on the presence of a `skupper.io/site-sizing` label.
112
+
The label's value serves as an internal identifier for that particular sizing configuration.
113
+
114
+
To designate a sizing model as the default for all sites managed by your Skupper V2 controller instance, annotate the ConfigMap with `skupper.io/default-site-sizing: "true"`.
115
+
116
+
A sizing ConfigMap can define the following fields:
117
+
118
+
- `router-cpu-request`
119
+
- `router-cpu-limit`
120
+
- `router-memory-request`
121
+
- `router-memory-limit`
122
+
- `adaptor-cpu-request`
123
+
- `adaptor-cpu-limit`
124
+
- `adaptor-memory-request`
125
+
- `adaptor-memory-limit`
126
+
127
+
**Note:** If only the `limit` field is defined, Kubernetes will also set the `request` with the same value. If this is not what you want, make sure to set the respective `request` field with a smaller value.
128
+
129
+
2. Determine the controller namespace.
130
+
Depending on your installation method, the controller namespace may be `skupper`, `openshift-operators`, or have a different name.
131
+
You can check that you have chosen the correct namespace by running:
132
+
133
+
```
134
+
kubectl get pods
135
+
```
136
+
137
+
Confirm that the skupper controller pod is running in the namespace.
138
+
139
+
3. Apply the ConfigMap in the controller namespace:
140
+
141
+
```bash
142
+
kubectl apply -f sizing-medium.yaml
143
+
```
144
+
145
+
4. Assign the sizing configuration to a site by setting the `spec.settings.size` field in the site resource:
146
+
147
+
```yaml
148
+
apiVersion: skupper.io/v2alpha1
149
+
kind: Site
150
+
metadata:
151
+
name: my-site
152
+
spec:
153
+
settings:
154
+
size: medium
155
+
```
156
+
157
+
5. Verify the resource limits have been applied by inspecting the `skupper-router` deployment:
158
+
159
+
```bash
160
+
kubectl get deployment skupper-router -o json | jq .spec.template.spec.containers[].resources
161
+
```
162
+
163
+
The output should look like:
164
+
165
+
```json
166
+
{
167
+
"limits": {
168
+
"cpu": "1",
169
+
"memory": "1Gi"
170
+
},
171
+
"requests": {
172
+
"cpu": "500m",
173
+
"memory": "512Mi"
174
+
}
175
+
}
176
+
```
177
+
178
+
You can define multiple sizing configurations using separate ConfigMaps.
179
+
Only one ConfigMap should be annotated as the default (`skupper.io/default-site-sizing: "true"`).
0 commit comments