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
-**kubectl**: For interacting with Kubernetes clusters
20
20
21
-
## Installation
21
+
## 🏗️ Installation
22
22
23
-
### Production Deployment
23
+
### Local Development
24
24
25
-
In combination with the [OpenMCP Operator](https://github.com/openmcp-project/openmcp-operator), this operator can be deployed via a simple Kubernetes resource:
25
+
To run the cluster-provider-kind on your local machine, you need to first bootstrap an openMCP environment by using [openmcp-operator](https://github.com/openmcp-project/openmcp-operator). A comprehensive guide will follow soon.
26
+
27
+
In order to run the cluster-provider-kind properly, it is necessary to configure the openMCP Platform cluster with the Docker socket mounted into the nodes. Please use the following kind cluster configuration:
28
+
```yaml
29
+
apiVersion: kind.x-k8s.io/v1alpha4
30
+
kind: Cluster
31
+
nodes:
32
+
- role: control-plane
33
+
extraMounts:
34
+
- hostPath: /var/run/docker.sock
35
+
containerPath: /var/run/host-docker.sock
36
+
```
37
+
38
+
You can create the Platform cluster using the above configuration by running:
For current testing reasons, it is recommended to test and run the cluster-provider-kind in the cluster. To run the latest version of your changes in your local environment, you need to run:
46
+
47
+
```bash
48
+
task build:img:build
49
+
```
50
+
51
+
This will build the image of the cluster-provider-kind and push it to your local Docker registry.
image: ghcr.io/openmcp-project/images/cluster-provider-kind:... # latest local docker image build
66
+
extraVolumeMounts:
67
+
- mountPath: /var/run/docker.sock
68
+
name: docker
69
+
extraVolumes:
70
+
- name: docker
71
+
hostPath:
72
+
path: /var/run/host-docker.sock
73
+
type: Socket
34
74
```
35
75
36
-
### Local Development
37
-
38
-
To run the operator locally for development:
76
+
### Running Cluster Provider kind outside the cluster (not recommended)
77
+
You can also run the cluster-provider-kind outside the cluster, but this is not recommended at the moment, since the operator might not work as expected due to some IP address issues with your Docker network access.
39
78
40
-
1. **Start a platform kind cluster**:
41
-
```shell
42
-
kind create cluster --name platform
43
-
kubectl config use-context kind-platform
44
-
```
45
-
2. Install the Platform CRDs of the openmcp-operator:
46
-
Apply the CRDs from the OpenMCP operator repository [here](https://github.com/openmcp-project/openmcp-operator/tree/main/api/crds/manifests).
47
-
48
-
3.**Initialize the CRDs**:
49
-
```shell
79
+
The following steps will help you to run the cluster-provider-kind outside the cluster:
80
+
1. Initialize the CRDs:
81
+
```bash
50
82
go run ./cmd/cluster-provider-kind/main.go init
51
83
```
52
84
53
-
4.**Run the operator**:
54
-
```shell
85
+
2.Run the operator:
86
+
```bash
55
87
KIND_ON_LOCAL_HOST=true go run ./cmd/cluster-provider-kind/main.go run
56
88
```
57
89
58
90
> **Note**: When running the operator outside the cluster (locally), you must set the `KIND_ON_LOCAL_HOST` environment variable to `true`. This tells the operator to use the local Docker socket configuration instead of the in-cluster configuration.
59
91
60
-
## Usage Examples
92
+
## 📖 Usage
61
93
62
-
### Creating a Cluster
94
+
### Creating a `Cluster` via `ClusterRequest`
63
95
64
-
Create a new kind cluster by applying a Cluster resource:
96
+
Create a new kind cluster by applying a `ClusterRequest` resource:
65
97
66
98
```yaml
67
99
apiVersion: clusters.openmcp.cloud/v1alpha1
68
-
kind: Cluster
100
+
kind: ClusterRequest
69
101
metadata:
70
-
name: my-managedcontrolplane
102
+
name: mcp
71
103
namespace: default
72
104
spec:
73
-
profile: kind # This tells the kind provider to handle this cluster
74
-
tenancy: Exclusive
105
+
purpose: mcp
75
106
```
76
107
77
108
```shell
78
-
kubectl apply -f cluster.yaml
109
+
kubectl apply -f clusterrequest.yaml
79
110
```
80
111
81
-
### Requesting Access to a Cluster
112
+
##🧑💻 Development
82
113
83
-
Create an AccessRequest to get kubeconfig for a cluster:
114
+
### Building the binary locally
84
115
85
-
```yaml
86
-
apiVersion: clusters.openmcp.cloud/v1alpha1
87
-
kind: AccessRequest
88
-
metadata:
89
-
name: my-access
90
-
namespace: default
91
-
spec:
92
-
clusterRef:
93
-
name: my-managedcontrolplane
94
-
namespace: default
95
-
permissions: []
116
+
To build the binary locally, you can use the following command:
117
+
118
+
```bash
119
+
task build
96
120
```
97
121
98
-
The kubeconfig will be stored in a Secret in the same namespace as the `AccessRequest`.
122
+
### Build the image locally
99
123
100
-
## How it works
124
+
To build the image locally, you can use the following command:
125
+
126
+
```bash
127
+
task build:img:build
128
+
```
129
+
130
+
### Run unit tests locally
131
+
132
+
To run the unit tests locally, you can use the following command:
133
+
134
+
```bash
135
+
task test
136
+
```
137
+
138
+
### Generating the CRDs, DeepCopy functions etc.
139
+
To generate the CRDs, DeepCopy functions, and other boilerplate code, you can use the following command:
140
+
141
+
```bash
142
+
task generate
143
+
```
144
+
145
+
## 🏋️ How it works
101
146
102
147
### Docker Socket Access
103
148
@@ -199,17 +244,18 @@ platform
199
244
test
200
245
```
201
246
202
-
## Support, Feedback, Contributing
247
+
## ❤️ Support, Feedback, Contributing
203
248
204
249
This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/openmcp-project/cluster-provider-kind/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).
205
250
206
-
## Security / Disclosure
251
+
## 🔐 Security / Disclosure
252
+
207
253
If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/openmcp-project/cluster-provider-kind/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.
208
254
209
-
## Code of Conduct
255
+
## 🤝 Code of Conduct
210
256
211
257
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md) at all times.
212
258
213
-
## Licensing
259
+
## 📋 Licensing
214
260
215
261
Copyright 2025 SAP SE or an SAP affiliate company and cluster-provider-kind contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/openmcp-project/cluster-provider-kind).
0 commit comments