Skip to content

Commit 7d02aaa

Browse files
feat: align with v0.9.0 release (#20)
* feat: add begasoft as adopter Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: archive legacy docs Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * feat: align with v0.9.0 release Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * feat: align with v0.9.0 release Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> * chore: add addons Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com> --------- Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
1 parent 0b6442c commit 7d02aaa

4 files changed

Lines changed: 82 additions & 109 deletions

File tree

content/en/docs/tenants/enforcement.md

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,51 @@ description: >
1010

1111
### Namespaces
1212

13+
#### AdditionalMetadataList
14+
15+
The cluster admin can "taint" the namespaces created by tenant owners with additional metadata as labels and annotations. There is no specific semantic assigned to these labels and annotations: they will be assigned to the namespaces in the tenant as they are created. However you have the option to be more specific by selecting to which namespaces you want to assign what kind of metadata:
16+
17+
```yaml
18+
apiVersion: capsule.clastix.io/v1beta2
19+
kind: Tenant
20+
metadata:
21+
name: oil
22+
spec:
23+
owners:
24+
- name: alice
25+
kind: User
26+
namespaceOptions:
27+
additionalMetadataList:
28+
# An item without any further selectors is applied to all namspaces
29+
- annotations:
30+
storagelocationtype: s3
31+
labels:
32+
projectcapsule.dev/backup: "true"
33+
34+
# Select a subset of namespaces to apply metadata on
35+
- namespaceSelector:
36+
matchExpressions:
37+
- key: projectcapsule.dev/low_security_profile
38+
operator: NotIn
39+
values: ["true"]
40+
labels:
41+
pod-security.kubernetes.io/enforce: baseline
42+
43+
- namespaceSelector:
44+
matchExpressions:
45+
- key: projectcapsule.dev/low_security_profile
46+
operator: In
47+
values: ["true"]
48+
labels:
49+
pod-security.kubernetes.io/enforce: privileged
50+
```
51+
52+
53+
#### AdditionalMetadata
54+
55+
> [!WARNING]
56+
> This feature is deprecated and will be removed in a future release of Capsule. Migrate to using [AdditionalMetadataList](#additionalmetadatalist)
57+
1358
The cluster admin can "taint" the namespaces created by tenant owners with additional metadata as labels and annotations. There is no specific semantic assigned to these labels and annotations: they will be assigned to the namespaces in the tenant as they are created. This can help the cluster admin to implement specific use cases as, for example, leave only a given tenant to be backed up by a backup service.
1459
1560
Assigns additional labels and annotations to all namespaces created in the `solar` tenant:
@@ -90,9 +135,9 @@ spec:
90135

91136
### Nodes
92137

138+
> [!WARNING]
93139
> Due to [CVE-2021-25735](https://github.com/kubernetes/kubernetes/issues/100096) this feature is only supported for Kubernetes version older than: v1.18.18, v1.19.10, v1.20.6, v1.21.0
94140

95-
96141
When using capsule together with [capsule-proxy](/docs/integrations/capsule-proxy), Bill can allow Tenant Owners to modify Nodes.
97142

98143
By default, it will allow tenant owners to add and modify any label or annotation on their nodes.
@@ -211,7 +256,8 @@ metadata:
211256

212257
### LimitRanges
213258

214-
> This feature will be deprecated in a future release of Capsule. Instead use [TenantReplications](#limitrange-distribution-with-tenantreplications)
259+
> [!WARNING]
260+
> This feature is deprecated and will be removed in a future release of Capsule. Migrate to using [TenantReplications](#limitrange-distribution-with-tenantreplications)
215261

216262
Bill, the cluster admin, can also set Limit Ranges for each namespace in Alice's tenant by defining limits for pods and containers in the tenant spec:
217263

@@ -925,7 +971,10 @@ If an Ingress has no value for `spec.ingressClassName` or `metadata.annotations.
925971

926972
### NetworkPolicies
927973

928-
> This feature will be deprecated in a future release of Capsule. Instead use [TenantReplications](#networkpolicy-distribution-with-tenantreplications). This is also true if you would like other NetworkPolicy implementation like [Cilium](https://cilium.io/).
974+
975+
> [!WARNING]
976+
> This feature is deprecated and will be removed in a future release of Capsule. Migrate to using [TenantReplications](#networkpolicy-distribution-with-tenantreplications). This is also true if you would like other NetworkPolicy implementation like [Cilium](https://cilium.io/).
977+
929978

930979
Kubernetes network policies control network traffic between namespaces and between pods in the same namespace. Bill, the cluster admin, can enforce network traffic isolation between different tenants while leaving to Alice, the tenant owner, the freedom to set isolation between namespaces in the same tenant or even between pods in the same namespace.
931980

content/en/docs/tenants/quotas.md

Lines changed: 1 addition & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -7,103 +7,10 @@ description: >
77

88
With help of Capsule, Bill, the cluster admin, can set and enforce resources quota and limits for Alice's tenant.
99

10-
Set resources quota for each namespace in the Alice's tenant by defining them in the tenant spec:
11-
12-
13-
## GlobalResourceQuotas
14-
15-
We have reworked the entire ResourceQuota approach and have decided to create a dedicated resource called `GlobalResourceQuota`. The purpose of this resource is tracking the resource consumption across a set of selected namespaces (not only exclusive to one tenant). This allows for much more flexibility when it comes to sharing resources. With that same rework, we made sure overprovisioning is no longer possible ([issue/49](https://github.com/projectcapsule/capsule/issues/49))
16-
17-
Let's look at a simple example:
18-
19-
```yaml
20-
apiVersion: capsule.clastix.io/v1beta2
21-
kind: GlobalResourceQuota
22-
metadata:
23-
name: global-quota
24-
spec:
25-
selectors:
26-
- matchLabels:
27-
capsule.clastix.io/tenant: solar
28-
quotas:
29-
scheduling:
30-
hard:
31-
limits.cpu: "2"
32-
limits.memory: 2Gi
33-
requests.cpu: "2"
34-
requests.memory: 2Gi
35-
pods:
36-
hard:
37-
pods: "3"
38-
best-effort:
39-
hard:
40-
pods: "20"
41-
scopeSelector:
42-
matchExpressions:
43-
- operator: In
44-
scopeName: PriorityClass
45-
values: ["medium"]
46-
47-
```
48-
49-
We have the `selectors` section and `quotas` sections. With the `selectors` you define
50-
51-
Each key below `quotas` represents an implementation of a [ResourceQuota](https://kubernetes.io/docs/concepts/policy/resource-quotas/) object. Meaning we can distribute multiple [ResourceQuota](https://kubernetes.io/docs/concepts/policy/resource-quotas/) objects from one `GlobalResourceQuota`. The `quotas` are arranged in map, because their name must be unique and is used for tracking (therefor no longer an array).
52-
53-
All these `quotas` are distributed among the selected namespaces. With `selectors` the target namespaces are selected. Since you can define a list of `selectors`, each `selector` is treated seperatly but all results are combined to a total list of selected namespaces (they are nod `&&`, but `||`).
54-
55-
56-
57-
58-
59-
60-
> Namespaces/Tenants which were previously overprovisioned, will still be overprovisioned. To change that you either increase the capacity for the quota or you need to remove resources, until you are below the quota limit. Then it's capped at this limit and no overprovisioning should be possible.
61-
62-
63-
64-
65-
66-
### LimitRanges (Example)
67-
68-
When defining ResourceQuotas you might want to consider distributing [LimitRanges](https://kubernetes.io/docs/concepts/policy/limit-range/) via [Tenant Replications](/docs/tenants/replications):
69-
70-
```yaml
71-
apiVersion: capsule.clastix.io/v1beta2
72-
kind: TenantResource
73-
metadata:
74-
name: solar-limitranges
75-
namespace: solar-system
76-
spec:
77-
resyncPeriod: 60s
78-
resources:
79-
- namespaceSelector:
80-
matchLabels:
81-
capsule.clastix.io/tenant: solar
82-
rawItems:
83-
- apiVersion: v1
84-
kind: LimitRange
85-
metadata:
86-
name: cpu-resource-constraint
87-
spec:
88-
limits:
89-
- default: # this section defines default limits
90-
cpu: 500m
91-
defaultRequest: # this section defines default requests
92-
cpu: 500m
93-
max: # max and min define the limit range
94-
cpu: "1"
95-
min:
96-
cpu: 100m
97-
type: Container
98-
```
99-
100-
This way you can ensure resources are correctly distriputed amongst the selected namespaces.
101-
10+
There are different elements, where quotas can be defined.
10211

10312
## Resource Quota
10413

105-
> This feature will be deprecated in a future release of Capsule. Instead use [GlobalResourceQuotas](#globalresourcequotas)
106-
10714
With help of Capsule, Bill, the cluster admin, can set and enforce resources quota and limits for Alice's tenant.
10815

10916
Set resources quota for each namespace in the Alice's tenant by defining them in the tenant spec:

data/addons.yaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
addons:
2-
- name: "Capsule Proxy"
3-
logo: "https://raw.githubusercontent.com/cncf/artwork/dea12221052d349eaa73a9cc01cb22e137758f86/projects/capsule/horizontal/color/capsule-horizontal-color.svg"
2+
- name: "Proxy"
3+
logo: "https://raw.githubusercontent.com/cncf/artwork/refs/heads/main/projects/capsule/icon/color/capsule-icon-color.svg"
44
tags:
55
- "core"
66
- "ux"
77
links:
88
- link: "/docs/proxy/"
99
icon: "fa fa-book"
1010
description: "Enhance the user experience by allowing users to query the Kubernetes API and only getting the results, they are supposed to get."
11-
#background: "#0000000"
11+
size: 50%
12+
background: "#00264d"
1213
#layoutColor: "#0000000"
1314
#descriptionColor: "#000000"
1415

15-
- name: "ArgoCD Addon"
16+
- name: "ArgoCD"
1617
logo: "https://github.com/peak-scale/capsule-argo-addon/blob/main/docs/images/capsule-argo.png?raw=true"
1718
tags:
1819
- "vendor"
@@ -25,16 +26,33 @@ addons:
2526
layoutColor: "#FFFFFF"
2627
descriptionColor: "#FFEBEE"
2728

29+
- name: "Sops Operator"
30+
background: "#000000"
31+
logo: "https://raw.githubusercontent.com/cncf/artwork/refs/heads/main/projects/capsule/icon/color/capsule-icon-color.svg"
32+
size: 50%
33+
tags:
34+
- "core"
35+
- "secrets"
36+
- "gitops"
37+
links:
38+
- link: "https://github.com/peak-scale/sops-operator"
39+
icon: "fab fa-github"
40+
description: "Handle SOPS Secrets in a multi-tenant and kubernetes-native way."
2841

29-
- name: "Flux Addon"
30-
logo: "https://raw.githubusercontent.com/cncf/artwork/dea12221052d349eaa73a9cc01cb22e137758f86/projects/capsule/horizontal/color/capsule-horizontal-color.svg"
42+
- name: "FluxCD"
43+
background: "#00264d"
44+
logo: "https://raw.githubusercontent.com/cncf/artwork/refs/heads/main/projects/capsule/icon/color/capsule-icon-color.svg"
45+
size: 50%
3146
tags:
3247
- "core"
3348
- "gitops"
3449
links:
3550
- link: "https://github.com/projectcapsule/capsule-addon-fluxcd"
3651
icon: "fab fa-github"
37-
description: "In particular enables Tenants to manage their resources, including creating Namespaces, respecting the [Flux multi-tenancy lockdown](https://fluxcd.io/flux/installation/configuration/multitenancy/)."
52+
- link: "https://fluxcd.io/flux/installation/configuration/multitenancy/"
53+
icon: "fa fa-book"
54+
55+
description: "In particular enables Tenants to manage their resources, including creating Namespaces."
3856
#background: "#FF5722"
3957
#layoutColor: "#FFFFFF"
4058
#descriptionColor: "#FFEBEE"
@@ -48,5 +66,3 @@ addons:
4866
- link: "https://github.com/projectcapsule/cortex-proxy"
4967
icon: "fab fa-github"
5068
description: "Route metrics to cortex organizations based on the relational of namespace metrics to capsule tenants."
51-
52-

layouts/shortcodes/addons.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ <h5><label class="d-block" for="search">Search</label></h5>
2828
<div style="
2929
background: url('{{ .logo }}') no-repeat center center;
3030
background-color: {{ $background }};
31-
background-size: cover;
31+
background-size: {{ default "cover" .size }};
32+
background-repeat: no-repeat;
3233
opacity: 1;
3334
position: absolute;
3435
top: 0;
3536
left: 0;
36-
width: 100%;
37-
height: 100%;
37+
width: {{ default "100%" .width }};
38+
height: {{ default "100%" .height }};
3839
z-index: 0;">
3940
</div>
4041

0 commit comments

Comments
 (0)