Skip to content

Commit a15cf91

Browse files
oliverbaehlersandert-k8sCopilot
authored
feat: add 0.13.x notes (#98)
* feat: add migration clarification (#88) * feat: add release additions Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: update api references Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: update openshfit install docs (#87) * feat: update openshfit install docs Signed-off-by: sandert-k8s <sandert98@gmail.com> * fix: add red hat exclude in lychee Signed-off-by: sandert-k8s <sandert98@gmail.com> --------- Signed-off-by: sandert-k8s <sandert98@gmail.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: add migration clarification Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: broken links Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: broken links Signed-off-by: Oliver Baehler <oliver@sudo-i.net> --------- Signed-off-by: Oliver Baehler <oliver@sudo-i.net> Signed-off-by: sandert-k8s <sandert98@gmail.com> Co-authored-by: Sander Tervoert <32864332+sandert-k8s@users.noreply.github.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: add proxy args Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: clarify matching strategies Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * chore: housekeeping (#91) * chore: add status objects in apireference Signed-off-by: sandert-k8s <sandert98@gmail.com> * chore: typo proxysetting Signed-off-by: sandert-k8s <sandert98@gmail.com> * chore: fix spelling Signed-off-by: sandert-k8s <sandert98@gmail.com> --------- Signed-off-by: sandert-k8s <sandert98@gmail.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: add prek as precommit (#92) * feat: add prek as pre-commit Signed-off-by: sandert-k8s <sandert98@gmail.com> * chore: fix broken links Signed-off-by: sandert-k8s <sandert98@gmail.com> * chore: fix linting with prek Signed-off-by: sandert-k8s <sandert98@gmail.com> --------- Signed-off-by: sandert-k8s <sandert98@gmail.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: improve rules api Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * chore: fixes in quota docs (#93) * fix: apiVersion in docs Signed-off-by: sandert-k8s <sandert98@gmail.com> * chore: fix lb path Signed-off-by: sandert-k8s <sandert98@gmail.com> --------- Signed-off-by: sandert-k8s <sandert98@gmail.com> Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * fix: improve rules api Signed-off-by: Oliver Baehler <oliver@sudo-i.net> * feat: restructure rules documentation * feat: add rule enforcements * feat: apidocs --------- Signed-off-by: Oliver Baehler <oliver@sudo-i.net> Signed-off-by: sandert-k8s <sandert98@gmail.com> Co-authored-by: Sander Tervoert <32864332+sandert-k8s@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent bae3ece commit a15cf91

6 files changed

Lines changed: 1219 additions & 14 deletions

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
title: Known Metadata
3+
weight: 10
4+
description: "Labels and Annotations in Capsule Items"
5+
---
6+
7+
8+
9+
10+
## Labels
11+
12+
Labels commonly used in Capsule items are listed below. These labels are applied to the corresponding resources by the Capsule controller and can be used for filtering and selection purposes.
13+
14+
### `capsule.clastix.io/tenant`
15+
16+
| Description | Target Objects | Audience |
17+
|---|---|---|
18+
| Established the connection between Object and Tenant. It's value indicates the owning `Tenant` | * `Namespaces` having a relationship to `Tenants` | `Controller` |
19+
20+
21+
### `projectcapsule.dev/tenant`
22+
23+
| Description | Target Objects |Audience |
24+
|---|---|---|
25+
| Established the connection between Object and Tenant. It's value indicates the owning `Tenant`. Long term replacement for `capsule.clastix.io/tenant` and `capsule.clastix.io/managed-by` labels. | * All namespaced items within a `Tenant` `Namespace` become the corresponding Tenant Label via Mutating Admission. | `Controller` |
26+
27+
### `capsule.clastix.io/managed-by`
28+
29+
| Description | Target Objects | Audience |
30+
|---|---|---|
31+
| Established the connection between Object and Tenant. It's value indicates the owning `Tenant`. Long term replacement for `capsule.clastix.io/tenant` | * All namespaced items within a `Tenant` `Namespace` become the corresponding Tenant Label via Mutating Admission. This label is still added to keep compatibility wiht the [Capsule Proxy](/docs/proxy/). | `User` |
32+
33+
### `projectcapsule.dev/managed-by`
34+
35+
| Description | Target Objects |
36+
|---|---|---|
37+
| Indicator which controller of capsule or `Custom Resource` is responsible for managing the corresponding Object. Mainly used in [Replications](/docs/replications/) to establish that objects are at least managed by one Replications. | * `Any Object being influenced by Replications` | `User` |
38+
39+
40+
### `projectcapsule.dev/created-by`
41+
42+
| Description | Target Objects | Audience |
43+
|---|---|
44+
| Indicator which controller of capsule or `Custom Resource` is responsible for managing the corresponding Object. Mainly used in [Replications](/docs/replications/) to establish that objects were originally created by a Replication. | * `Any Object being influenced by Replications` | `Controller` |
45+
46+
### `projectcapsule.dev/name`
47+
48+
| Description | Target Objects | Audience |
49+
|---|---|---|
50+
| Label for tracking internal name or allowing for faster selects. Mainly used to identify relevant rulestatus | * `Tenant Namespaces` | `Controller` |
51+
52+
### `projectcapsule.dev/cordoned`
53+
54+
| Description | Target Objects | Audience |
55+
|---|---|---|
56+
| Indicator that a namespace is cordoned (when value equals `true`) | * `Tenant Namespaces` | `User` |
57+
58+
### `projectcapsule.dev/pool`
59+
60+
| Description | Target Objects | Audience |
61+
|---|---|---|
62+
| Allocation of Resourcepool via ResourcePoolClaims | * `ResourcePoolClaims` | `User` |

content/en/docs/operating/setup/installation.md

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,77 @@ Perform the following steps to install the Capsule operator:
5858

5959
Here are some key considerations to keep in mind when installing Capsule. Also check out the **[Best Practices](/docs/operating/best-practices)** for more information.
6060

61-
### Strict RBAC
61+
### Scalability
62+
63+
For large clusters you might need to consider adjusting values for the Capsule controller.
64+
65+
#### QPS/Burst
66+
67+
In order to handle a large number of tenants and resources, you may need to increase the QPS and Burst values for the Capsule controller. This avoids the controller being throttled by the Kubernetes API server (Client Rate limited). You can set the following values in the Helm chart:
68+
69+
```yaml
70+
manager:
71+
options:
72+
clientConnectionQPS: 400
73+
clientConnectionBurst: 200
74+
```
75+
76+
#### Workers
77+
78+
Define the number of workers for the Capsule controller, which translates into the number of concurrent reconciles:
79+
80+
```yaml
81+
manager:
82+
options:
83+
workers: 4
84+
```
6285
86+
#### Cache Synchronisation
87+
88+
The more resources you have in your cluster, the longer it will take for the Capsule controller to sync its cache. You can adjust the cache sync period to a higher value to reduce the load on the API server:
89+
90+
```yaml
91+
manager:
92+
options:
93+
cacheSyncTimeout: "10m"
94+
```
95+
96+
#### API Priority and Fairness (APF)
97+
98+
With APF enabled, the Capsule controller will be subject to the APF configuration of the cluster. If you are running a large cluster with many tenants, you may need to adjust the APF configuration to ensure that the Capsule controller has sufficient resources to operate effectively. For more information on APF, see [Kubernetes API Priority and Fairness](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/#api-priority-and-fairness).
99+
100+
We provide a built-in APF configuration for the Capsule controller, which provides API priority for all resources managed by Capsule. This configuration is applied automatically when you install Capsule. To enable the built-in APF configuration, set the following value in the Helm chart:
101+
102+
```yaml
103+
# Manager Options
104+
manager:
105+
apiPriorityAndFairness:
106+
# -- Change to `true` if you want to insulate the API calls made by Capsule admission controller activities.
107+
# This will help ensure Capsule stability in busy clusters.
108+
# Ref: https://kubernetes.io/docs/concepts/cluster-administration/flow-control/
109+
enabled: true
110+
111+
# -- Only the first matching FlowSchema for a given request matters. If multiple FlowSchemas match a single inbound request, it will be assigned based on the one with the highest matchingPrecedence.
112+
# Ref: https://kubernetes.io/docs/concepts/cluster-administration/flow-control/#flowschema
113+
matchingPrecedence: 900
114+
115+
# -- Priority level configuration.
116+
# The block is directly forwarded into the priorityLevelConfiguration, so you can use whatever specification you want.
117+
# ref: https://kubernetes.io/docs/concepts/cluster-administration/flow-control/#prioritylevelconfiguration
118+
priorityLevelConfigurationSpec:
119+
type: Limited
120+
limited:
121+
nominalConcurrencyShares: 100
122+
limitResponse:
123+
type: Queue
124+
queuing:
125+
queues: 64
126+
handSize: 6
127+
queueLengthLimit: 100
128+
```
129+
130+
131+
### Strict RBAC
63132
64133
{{% alert title="Attention" color="warning" %}}
65134
Ensure to first upgrade to version `0.13.0` of capsule before enabling strict mode. As it requires fields which are newly added with version `0.13.0`.

content/en/docs/proxy/setup/installation.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,52 @@ spec:
179179
180180
Considerations when deploying capsule-proxy
181181
182+
### Scalability
183+
184+
For large clusters you might need to consider adjusting values for the Capsule controller.
185+
186+
#### QPS/Burst
187+
188+
In order to handle a large number of tenants and resources, you may need to increase the QPS and Burst values for the Capsule-Proxy. This avoids the Proxy being throttled by the Kubernetes API server (Client Rate limited). You can set the following values in the Helm chart:
189+
190+
```yaml
191+
options:
192+
# -- QPS to use for interacting with Kubernetes API Server.
193+
clientConnectionQPS: 200
194+
# -- Burst to use for interacting with kubernetes API Server.
195+
clientConnectionBurst: 400
196+
```
197+
198+
#### API Priority and Fairness (APF)
199+
200+
With APF enabled, the Capsule controller will be subject to the APF configuration of the cluster. If you are running a large cluster with many users/tenants, you may need to adjust the APF configuration to ensure that the Capsule controller has sufficient resources to operate effectively. For more information on APF, see [Kubernetes API Priority and Fairness](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/#api-priority-and-fairness).
201+
202+
We provide a built-in APF configuration for the Capsule-Proxy, which provides API priority for all LIST operations and especially for `subjectaccessreviews` and `tokenreviews`. This configuration is applied automatically when you install Capsule-Proxy. To enable the built-in APF configuration, set the following value in the Helm chart:
203+
204+
```yaml
205+
apiPriorityAndFairness:
206+
# -- Change to `true` if you want to insulate the API calls made by Capsule admission controller activities.
207+
# This will help ensure Capsule stability in busy clusters.
208+
# Ref: https://kubernetes.io/docs/concepts/cluster-administration/flow-control/
209+
enabled: true
210+
# -- Only the first matching FlowSchema for a given request matters. If multiple FlowSchemas match a single inbound request, it will be assigned based on the one with the highest matchingPrecedence.
211+
# Ref: https://kubernetes.io/docs/concepts/cluster-administration/flow-control/#flowschema
212+
matchingPrecedence: 900
213+
# -- Priority level configuration.
214+
# The block is directly forwarded into the priorityLevelConfiguration, so you can use whatever specification you want.
215+
# ref: https://kubernetes.io/docs/concepts/cluster-administration/flow-control/#prioritylevelconfiguration
216+
priorityLevelConfigurationSpec:
217+
type: Limited
218+
limited:
219+
nominalConcurrencyShares: 100
220+
limitResponse:
221+
type: Queue
222+
queuing:
223+
queues: 64
224+
handSize: 6
225+
queueLengthLimit: 100
226+
```
227+
182228
### Exposure
183229
184230
Depending on your environment, you can expose the capsule-proxy by:

0 commit comments

Comments
 (0)