Skip to content

Commit 0959b36

Browse files
Merge pull request #34 from ardaguclu/sync-downstream
NO-JIRA: Sync downstream with the latest changes in upstream
2 parents 6c8de3b + 45fac4f commit 0959b36

File tree

215 files changed

+20966
-3780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+20966
-3780
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ RUN make build
88
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
99
WORKDIR /app
1010
COPY --from=builder /app/kubernetes-mcp-server /app/kubernetes-mcp-server
11+
USER 65532:65532
1112
ENTRYPOINT ["/app/kubernetes-mcp-server", "--port", "8080"]
1213

1314
EXPOSE 8080

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,7 @@ golangci-lint: ## Download and install golangci-lint if not already installed
111111
.PHONY: lint
112112
lint: golangci-lint ## Lint the code
113113
$(GOLANGCI_LINT) run --verbose --print-resources-usage
114+
115+
.PHONY: update-readme-tools
116+
update-readme-tools: ## Update the README.md file with the latest toolsets
117+
go run ./internal/tools/update-readme/main.go README.md

README.md

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@ OpenShift MCP Server is currently under development.
77
A powerful and flexible Kubernetes [Model Context Protocol (MCP)](https://blog.marcnuri.com/model-context-protocol-mcp-introduction) server implementation with support for **Kubernetes** and **OpenShift**.
88

99
- **✅ Configuration**:
10-
- Automatically detect changes in the Kubernetes configuration and update the MCP server.
11-
- **View** and manage the current [Kubernetes `.kube/config`](https://blog.marcnuri.com/where-is-my-default-kubeconfig-file) or in-cluster configuration.
10+
- Automatically detect changes in the Kubernetes configuration and update the MCP server.
11+
- **View** and manage the current [Kubernetes `.kube/config`](https://blog.marcnuri.com/where-is-my-default-kubeconfig-file) or in-cluster configuration.
1212
- **✅ Generic Kubernetes Resources**: Perform operations on **any** Kubernetes or OpenShift resource.
13-
- Any CRUD operation (Create or Update, Get, List, Delete).
13+
- Any CRUD operation (Create or Update, Get, List, Delete).
1414
- **✅ Pods**: Perform Pod-specific operations.
15-
- **List** pods in all namespaces or in a specific namespace.
16-
- **Get** a pod by name from the specified namespace.
17-
- **Delete** a pod by name from the specified namespace.
18-
- **Show logs** for a pod by name from the specified namespace.
19-
- **Top** gets resource usage metrics for all pods or a specific pod in the specified namespace.
20-
- **Exec** into a pod and run a command.
21-
- **Run** a container image in a pod and optionally expose it.
15+
- **List** pods in all namespaces or in a specific namespace.
16+
- **Get** a pod by name from the specified namespace.
17+
- **Delete** a pod by name from the specified namespace.
18+
- **Show logs** for a pod by name from the specified namespace.
19+
- **Top** gets resource usage metrics for all pods or a specific pod in the specified namespace.
20+
- **Exec** into a pod and run a command.
21+
- **Run** a container image in a pod and optionally expose it.
2222
- **✅ Namespaces**: List Kubernetes Namespaces.
2323
- **✅ Events**: View Kubernetes events in all namespaces or in a specific namespace.
2424
- **✅ Projects**: List OpenShift Projects.
2525
- **☸️ Helm**:
26-
- **Install** a Helm chart in the current or provided namespace.
27-
- **List** Helm releases in all namespaces or in a specific namespace.
28-
- **Uninstall** a Helm release in the current or provided namespace.
26+
- **Install** a Helm chart in the current or provided namespace.
27+
- **List** Helm releases in all namespaces or in a specific namespace.
28+
- **Uninstall** a Helm release in the current or provided namespace.
2929

3030
Unlike other Kubernetes MCP server implementations, this **IS NOT** just a wrapper around `kubectl` or `helm` command-line tools.
3131
It is a **Go-based native implementation** that interacts directly with the Kubernetes API server.
@@ -160,59 +160,59 @@ Get the current Kubernetes configuration content as a kubeconfig YAML
160160

161161
**Parameters:**
162162
- `minified` (`boolean`, optional, default: `true`)
163-
- Return a minified version of the configuration
164-
- If `true`, keeps only the current-context and relevant configuration pieces
165-
- If `false`, returns all contexts, clusters, auth-infos, and users
163+
- Return a minified version of the configuration
164+
- If `true`, keeps only the current-context and relevant configuration pieces
165+
- If `false`, returns all contexts, clusters, auth-infos, and users
166166

167167
### `events_list`
168168

169169
List all the Kubernetes events in the current cluster from all namespaces
170170

171171
**Parameters:**
172172
- `namespace` (`string`, optional)
173-
- Namespace to retrieve the events from. If not provided, will list events from all namespaces
173+
- Namespace to retrieve the events from. If not provided, will list events from all namespaces
174174

175175
### `helm_install`
176176

177177
Install a Helm chart in the current or provided namespace with the provided name and chart
178178

179179
**Parameters:**
180180
- `chart` (`string`, required)
181-
- Name of the Helm chart to install
182-
- Can be a local path or a remote URL
183-
- Example: `./my-chart.tgz` or `https://example.com/my-chart.tgz`
181+
- Name of the Helm chart to install
182+
- Can be a local path or a remote URL
183+
- Example: `./my-chart.tgz` or `https://example.com/my-chart.tgz`
184184
- `values` (`object`, optional)
185-
- Values to pass to the Helm chart
186-
- Example: `{"key": "value"}`
185+
- Values to pass to the Helm chart
186+
- Example: `{"key": "value"}`
187187
- `name` (`string`, optional)
188-
- Name of the Helm release
189-
- Random name if not provided
188+
- Name of the Helm release
189+
- Random name if not provided
190190
- `namespace` (`string`, optional)
191-
- Namespace to install the Helm chart in
192-
- If not provided, will use the configured namespace
191+
- Namespace to install the Helm chart in
192+
- If not provided, will use the configured namespace
193193

194194
### `helm_list`
195195

196196
List all the Helm releases in the current or provided namespace (or in all namespaces if specified)
197197

198198
**Parameters:**
199199
- `namespace` (`string`, optional)
200-
- Namespace to list the Helm releases from
201-
- If not provided, will use the configured namespace
200+
- Namespace to list the Helm releases from
201+
- If not provided, will use the configured namespace
202202
- `all_namespaces` (`boolean`, optional)
203-
- If `true`, will list Helm releases from all namespaces
204-
- If `false`, will list Helm releases from the specified namespace
203+
- If `true`, will list Helm releases from all namespaces
204+
- If `false`, will list Helm releases from the specified namespace
205205

206206
### `helm_uninstall`
207207

208208
Uninstall a Helm release in the current or provided namespace with the provided name
209209

210210
**Parameters:**
211211
- `name` (`string`, required)
212-
- Name of the Helm release to uninstall
212+
- Name of the Helm release to uninstall
213213
- `namespace` (`string`, optional)
214-
- Namespace to uninstall the Helm release from
215-
- If not provided, will use the configured namespace
214+
- Namespace to uninstall the Helm release from
215+
- If not provided, will use the configured namespace
216216

217217
### `namespaces_list`
218218

@@ -226,97 +226,97 @@ Delete a Kubernetes Pod in the current or provided namespace with the provided n
226226

227227
**Parameters:**
228228
- `name` (`string`, required)
229-
- Name of the Pod to delete
229+
- Name of the Pod to delete
230230
- `namespace` (`string`, required)
231-
- Namespace to delete the Pod from
231+
- Namespace to delete the Pod from
232232

233233
### `pods_exec`
234234

235235
Execute a command in a Kubernetes Pod in the current or provided namespace with the provided name and command
236236

237237
**Parameters:**
238238
- `command` (`string[]`, required)
239-
- Command to execute in the Pod container
240-
- First item is the command, rest are arguments
241-
- Example: `["ls", "-l", "/tmp"]`
239+
- Command to execute in the Pod container
240+
- First item is the command, rest are arguments
241+
- Example: `["ls", "-l", "/tmp"]`
242242
- `name` (string, required)
243-
- Name of the Pod
243+
- Name of the Pod
244244
- `namespace` (string, required)
245-
- Namespace of the Pod
245+
- Namespace of the Pod
246246
- `container` (`string`, optional)
247-
- Name of the Pod container to get logs from
247+
- Name of the Pod container to get logs from
248248

249249
### `pods_get`
250250

251251
Get a Kubernetes Pod in the current or provided namespace with the provided name
252252

253253
**Parameters:**
254254
- `name` (`string`, required)
255-
- Name of the Pod
255+
- Name of the Pod
256256
- `namespace` (`string`, required)
257-
- Namespace to get the Pod from
257+
- Namespace to get the Pod from
258258

259259
### `pods_list`
260260

261261
List all the Kubernetes pods in the current cluster from all namespaces
262262

263263
**Parameters:**
264264
- `labelSelector` (`string`, optional)
265-
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
265+
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
266266

267267
### `pods_list_in_namespace`
268268

269269
List all the Kubernetes pods in the specified namespace in the current cluster
270270

271271
**Parameters:**
272272
- `namespace` (`string`, required)
273-
- Namespace to list pods from
273+
- Namespace to list pods from
274274
- `labelSelector` (`string`, optional)
275-
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
275+
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label
276276

277277
### `pods_log`
278278

279279
Get the logs of a Kubernetes Pod in the current or provided namespace with the provided name
280280

281281
**Parameters:**
282282
- `name` (`string`, required)
283-
- Name of the Pod to get logs from
283+
- Name of the Pod to get logs from
284284
- `namespace` (`string`, required)
285-
- Namespace to get the Pod logs from
285+
- Namespace to get the Pod logs from
286286
- `container` (`string`, optional)
287-
- Name of the Pod container to get logs from
287+
- Name of the Pod container to get logs from
288288

289289
### `pods_run`
290290

291291
Run a Kubernetes Pod in the current or provided namespace with the provided container image and optional name
292292

293293
**Parameters:**
294294
- `image` (`string`, required)
295-
- Container Image to run in the Pod
295+
- Container Image to run in the Pod
296296
- `namespace` (`string`, required)
297-
- Namespace to run the Pod in
297+
- Namespace to run the Pod in
298298
- `name` (`string`, optional)
299-
- Name of the Pod (random name if not provided)
299+
- Name of the Pod (random name if not provided)
300300
- `port` (`number`, optional)
301-
- TCP/IP port to expose from the Pod container
302-
- No port exposed if not provided
301+
- TCP/IP port to expose from the Pod container
302+
- No port exposed if not provided
303303

304304
### `pods_top`
305305

306306
Lists the resource consumption (CPU and memory) as recorded by the Kubernetes Metrics Server for the specified Kubernetes Pods in the all namespaces, the provided namespace, or the current namespace
307307

308308
**Parameters:**
309309
- `all_namespaces` (`boolean`, optional, default: `true`)
310-
- If `true`, lists resource consumption for Pods in all namespaces
311-
- If `false`, lists resource consumption for Pods in the configured or provided namespace
310+
- If `true`, lists resource consumption for Pods in all namespaces
311+
- If `false`, lists resource consumption for Pods in the configured or provided namespace
312312
- `namespace` (`string`, optional)
313-
- Namespace to list the Pod resources from
314-
- If not provided, will list Pods from the configured namespace (in case all_namespaces is false)
313+
- Namespace to list the Pod resources from
314+
- If not provided, will list Pods from the configured namespace (in case all_namespaces is false)
315315
- `name` (`string`, optional)
316-
- Name of the Pod to get resource consumption from
317-
- If not provided, will list resource consumption for all Pods in the applicable namespace(s)
316+
- Name of the Pod to get resource consumption from
317+
- If not provided, will list resource consumption for all Pods in the applicable namespace(s)
318318
- `label_selector` (`string`, optional)
319-
- Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label (Optional, only applicable when name is not provided)
319+
- Kubernetes label selector (e.g. 'app=myapp,env=prod' or 'app in (myapp,yourapp)'), use this option when you want to filter the pods by label (Optional, only applicable when name is not provided)
320320

321321
### `projects_list`
322322

@@ -328,8 +328,8 @@ Create or update a Kubernetes resource in the current cluster by providing a YAM
328328

329329
**Parameters:**
330330
- `resource` (`string`, required)
331-
- A JSON or YAML containing a representation of the Kubernetes resource
332-
- Should include top-level fields such as apiVersion, kind, metadata, and spec
331+
- A JSON or YAML containing a representation of the Kubernetes resource
332+
- Should include top-level fields such as apiVersion, kind, metadata, and spec
333333

334334
**Common apiVersion and kind include:**
335335
- v1 Pod
@@ -344,47 +344,47 @@ Delete a Kubernetes resource in the current cluster
344344

345345
**Parameters:**
346346
- `apiVersion` (`string`, required)
347-
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
347+
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
348348
- `kind` (`string`, required)
349-
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
349+
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
350350
- `name` (`string`, required)
351-
- Name of the resource
351+
- Name of the resource
352352
- `namespace` (`string`, optional)
353-
- Namespace to delete the namespaced resource from
354-
- Ignored for cluster-scoped resources
355-
- Uses configured namespace if not provided
353+
- Namespace to delete the namespaced resource from
354+
- Ignored for cluster-scoped resources
355+
- Uses configured namespace if not provided
356356

357357
### `resources_get`
358358

359359
Get a Kubernetes resource in the current cluster
360360

361361
**Parameters:**
362362
- `apiVersion` (`string`, required)
363-
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
363+
- apiVersion of the resource (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
364364
- `kind` (`string`, required)
365-
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
365+
- kind of the resource (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
366366
- `name` (`string`, required)
367-
- Name of the resource
367+
- Name of the resource
368368
- `namespace` (`string`, optional)
369-
- Namespace to retrieve the namespaced resource from
370-
- Ignored for cluster-scoped resources
371-
- Uses configured namespace if not provided
369+
- Namespace to retrieve the namespaced resource from
370+
- Ignored for cluster-scoped resources
371+
- Uses configured namespace if not provided
372372

373373
### `resources_list`
374374

375375
List Kubernetes resources and objects in the current cluster
376376

377377
**Parameters:**
378378
- `apiVersion` (`string`, required)
379-
- apiVersion of the resources (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
379+
- apiVersion of the resources (e.g., `v1`, `apps/v1`, `networking.k8s.io/v1`)
380380
- `kind` (`string`, required)
381-
- kind of the resources (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
381+
- kind of the resources (e.g., `Pod`, `Service`, `Deployment`, `Ingress`)
382382
- `namespace` (`string`, optional)
383-
- Namespace to retrieve the namespaced resources from
384-
- Ignored for cluster-scoped resources
385-
- Lists resources from all namespaces if not provided
383+
- Namespace to retrieve the namespaced resources from
384+
- Ignored for cluster-scoped resources
385+
- Lists resources from all namespaces if not provided
386386
- `labelSelector` (`string`, optional)
387-
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label.
387+
- Kubernetes label selector (e.g., 'app=myapp,env=prod' or 'app in (myapp,yourapp)'). Use this option to filter the pods by label.
388388

389389
## 🧑‍💻 Development <a id="development"></a>
390390

0 commit comments

Comments
 (0)