Skip to content

Commit a6b9f94

Browse files
Diaphteirosreshnm
andauthored
feat: advanced clusteraccess library (#173)
* add improved clusteraccess library * fix bugs and enable unit test support * add label conflict detection * add unit tests for advanced cluster access reconciler * enable stuff to depend on request * make clusteraccess library use the advanced library internally * move parameterization into own interface for simpler method signatures * fixes and documentation * fix typo * review feedback Co-authored-by: René Schünemann <rene.schuenemann@sap.com> * create explicit types for the generator functions passed into the ClusterRegistrationBuilder constructors * add background info about mcp architecture to documentation --------- Co-authored-by: René Schünemann <rene.schuenemann@sap.com>
1 parent 4f2b83b commit a6b9f94

File tree

14 files changed

+2206
-367
lines changed

14 files changed

+2206
-367
lines changed

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
- [ManagedControlPlane v2](controller/managedcontrolplane.md)
99
- [Cluster Scheduler](controller/scheduler.md)
1010

11+
## Libraries
12+
13+
- [The ClusterAccess Library](libraries/clusteraccess.md)
14+
1115
## Resources
1216

1317
- [Cluster Provider: Gardener [Resource Example]](resources/cluster-provider-gardener.md)

docs/libraries/.docnames

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"header": "Libraries"
3+
}

docs/libraries/clusteraccess.md

Lines changed: 220 additions & 0 deletions
Large diffs are not rendered by default.

lib/clusteraccess/advanced/clusteraccess.go

Lines changed: 1343 additions & 0 deletions
Large diffs are not rendered by default.

lib/clusteraccess/advanced/clusteraccess_test.go

Lines changed: 500 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: clusters.openmcp.cloud/v1alpha1
2+
kind: Cluster
3+
metadata:
4+
name: cluster-01
5+
namespace: test
6+
spec:
7+
profile: my-profile
8+
kubernetes:
9+
version: "1.32"
10+
purposes:
11+
- test
12+
tenancy: Exclusive
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: clusters.openmcp.cloud/v1alpha1
2+
kind: ClusterRequest
3+
metadata:
4+
name: cr-01
5+
namespace: test
6+
spec:
7+
purpose: test
8+
status:
9+
phase: Granted
10+
cluster:
11+
name: cluster-01
12+
namespace: test
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: clusters.openmcp.cloud/v1alpha1
2+
kind: AccessRequest
3+
metadata:
4+
name: foo--ar-conflict--fb
5+
namespace: afb2bcb3-2889-85f2-88a6-ea4ac5f2dd68
6+
spec: {}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: clusters.openmcp.cloud/v1alpha1
2+
kind: ClusterRequest
3+
metadata:
4+
name: foo--cr-conflict--fb
5+
namespace: 3d95cbf8-d468-88c6-9ca8-a3be991689a8
6+
spec:
7+
purpose: test

0 commit comments

Comments
 (0)