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
docs: Update Kubernetes integration docs to reflect spec.groupRef support (#133)
- Update MCPServer CRD mapping table to show spec.groupRef is preferred
- Clarify that spec.groupRef takes precedence over label
- Add examples showing both spec.groupRef and label methods
- Document default group behavior when neither is specified
This aligns the documentation with commit c6a44f2 which updated the
code to prefer spec.groupRef over metadata.labels.
| `metadata.labels["toolhive.stacklok.dev/group"]` | `group` | Server group |
561
+
| `spec.groupRef` (preferred) or `metadata.labels["toolhive.stacklok.dev/group"]` | `group` | Server group (prefers `spec.groupRef`, falls back to label, defaults to "default") |
562
562
| `spec.image` | `package` | Container image |
563
563
| `spec.transport` | `transport_type` | Transport type (stdio, sse, streamable-http) |
564
564
| `spec.port` | `port` | Server port |
@@ -686,15 +686,28 @@ Mismatches between these fields will cause connection failures.
686
686
687
687
### Group Filtering
688
688
689
-
MCP Optimizer supports filtering MCPServers by group labels. This is useful for isolating servers by environment or team:
689
+
MCP Optimizer supports filtering MCPServers by group. This is useful for isolating servers by environment or team:
690
690
691
691
```yaml
692
692
# In MCP Optimizer deployment, set environment variable:
693
693
- name: ALLOWED_GROUPS
694
694
value: "development,production"
695
695
```
696
696
697
-
Servers must have the `toolhive.stacklok.dev/group` label:
697
+
Servers can specify their group using either `spec.groupRef` (preferred) or the `toolhive.stacklok.dev/group` label. The `spec.groupRef` field takes precedence if both are present:
698
+
699
+
```yaml
700
+
apiVersion: toolhive.stacklok.dev/v1alpha1
701
+
kind: MCPServer
702
+
metadata:
703
+
name: my-server
704
+
spec:
705
+
# Preferred method: use spec.groupRef
706
+
groupRef: development
707
+
# ... other spec fields
708
+
```
709
+
710
+
Or using labels (legacy method, still supported):
698
711
699
712
```yaml
700
713
apiVersion: toolhive.stacklok.dev/v1alpha1
@@ -703,8 +716,12 @@ metadata:
703
716
name: my-server
704
717
labels:
705
718
toolhive.stacklok.dev/group: development
719
+
spec:
720
+
# ... spec fields
706
721
```
707
722
723
+
If neither `spec.groupRef` nor the label is specified, the server will be assigned to the "default" group.
724
+
708
725
See [Group Filtering documentation](group-filtering.md) for more details.
0 commit comments