@agents-at-scale/ark 0.1.36 → 0.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +53 -70
  2. package/dist/arkServices.d.ts +3 -27
  3. package/dist/arkServices.js +31 -3
  4. package/dist/arkServices.spec.js +118 -10
  5. package/dist/commands/chat/index.js +1 -2
  6. package/dist/commands/completion/index.js +0 -2
  7. package/dist/commands/generate/generators/project.js +33 -26
  8. package/dist/commands/generate/index.js +2 -2
  9. package/dist/commands/generate/templateDiscovery.js +13 -4
  10. package/dist/commands/install/index.js +49 -58
  11. package/dist/commands/models/create.d.ts +9 -1
  12. package/dist/commands/models/create.js +97 -90
  13. package/dist/commands/models/create.spec.js +9 -37
  14. package/dist/commands/models/index.js +8 -2
  15. package/dist/commands/models/index.spec.js +1 -1
  16. package/dist/commands/status/index.d.ts +3 -1
  17. package/dist/commands/status/index.js +54 -2
  18. package/dist/components/AsyncOperation.d.ts +54 -0
  19. package/dist/components/AsyncOperation.js +110 -0
  20. package/dist/components/ChatUI.js +39 -72
  21. package/dist/components/SelectMenu.d.ts +17 -0
  22. package/dist/components/SelectMenu.js +21 -0
  23. package/dist/components/StatusMessage.d.ts +20 -0
  24. package/dist/components/StatusMessage.js +13 -0
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/lib/arkApiClient.d.ts +1 -2
  28. package/dist/lib/arkApiClient.js +5 -6
  29. package/dist/lib/config.d.ts +4 -0
  30. package/dist/lib/config.js +9 -0
  31. package/dist/lib/nextSteps.js +1 -1
  32. package/dist/lib/nextSteps.spec.js +1 -1
  33. package/dist/lib/security.js +4 -0
  34. package/dist/lib/startup.js +6 -2
  35. package/dist/lib/startup.spec.js +1 -1
  36. package/dist/lib/timeout.d.ts +1 -0
  37. package/dist/lib/timeout.js +20 -0
  38. package/dist/lib/timeout.spec.d.ts +1 -0
  39. package/dist/lib/timeout.spec.js +14 -0
  40. package/dist/lib/waitForReady.d.ts +8 -0
  41. package/dist/lib/waitForReady.js +32 -0
  42. package/dist/lib/waitForReady.spec.d.ts +1 -0
  43. package/dist/lib/waitForReady.spec.js +104 -0
  44. package/dist/types/arkService.d.ts +27 -0
  45. package/dist/types/arkService.js +1 -0
  46. package/dist/ui/asyncOperations/connectingToArk.d.ts +15 -0
  47. package/dist/ui/asyncOperations/connectingToArk.js +63 -0
  48. package/package.json +7 -5
  49. package/templates/agent/agent.template.yaml +27 -0
  50. package/templates/marketplace/.editorconfig +24 -0
  51. package/templates/marketplace/.github/.keep +11 -0
  52. package/templates/marketplace/.github/workflows/.keep +16 -0
  53. package/templates/marketplace/.helmignore +23 -0
  54. package/templates/marketplace/.prettierrc.json +20 -0
  55. package/templates/marketplace/.yamllint.yml +53 -0
  56. package/templates/marketplace/README.md +197 -0
  57. package/templates/marketplace/agents/.keep +29 -0
  58. package/templates/marketplace/docs/.keep +19 -0
  59. package/templates/marketplace/mcp-servers/.keep +32 -0
  60. package/templates/marketplace/models/.keep +23 -0
  61. package/templates/marketplace/projects/.keep +43 -0
  62. package/templates/marketplace/queries/.keep +25 -0
  63. package/templates/marketplace/teams/.keep +29 -0
  64. package/templates/marketplace/tools/.keep +32 -0
  65. package/templates/marketplace/tools/examples/.keep +17 -0
  66. package/templates/mcp-server/Dockerfile +133 -0
  67. package/templates/mcp-server/Makefile +186 -0
  68. package/templates/mcp-server/README.md +178 -0
  69. package/templates/mcp-server/build.sh +76 -0
  70. package/templates/mcp-server/chart/Chart.yaml +22 -0
  71. package/templates/mcp-server/chart/templates/_helpers.tpl +62 -0
  72. package/templates/mcp-server/chart/templates/deployment.yaml +80 -0
  73. package/templates/mcp-server/chart/templates/hpa.yaml +32 -0
  74. package/templates/mcp-server/chart/templates/mcpserver.yaml +21 -0
  75. package/templates/mcp-server/chart/templates/secret.yaml +11 -0
  76. package/templates/mcp-server/chart/templates/service.yaml +15 -0
  77. package/templates/mcp-server/chart/templates/serviceaccount.yaml +13 -0
  78. package/templates/mcp-server/chart/values.yaml +84 -0
  79. package/templates/mcp-server/example-values.yaml +74 -0
  80. package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-agent.yaml +33 -0
  81. package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-query.yaml +24 -0
  82. package/templates/models/azure.yaml +33 -0
  83. package/templates/models/claude.yaml +28 -0
  84. package/templates/models/gemini.yaml +28 -0
  85. package/templates/models/openai.yaml +39 -0
  86. package/templates/project/.editorconfig +24 -0
  87. package/templates/project/.helmignore +24 -0
  88. package/templates/project/.prettierrc.json +16 -0
  89. package/templates/project/.yamllint.yml +50 -0
  90. package/templates/project/Chart.yaml +19 -0
  91. package/templates/project/Makefile +360 -0
  92. package/templates/project/README.md +377 -0
  93. package/templates/project/agents/.keep +11 -0
  94. package/templates/project/docs/.keep +14 -0
  95. package/templates/project/mcp-servers/.keep +34 -0
  96. package/templates/project/models/.keep +17 -0
  97. package/templates/project/queries/.keep +11 -0
  98. package/templates/project/scripts/setup.sh +108 -0
  99. package/templates/project/teams/.keep +11 -0
  100. package/templates/project/templates/00-rbac.yaml +168 -0
  101. package/templates/project/templates/01-models.yaml +11 -0
  102. package/templates/project/templates/02-mcp-servers.yaml +22 -0
  103. package/templates/project/templates/03-tools.yaml +12 -0
  104. package/templates/project/templates/04-agents.yaml +12 -0
  105. package/templates/project/templates/05-teams.yaml +11 -0
  106. package/templates/project/templates/06-queries.yaml +11 -0
  107. package/templates/project/templates/_helpers.tpl +91 -0
  108. package/templates/project/tests/e2e/.keep +10 -0
  109. package/templates/project/tests/unit/.keep +10 -0
  110. package/templates/project/tools/.keep +25 -0
  111. package/templates/project/tools/example-tool.yaml.disabled +94 -0
  112. package/templates/project/tools/examples/data-tool/Dockerfile +32 -0
  113. package/templates/project/values.yaml +141 -0
  114. package/templates/query/query.template.yaml +13 -0
  115. package/templates/team/team.template.yaml +17 -0
  116. package/templates/tool/.python-version +1 -0
  117. package/templates/tool/Dockerfile +23 -0
  118. package/templates/tool/README.md +238 -0
  119. package/templates/tool/agent.yaml +19 -0
  120. package/templates/tool/deploy.sh +10 -0
  121. package/templates/tool/deployment/deployment.yaml +31 -0
  122. package/templates/tool/deployment/kustomization.yaml +7 -0
  123. package/templates/tool/deployment/mcpserver.yaml +12 -0
  124. package/templates/tool/deployment/service.yaml +12 -0
  125. package/templates/tool/deployment/serviceaccount.yaml +8 -0
  126. package/templates/tool/deployment/values.yaml +3 -0
  127. package/templates/tool/pyproject.toml +9 -0
  128. package/templates/tool/src/main.py +36 -0
  129. package/templates/tool/uv.lock +498 -0
@@ -0,0 +1,178 @@
1
+ # {{ .Values.mcpServerName }} MCP Server
2
+
3
+ {{ .Values.description }}
4
+
5
+ ## Prerequisites
6
+
7
+ - Kubernetes 1.19+
8
+ - Helm 3.2.0+
9
+ {{- if .Values.requiresAuth }}
10
+ - Authentication credentials configured
11
+ {{- end }}
12
+
13
+ ## Installation
14
+
15
+ ### 1. Build the Docker Image
16
+
17
+ ```bash
18
+ cd /path/to/{{ .Values.mcpServerName }}
19
+ docker build -t {{ .Values.mcpServerName }}:latest .
20
+ ```
21
+
22
+ ### 2. Install the Helm Chart
23
+
24
+ ```bash
25
+ # Install the MCP server
26
+ helm install {{ .Values.mcpServerName }}-mcp ./chart \
27
+ {{- if .Values.requiresAuth }}
28
+ --set auth.token="your-auth-token"
29
+ {{- end }}
30
+ {{- if .Values.hasCustomConfig }}
31
+ --set config.customValue="your-config-value"
32
+ {{- end }}
33
+
34
+ # Or install with values file
35
+ helm install {{ .Values.mcpServerName }}-mcp ./chart \
36
+ --values example-values.yaml
37
+ ```
38
+
39
+ ### 3. Deploy Agent and Query (Optional)
40
+
41
+ ```bash
42
+ # Deploy the example agent and query that use the MCP server
43
+ kubectl apply -f examples/{{ .Values.mcpServerName }}-agent.yaml
44
+ ```
45
+
46
+ ### 4. Verify Installation
47
+
48
+ ```bash
49
+ kubectl get pods -l app.kubernetes.io/name={{ .Values.mcpServerName }}
50
+ kubectl get mcpservers
51
+ kubectl get agents
52
+ kubectl get queries
53
+ ```
54
+
55
+ ## Configuration
56
+
57
+ ### Helm Values
58
+
59
+ | Key | Type | Default | Description |
60
+ | ------------------ | ------ | ------------------------------- | ------------------ |
61
+ | `replicaCount` | int | `1` | Number of replicas |
62
+ | `image.repository` | string | `"{{ .Values.mcpServerName }}"` | Image repository |
63
+ | `image.tag` | string | `"latest"` | Image tag |
64
+ | `service.port` | int | `8080` | Service port |
65
+
66
+ {{- if .Values.requiresAuth }}
67
+ | `auth.token` | string | `""` | Authentication token |
68
+ | `auth.existingSecret` | string | `""` | Existing secret name for auth |
69
+ {{- end }}
70
+ {{- if .Values.hasCustomConfig }}
71
+ | `config.customValue` | string | `""` | Custom configuration value |
72
+ {{- end }}
73
+
74
+ ### Environment Variables
75
+
76
+ {{- if .Values.requiresAuth }}
77
+
78
+ - `AUTH_TOKEN`: Authentication token for the service
79
+ {{- end }}
80
+ {{- if .Values.hasCustomConfig }}
81
+ - `CUSTOM_CONFIG`: Custom configuration for the MCP server
82
+ {{- end }}
83
+
84
+ ## MCP Tools
85
+
86
+ The {{ .Values.mcpServerName }} MCP server provides these tools:
87
+
88
+ {{- range .Values.tools }}
89
+
90
+ - `{{ .name }}` - {{ .description }}
91
+ {{- end }}
92
+
93
+ ## Docker Usage
94
+
95
+ Run the container directly:
96
+
97
+ ```bash
98
+ docker build -t {{ .Values.mcpServerName }} .
99
+ docker run -p 8080:8080 {{ .Values.mcpServerName }}
100
+ ```
101
+
102
+ The server will be available at `http://localhost:8080/mcp`
103
+
104
+ ## Development
105
+
106
+ ### Local Development
107
+
108
+ 1. Install dependencies:
109
+
110
+ ```bash
111
+ {{ .Values.packageManager }} install
112
+ ```
113
+
114
+ 2. Run the server:
115
+
116
+ ```bash
117
+ {{ .Values.packageManager }} start
118
+ ```
119
+
120
+ 3. Test the MCP server:
121
+
122
+ ```bash
123
+ # Using MCP Inspector or similar tool
124
+ mcp-inspector http://localhost:8080/mcp
125
+ ```
126
+
127
+ ### Testing
128
+
129
+ ```bash
130
+ {{ .Values.packageManager }} test
131
+ ```
132
+
133
+ ## Architecture
134
+
135
+ This MCP server is built using:
136
+
137
+ - **{{ .Values.technology }}**: Core MCP server implementation
138
+ - **mcp-proxy**: HTTP transport layer for the MCP protocol
139
+ - **Kubernetes**: Container orchestration and deployment
140
+ - **Helm**: Package management and configuration
141
+
142
+ ## Examples
143
+
144
+ See the `examples/` directory for:
145
+
146
+ - Agent configurations using this MCP server
147
+ - Query examples
148
+ - Integration patterns
149
+
150
+ ## Troubleshooting
151
+
152
+ ### Common Issues
153
+
154
+ 1. **Connection refused**: Check if the service is running and port 8080 is accessible
155
+ 2. **Authentication failed**: Verify auth token configuration
156
+ 3. **Tool not found**: Ensure the MCP server is properly registered
157
+
158
+ ### Logs
159
+
160
+ ```bash
161
+ # Check pod logs
162
+ kubectl logs -l app.kubernetes.io/name={{ .Values.mcpServerName }}
163
+
164
+ # Check MCP server registration
165
+ kubectl describe mcpserver {{ .Values.mcpServerName }}
166
+ ```
167
+
168
+ ## Contributing
169
+
170
+ 1. Fork the repository
171
+ 2. Create a feature branch
172
+ 3. Make your changes
173
+ 4. Add tests if applicable
174
+ 5. Submit a pull request
175
+
176
+ ## License
177
+
178
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,76 @@
1
+ #!/bin/bash
2
+
3
+ # {{ .Values.mcpServerName }} MCP Server Build Script
4
+
5
+ set -e
6
+
7
+ IMAGE_TAG=${1:-latest}
8
+ TARGET_CLUSTER=${2:-auto}
9
+ IMAGE_NAME="{{ .Values.mcpServerName }}"
10
+
11
+ echo "Building {{ .Values.mcpServerName }} MCP Server..."
12
+ echo "Image: ${IMAGE_NAME}:${IMAGE_TAG}"
13
+ echo "Target cluster: ${TARGET_CLUSTER}"
14
+
15
+ # Build the Docker image
16
+ docker build -t ${IMAGE_NAME}:${IMAGE_TAG} .
17
+
18
+ # Tag and push based on target cluster
19
+ case $TARGET_CLUSTER in
20
+ "auto")
21
+ echo "Auto-detecting cluster configuration..."
22
+ # Try to detect if we're in a local development environment
23
+ if kubectl config current-context | grep -E "(kind|minikube|docker-desktop)" > /dev/null 2>&1; then
24
+ echo "Local development cluster detected, loading image locally..."
25
+
26
+ # Load image into kind if available
27
+ if command -v kind > /dev/null 2>&1 && kind get clusters > /dev/null 2>&1; then
28
+ echo "Loading image into kind cluster..."
29
+ kind load docker-image ${IMAGE_NAME}:${IMAGE_TAG}
30
+ fi
31
+
32
+ # Load image into minikube if available
33
+ if command -v minikube > /dev/null 2>&1 && minikube status > /dev/null 2>&1; then
34
+ echo "Loading image into minikube..."
35
+ minikube image load ${IMAGE_NAME}:${IMAGE_TAG}
36
+ fi
37
+ else
38
+ echo "Remote cluster detected, pushing to registry..."
39
+ docker push ${IMAGE_NAME}:${IMAGE_TAG}
40
+ fi
41
+ ;;
42
+ "local"|"kind"|"minikube")
43
+ echo "Loading image into local cluster..."
44
+
45
+ if [[ $TARGET_CLUSTER == "kind" ]] && command -v kind > /dev/null 2>&1; then
46
+ kind load docker-image ${IMAGE_NAME}:${IMAGE_TAG}
47
+ elif [[ $TARGET_CLUSTER == "minikube" ]] && command -v minikube > /dev/null 2>&1; then
48
+ minikube image load ${IMAGE_NAME}:${IMAGE_TAG}
49
+ else
50
+ echo "Local cluster tools not available, skipping image load"
51
+ fi
52
+ ;;
53
+ "remote"|"registry")
54
+ echo "Pushing image to registry..."
55
+ docker push ${IMAGE_NAME}:${IMAGE_TAG}
56
+ ;;
57
+ *)
58
+ echo "Unknown target cluster: $TARGET_CLUSTER"
59
+ echo "Valid options: auto, local, kind, minikube, remote, registry"
60
+ exit 1
61
+ ;;
62
+ esac
63
+
64
+ echo "{{ .Values.mcpServerName }} MCP Server build completed successfully!"
65
+ echo ""
66
+ echo "Next steps:"
67
+ echo "1. Install the Helm chart:"
68
+ {{- if .Values.requiresAuth }}
69
+ echo " make install AUTH_TOKEN=your-auth-token"
70
+ {{- else }}
71
+ echo " make install"
72
+ {{- end }}
73
+ echo "2. Check the status:"
74
+ echo " make status"
75
+ echo "3. View logs:"
76
+ echo " make logs"
@@ -0,0 +1,22 @@
1
+ apiVersion: v2
2
+ name: {{ .Values.mcpServerName }}
3
+ description: {{ .Values.description }}
4
+ type: application
5
+ version: 0.1.0
6
+ appVersion: "latest"
7
+ keywords:
8
+ - mcp
9
+ - {{ .Values.mcpServerName }}
10
+ - proxy
11
+ - agent
12
+ {{- if .Values.homeUrl }}
13
+ home: {{ .Values.homeUrl }}
14
+ {{- end }}
15
+ {{- if .Values.sourceUrls }}
16
+ sources:
17
+ {{- range .Values.sourceUrls }}
18
+ - {{ . }}
19
+ {{- end }}
20
+ {{- end }}
21
+ maintainers:
22
+ - name: {{ .Values.maintainerName | default "QBAF Team" }}
@@ -0,0 +1,62 @@
1
+ {{/*
2
+ Expand the name of the chart.
3
+ */}}
4
+ {{- define "{{ .Values.mcpServerName }}.name" -}}
5
+ {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6
+ {{- end }}
7
+
8
+ {{/*
9
+ Create a default fully qualified app name.
10
+ We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11
+ If release name contains chart name it will be used as a full name.
12
+ */}}
13
+ {{- define "{{ .Values.mcpServerName }}.fullname" -}}
14
+ {{- if .Values.fullnameOverride }}
15
+ {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16
+ {{- else }}
17
+ {{- $name := default .Chart.Name .Values.nameOverride }}
18
+ {{- if contains $name .Release.Name }}
19
+ {{- .Release.Name | trunc 63 | trimSuffix "-" }}
20
+ {{- else }}
21
+ {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22
+ {{- end }}
23
+ {{- end }}
24
+ {{- end }}
25
+
26
+ {{/*
27
+ Create chart name and version as used by the chart label.
28
+ */}}
29
+ {{- define "{{ .Values.mcpServerName }}.chart" -}}
30
+ {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31
+ {{- end }}
32
+
33
+ {{/*
34
+ Common labels
35
+ */}}
36
+ {{- define "{{ .Values.mcpServerName }}.labels" -}}
37
+ helm.sh/chart: {{ include "{{ .Values.mcpServerName }}.chart" . }}
38
+ {{ include "{{ .Values.mcpServerName }}.selectorLabels" . }}
39
+ {{- if .Chart.AppVersion }}
40
+ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41
+ {{- end }}
42
+ app.kubernetes.io/managed-by: {{ .Release.Service }}
43
+ {{- end }}
44
+
45
+ {{/*
46
+ Selector labels
47
+ */}}
48
+ {{- define "{{ .Values.mcpServerName }}.selectorLabels" -}}
49
+ app.kubernetes.io/name: {{ include "{{ .Values.mcpServerName }}.name" . }}
50
+ app.kubernetes.io/instance: {{ .Release.Name }}
51
+ {{- end }}
52
+
53
+ {{/*
54
+ Create the name of the service account to use
55
+ */}}
56
+ {{- define "{{ .Values.mcpServerName }}.serviceAccountName" -}}
57
+ {{- if .Values.serviceAccount.create }}
58
+ {{- default (include "{{ .Values.mcpServerName }}.fullname" .) .Values.serviceAccount.name }}
59
+ {{- else }}
60
+ {{- default "default" .Values.serviceAccount.name }}
61
+ {{- end }}
62
+ {{- end }}
@@ -0,0 +1,80 @@
1
+ apiVersion: apps/v1
2
+ kind: Deployment
3
+ metadata:
4
+ name: {{ include "{{ .Values.mcpServerName }}.fullname" . }}
5
+ labels:
6
+ {{- include "{{ .Values.mcpServerName }}.labels" . | nindent 4 }}
7
+ spec:
8
+ {{- if not .Values.autoscaling.enabled }}
9
+ replicas: {{ .Values.replicaCount }}
10
+ {{- end }}
11
+ selector:
12
+ matchLabels:
13
+ {{- include "{{ .Values.mcpServerName }}.selectorLabels" . | nindent 6 }}
14
+ template:
15
+ metadata:
16
+ {{- with .Values.podAnnotations }}
17
+ annotations:
18
+ {{- toYaml . | nindent 8 }}
19
+ {{- end }}
20
+ labels:
21
+ {{- include "{{ .Values.mcpServerName }}.selectorLabels" . | nindent 8 }}
22
+ {{- with .Values.podLabels }}
23
+ {{- toYaml . | nindent 8 }}
24
+ {{- end }}
25
+ spec:
26
+ {{- with .Values.imagePullSecrets }}
27
+ imagePullSecrets:
28
+ {{- toYaml . | nindent 8 }}
29
+ {{- end }}
30
+ serviceAccountName: {{ include "{{ .Values.mcpServerName }}.serviceAccountName" . }}
31
+ securityContext:
32
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
33
+ containers:
34
+ - name: {{ .Chart.Name }}
35
+ securityContext:
36
+ {{- toYaml .Values.securityContext | nindent 12 }}
37
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
38
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
39
+ ports:
40
+ - name: http
41
+ containerPort: 8080
42
+ protocol: TCP
43
+ livenessProbe:
44
+ {{- toYaml .Values.livenessProbe | nindent 12 }}
45
+ readinessProbe:
46
+ {{- toYaml .Values.readinessProbe | nindent 12 }}
47
+ resources:
48
+ {{- toYaml .Values.resources | nindent 12 }}
49
+ env:
50
+ {{- if .Values.requiresAuth }}
51
+ - name: AUTH_TOKEN
52
+ valueFrom:
53
+ secretKeyRef:
54
+ name: {{ .Values.auth.existingSecret | default (include "{{ .Values.mcpServerName }}.fullname" .) }}
55
+ key: {{ .Values.auth.existingSecretKey }}
56
+ {{- end }}
57
+ {{- if .Values.hasCustomConfig }}
58
+ - name: CUSTOM_CONFIG
59
+ value: {{ .Values.config.customValue | quote }}
60
+ {{- end }}
61
+ {{- with .Values.volumeMounts }}
62
+ volumeMounts:
63
+ {{- toYaml . | nindent 12 }}
64
+ {{- end }}
65
+ {{- with .Values.volumes }}
66
+ volumes:
67
+ {{- toYaml . | nindent 8 }}
68
+ {{- end }}
69
+ {{- with .Values.nodeSelector }}
70
+ nodeSelector:
71
+ {{- toYaml . | nindent 8 }}
72
+ {{- end }}
73
+ {{- with .Values.affinity }}
74
+ affinity:
75
+ {{- toYaml . | nindent 8 }}
76
+ {{- end }}
77
+ {{- with .Values.tolerations }}
78
+ tolerations:
79
+ {{- toYaml . | nindent 8 }}
80
+ {{- end }}
@@ -0,0 +1,32 @@
1
+ {{- if .Values.autoscaling.enabled }}
2
+ apiVersion: autoscaling/v2
3
+ kind: HorizontalPodAutoscaler
4
+ metadata:
5
+ name: {{ include "{{ .Values.mcpServerName }}.fullname" . }}
6
+ labels:
7
+ {{- include "{{ .Values.mcpServerName }}.labels" . | nindent 4 }}
8
+ spec:
9
+ scaleTargetRef:
10
+ apiVersion: apps/v1
11
+ kind: Deployment
12
+ name: {{ include "{{ .Values.mcpServerName }}.fullname" . }}
13
+ minReplicas: {{ .Values.autoscaling.minReplicas }}
14
+ maxReplicas: {{ .Values.autoscaling.maxReplicas }}
15
+ metrics:
16
+ {{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17
+ - type: Resource
18
+ resource:
19
+ name: cpu
20
+ target:
21
+ type: Utilization
22
+ averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
23
+ {{- end }}
24
+ {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
25
+ - type: Resource
26
+ resource:
27
+ name: memory
28
+ target:
29
+ type: Utilization
30
+ averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
31
+ {{- end }}
32
+ {{- end }}
@@ -0,0 +1,21 @@
1
+ {{- if .Values.mcpServer.create }}
2
+ apiVersion: ark.mckinsey.com/v1alpha1
3
+ kind: MCPServer
4
+ metadata:
5
+ name: {{ .Values.mcpServer.name | default (include "{{ .Values.mcpServerName }}.fullname" .) }}
6
+ labels:
7
+ {{- include "{{ .Values.mcpServerName }}.labels" . | nindent 4 }}
8
+ spec:
9
+ address:
10
+ valueFrom:
11
+ serviceRef:
12
+ name: {{ include "{{ .Values.mcpServerName }}.fullname" . }}
13
+ port: http
14
+ {{- if .Values.mcpServer.path }}
15
+ path: {{ .Values.mcpServer.path }}
16
+ {{- end }}
17
+ transport: sse
18
+ {{- if .Values.mcpServer.description }}
19
+ description: {{ .Values.mcpServer.description | quote }}
20
+ {{- end }}
21
+ {{- end }}
@@ -0,0 +1,11 @@
1
+ {{- if and .Values.requiresAuth (not .Values.auth.existingSecret) }}
2
+ apiVersion: v1
3
+ kind: Secret
4
+ metadata:
5
+ name: {{ include "{{ .Values.mcpServerName }}.fullname" . }}
6
+ labels:
7
+ {{- include "{{ .Values.mcpServerName }}.labels" . | nindent 4 }}
8
+ type: Opaque
9
+ data:
10
+ {{ .Values.auth.existingSecretKey }}: {{ .Values.auth.token | b64enc }}
11
+ {{- end }}
@@ -0,0 +1,15 @@
1
+ apiVersion: v1
2
+ kind: Service
3
+ metadata:
4
+ name: {{ include "{{ .Values.mcpServerName }}.fullname" . }}
5
+ labels:
6
+ {{- include "{{ .Values.mcpServerName }}.labels" . | nindent 4 }}
7
+ spec:
8
+ type: {{ .Values.service.type }}
9
+ ports:
10
+ - port: {{ .Values.service.port }}
11
+ targetPort: {{ .Values.service.targetPort }}
12
+ protocol: TCP
13
+ name: http
14
+ selector:
15
+ {{- include "{{ .Values.mcpServerName }}.selectorLabels" . | nindent 4 }}
@@ -0,0 +1,13 @@
1
+ {{- if .Values.serviceAccount.create -}}
2
+ apiVersion: v1
3
+ kind: ServiceAccount
4
+ metadata:
5
+ name: {{ include "{{ .Values.mcpServerName }}.serviceAccountName" . }}
6
+ labels:
7
+ {{- include "{{ .Values.mcpServerName }}.labels" . | nindent 4 }}
8
+ {{- with .Values.serviceAccount.annotations }}
9
+ annotations:
10
+ {{- toYaml . | nindent 4 }}
11
+ {{- end }}
12
+ automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
13
+ {{- end }}
@@ -0,0 +1,84 @@
1
+ replicaCount: 1
2
+
3
+ image:
4
+ repository: {{ .Values.mcpServerName }}
5
+ pullPolicy: IfNotPresent
6
+ tag: "latest"
7
+
8
+ imagePullSecrets: []
9
+ nameOverride: ""
10
+ fullnameOverride: ""
11
+
12
+ serviceAccount:
13
+ create: true
14
+ automount: true
15
+ annotations: {}
16
+ name: ""
17
+
18
+ podAnnotations: {}
19
+ podLabels: {}
20
+
21
+ podSecurityContext:
22
+ fsGroup: 2000
23
+
24
+ securityContext:
25
+ capabilities:
26
+ drop:
27
+ - ALL
28
+ readOnlyRootFilesystem: true
29
+ runAsNonRoot: true
30
+ runAsUser: 1000
31
+
32
+ service:
33
+ type: ClusterIP
34
+ port: 8080
35
+ targetPort: 8080
36
+
37
+ resources:
38
+ limits:
39
+ cpu: 500m
40
+ memory: 512Mi
41
+ requests:
42
+ cpu: 100m
43
+ memory: 128Mi
44
+
45
+ livenessProbe:
46
+ tcpSocket:
47
+ port: http
48
+ readinessProbe:
49
+ tcpSocket:
50
+ port: http
51
+
52
+ autoscaling:
53
+ enabled: false
54
+ minReplicas: 1
55
+ maxReplicas: 100
56
+ targetCPUUtilizationPercentage: 80
57
+ # targetMemoryUtilizationPercentage: 80
58
+
59
+ nodeSelector: {}
60
+
61
+ tolerations: []
62
+
63
+ affinity: {}
64
+
65
+ {{- if .Values.requiresAuth }}
66
+ # Authentication configuration
67
+ auth:
68
+ token: ""
69
+ existingSecret: ""
70
+ existingSecretKey: "token"
71
+ {{- end }}
72
+
73
+ {{- if .Values.hasCustomConfig }}
74
+ # Custom configuration
75
+ config:
76
+ customValue: ""
77
+ {{- end }}
78
+
79
+ # MCP Server configuration
80
+ mcpServer:
81
+ create: true
82
+ name: ""
83
+ description: "{{ .Values.description }}"
84
+ path: "/mcp"
@@ -0,0 +1,74 @@
1
+ # Example values for {{ .Values.mcpServerName }} MCP Server
2
+
3
+ replicaCount: 2
4
+
5
+ image:
6
+ repository: {{ .Values.mcpServerName }}
7
+ pullPolicy: Always
8
+ tag: "v1.0.0"
9
+
10
+ service:
11
+ type: ClusterIP
12
+ port: 8080
13
+
14
+ resources:
15
+ limits:
16
+ cpu: 1000m
17
+ memory: 1Gi
18
+ requests:
19
+ cpu: 250m
20
+ memory: 256Mi
21
+
22
+ {{- if .Values.requiresAuth }}
23
+ # Authentication configuration
24
+ auth:
25
+ token: "your-auth-token-here"
26
+ # Or use existing secret:
27
+ # existingSecret: "my-auth-secret"
28
+ # existingSecretKey: "token"
29
+ {{- end }}
30
+
31
+ {{- if .Values.hasCustomConfig }}
32
+ # Custom configuration
33
+ config:
34
+ customValue: "custom-configuration-value"
35
+ {{- end }}
36
+
37
+ # MCP Server configuration
38
+ mcpServer:
39
+ create: true
40
+ name: "{{ .Values.mcpServerName }}-server"
41
+ description: "{{ .Values.description }}"
42
+ path: "/mcp"
43
+
44
+ # Enable autoscaling
45
+ autoscaling:
46
+ enabled: true
47
+ minReplicas: 2
48
+ maxReplicas: 10
49
+ targetCPUUtilizationPercentage: 70
50
+ targetMemoryUtilizationPercentage: 80
51
+
52
+ # Node selection
53
+ nodeSelector:
54
+ kubernetes.io/arch: amd64
55
+
56
+ # Tolerations
57
+ tolerations:
58
+ - key: "node-role.kubernetes.io/worker"
59
+ operator: "Exists"
60
+ effect: "NoSchedule"
61
+
62
+ # Affinity rules
63
+ affinity:
64
+ podAntiAffinity:
65
+ preferredDuringSchedulingIgnoredDuringExecution:
66
+ - weight: 100
67
+ podAffinityTerm:
68
+ labelSelector:
69
+ matchExpressions:
70
+ - key: app.kubernetes.io/name
71
+ operator: In
72
+ values:
73
+ - {{ .Values.mcpServerName }}
74
+ topologyKey: kubernetes.io/hostname