@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.
- package/README.md +53 -70
- package/dist/arkServices.d.ts +3 -27
- package/dist/arkServices.js +31 -3
- package/dist/arkServices.spec.js +118 -10
- package/dist/commands/chat/index.js +1 -2
- package/dist/commands/completion/index.js +0 -2
- package/dist/commands/generate/generators/project.js +33 -26
- package/dist/commands/generate/index.js +2 -2
- package/dist/commands/generate/templateDiscovery.js +13 -4
- package/dist/commands/install/index.js +49 -58
- package/dist/commands/models/create.d.ts +9 -1
- package/dist/commands/models/create.js +97 -90
- package/dist/commands/models/create.spec.js +9 -37
- package/dist/commands/models/index.js +8 -2
- package/dist/commands/models/index.spec.js +1 -1
- package/dist/commands/status/index.d.ts +3 -1
- package/dist/commands/status/index.js +54 -2
- package/dist/components/AsyncOperation.d.ts +54 -0
- package/dist/components/AsyncOperation.js +110 -0
- package/dist/components/ChatUI.js +39 -72
- package/dist/components/SelectMenu.d.ts +17 -0
- package/dist/components/SelectMenu.js +21 -0
- package/dist/components/StatusMessage.d.ts +20 -0
- package/dist/components/StatusMessage.js +13 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/arkApiClient.d.ts +1 -2
- package/dist/lib/arkApiClient.js +5 -6
- package/dist/lib/config.d.ts +4 -0
- package/dist/lib/config.js +9 -0
- package/dist/lib/nextSteps.js +1 -1
- package/dist/lib/nextSteps.spec.js +1 -1
- package/dist/lib/security.js +4 -0
- package/dist/lib/startup.js +6 -2
- package/dist/lib/startup.spec.js +1 -1
- package/dist/lib/timeout.d.ts +1 -0
- package/dist/lib/timeout.js +20 -0
- package/dist/lib/timeout.spec.d.ts +1 -0
- package/dist/lib/timeout.spec.js +14 -0
- package/dist/lib/waitForReady.d.ts +8 -0
- package/dist/lib/waitForReady.js +32 -0
- package/dist/lib/waitForReady.spec.d.ts +1 -0
- package/dist/lib/waitForReady.spec.js +104 -0
- package/dist/types/arkService.d.ts +27 -0
- package/dist/types/arkService.js +1 -0
- package/dist/ui/asyncOperations/connectingToArk.d.ts +15 -0
- package/dist/ui/asyncOperations/connectingToArk.js +63 -0
- package/package.json +7 -5
- package/templates/agent/agent.template.yaml +27 -0
- package/templates/marketplace/.editorconfig +24 -0
- package/templates/marketplace/.github/.keep +11 -0
- package/templates/marketplace/.github/workflows/.keep +16 -0
- package/templates/marketplace/.helmignore +23 -0
- package/templates/marketplace/.prettierrc.json +20 -0
- package/templates/marketplace/.yamllint.yml +53 -0
- package/templates/marketplace/README.md +197 -0
- package/templates/marketplace/agents/.keep +29 -0
- package/templates/marketplace/docs/.keep +19 -0
- package/templates/marketplace/mcp-servers/.keep +32 -0
- package/templates/marketplace/models/.keep +23 -0
- package/templates/marketplace/projects/.keep +43 -0
- package/templates/marketplace/queries/.keep +25 -0
- package/templates/marketplace/teams/.keep +29 -0
- package/templates/marketplace/tools/.keep +32 -0
- package/templates/marketplace/tools/examples/.keep +17 -0
- package/templates/mcp-server/Dockerfile +133 -0
- package/templates/mcp-server/Makefile +186 -0
- package/templates/mcp-server/README.md +178 -0
- package/templates/mcp-server/build.sh +76 -0
- package/templates/mcp-server/chart/Chart.yaml +22 -0
- package/templates/mcp-server/chart/templates/_helpers.tpl +62 -0
- package/templates/mcp-server/chart/templates/deployment.yaml +80 -0
- package/templates/mcp-server/chart/templates/hpa.yaml +32 -0
- package/templates/mcp-server/chart/templates/mcpserver.yaml +21 -0
- package/templates/mcp-server/chart/templates/secret.yaml +11 -0
- package/templates/mcp-server/chart/templates/service.yaml +15 -0
- package/templates/mcp-server/chart/templates/serviceaccount.yaml +13 -0
- package/templates/mcp-server/chart/values.yaml +84 -0
- package/templates/mcp-server/example-values.yaml +74 -0
- package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-agent.yaml +33 -0
- package/templates/mcp-server/examples/{{ .Values.mcpServerName }}-query.yaml +24 -0
- package/templates/models/azure.yaml +33 -0
- package/templates/models/claude.yaml +28 -0
- package/templates/models/gemini.yaml +28 -0
- package/templates/models/openai.yaml +39 -0
- package/templates/project/.editorconfig +24 -0
- package/templates/project/.helmignore +24 -0
- package/templates/project/.prettierrc.json +16 -0
- package/templates/project/.yamllint.yml +50 -0
- package/templates/project/Chart.yaml +19 -0
- package/templates/project/Makefile +360 -0
- package/templates/project/README.md +377 -0
- package/templates/project/agents/.keep +11 -0
- package/templates/project/docs/.keep +14 -0
- package/templates/project/mcp-servers/.keep +34 -0
- package/templates/project/models/.keep +17 -0
- package/templates/project/queries/.keep +11 -0
- package/templates/project/scripts/setup.sh +108 -0
- package/templates/project/teams/.keep +11 -0
- package/templates/project/templates/00-rbac.yaml +168 -0
- package/templates/project/templates/01-models.yaml +11 -0
- package/templates/project/templates/02-mcp-servers.yaml +22 -0
- package/templates/project/templates/03-tools.yaml +12 -0
- package/templates/project/templates/04-agents.yaml +12 -0
- package/templates/project/templates/05-teams.yaml +11 -0
- package/templates/project/templates/06-queries.yaml +11 -0
- package/templates/project/templates/_helpers.tpl +91 -0
- package/templates/project/tests/e2e/.keep +10 -0
- package/templates/project/tests/unit/.keep +10 -0
- package/templates/project/tools/.keep +25 -0
- package/templates/project/tools/example-tool.yaml.disabled +94 -0
- package/templates/project/tools/examples/data-tool/Dockerfile +32 -0
- package/templates/project/values.yaml +141 -0
- package/templates/query/query.template.yaml +13 -0
- package/templates/team/team.template.yaml +17 -0
- package/templates/tool/.python-version +1 -0
- package/templates/tool/Dockerfile +23 -0
- package/templates/tool/README.md +238 -0
- package/templates/tool/agent.yaml +19 -0
- package/templates/tool/deploy.sh +10 -0
- package/templates/tool/deployment/deployment.yaml +31 -0
- package/templates/tool/deployment/kustomization.yaml +7 -0
- package/templates/tool/deployment/mcpserver.yaml +12 -0
- package/templates/tool/deployment/service.yaml +12 -0
- package/templates/tool/deployment/serviceaccount.yaml +8 -0
- package/templates/tool/deployment/values.yaml +3 -0
- package/templates/tool/pyproject.toml +9 -0
- package/templates/tool/src/main.py +36 -0
- package/templates/tool/uv.lock +498 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
RBAC - Deploy FIRST to ensure permissions are available
|
|
3
|
+
Creates ServiceAccount and necessary RoleBindings for ARK resources
|
|
4
|
+
*/}}
|
|
5
|
+
{{- if .Values.serviceAccount.create }}
|
|
6
|
+
---
|
|
7
|
+
apiVersion: v1
|
|
8
|
+
kind: ServiceAccount
|
|
9
|
+
metadata:
|
|
10
|
+
name: {{ include "{{ .Values.project.name }}.serviceAccountName" . }}
|
|
11
|
+
annotations:
|
|
12
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
13
|
+
"helm.sh/hook-weight": "-20"
|
|
14
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
15
|
+
{{- with .Values.serviceAccount.annotations }}
|
|
16
|
+
{{- toYaml . | nindent 4 }}
|
|
17
|
+
{{- end }}
|
|
18
|
+
labels:
|
|
19
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
20
|
+
{{- end }}
|
|
21
|
+
---
|
|
22
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
23
|
+
kind: RoleBinding
|
|
24
|
+
metadata:
|
|
25
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-default-permissions
|
|
26
|
+
annotations:
|
|
27
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
28
|
+
"helm.sh/hook-weight": "-19"
|
|
29
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
30
|
+
labels:
|
|
31
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
32
|
+
subjects:
|
|
33
|
+
- kind: ServiceAccount
|
|
34
|
+
name: default
|
|
35
|
+
namespace: {{ .Release.Namespace }}
|
|
36
|
+
roleRef:
|
|
37
|
+
kind: ClusterRole
|
|
38
|
+
name: agent-viewer-role
|
|
39
|
+
apiGroup: rbac.authorization.k8s.io
|
|
40
|
+
---
|
|
41
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
42
|
+
kind: RoleBinding
|
|
43
|
+
metadata:
|
|
44
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-default-team-permissions
|
|
45
|
+
annotations:
|
|
46
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
47
|
+
"helm.sh/hook-weight": "-19"
|
|
48
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
49
|
+
labels:
|
|
50
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
51
|
+
subjects:
|
|
52
|
+
- kind: ServiceAccount
|
|
53
|
+
name: default
|
|
54
|
+
namespace: {{ .Release.Namespace }}
|
|
55
|
+
roleRef:
|
|
56
|
+
kind: ClusterRole
|
|
57
|
+
name: team-viewer-role
|
|
58
|
+
apiGroup: rbac.authorization.k8s.io
|
|
59
|
+
---
|
|
60
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
61
|
+
kind: RoleBinding
|
|
62
|
+
metadata:
|
|
63
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-default-model-permissions
|
|
64
|
+
annotations:
|
|
65
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
66
|
+
"helm.sh/hook-weight": "-19"
|
|
67
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
68
|
+
labels:
|
|
69
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
70
|
+
subjects:
|
|
71
|
+
- kind: ServiceAccount
|
|
72
|
+
name: default
|
|
73
|
+
namespace: {{ .Release.Namespace }}
|
|
74
|
+
roleRef:
|
|
75
|
+
kind: ClusterRole
|
|
76
|
+
name: model-viewer-role
|
|
77
|
+
apiGroup: rbac.authorization.k8s.io
|
|
78
|
+
---
|
|
79
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
80
|
+
kind: Role
|
|
81
|
+
metadata:
|
|
82
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-secret-reader
|
|
83
|
+
annotations:
|
|
84
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
85
|
+
"helm.sh/hook-weight": "-19"
|
|
86
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
87
|
+
labels:
|
|
88
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
89
|
+
rules:
|
|
90
|
+
- apiGroups: [""]
|
|
91
|
+
resources: ["secrets"]
|
|
92
|
+
verbs: ["get", "list", "watch"]
|
|
93
|
+
---
|
|
94
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
95
|
+
kind: RoleBinding
|
|
96
|
+
metadata:
|
|
97
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-default-secret-permissions
|
|
98
|
+
annotations:
|
|
99
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
100
|
+
"helm.sh/hook-weight": "-19"
|
|
101
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
102
|
+
labels:
|
|
103
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
104
|
+
subjects:
|
|
105
|
+
- kind: ServiceAccount
|
|
106
|
+
name: default
|
|
107
|
+
namespace: {{ .Release.Namespace }}
|
|
108
|
+
roleRef:
|
|
109
|
+
kind: Role
|
|
110
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-secret-reader
|
|
111
|
+
apiGroup: rbac.authorization.k8s.io
|
|
112
|
+
---
|
|
113
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
114
|
+
kind: RoleBinding
|
|
115
|
+
metadata:
|
|
116
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-agent-viewer
|
|
117
|
+
annotations:
|
|
118
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
119
|
+
"helm.sh/hook-weight": "-19"
|
|
120
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
121
|
+
labels:
|
|
122
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
123
|
+
subjects:
|
|
124
|
+
- kind: ServiceAccount
|
|
125
|
+
name: {{ include "{{ .Values.project.name }}.serviceAccountName" . }}
|
|
126
|
+
namespace: {{ .Release.Namespace }}
|
|
127
|
+
roleRef:
|
|
128
|
+
kind: ClusterRole
|
|
129
|
+
name: agent-viewer-role
|
|
130
|
+
apiGroup: rbac.authorization.k8s.io
|
|
131
|
+
---
|
|
132
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
133
|
+
kind: RoleBinding
|
|
134
|
+
metadata:
|
|
135
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-team-viewer
|
|
136
|
+
annotations:
|
|
137
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
138
|
+
"helm.sh/hook-weight": "-19"
|
|
139
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
140
|
+
labels:
|
|
141
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
142
|
+
subjects:
|
|
143
|
+
- kind: ServiceAccount
|
|
144
|
+
name: {{ include "{{ .Values.project.name }}.serviceAccountName" . }}
|
|
145
|
+
namespace: {{ .Release.Namespace }}
|
|
146
|
+
roleRef:
|
|
147
|
+
kind: ClusterRole
|
|
148
|
+
name: team-viewer-role
|
|
149
|
+
apiGroup: rbac.authorization.k8s.io
|
|
150
|
+
---
|
|
151
|
+
apiVersion: rbac.authorization.k8s.io/v1
|
|
152
|
+
kind: RoleBinding
|
|
153
|
+
metadata:
|
|
154
|
+
name: {{ include "{{ .Values.project.name }}.fullname" . }}-query-admin
|
|
155
|
+
annotations:
|
|
156
|
+
"helm.sh/hook": pre-install,pre-upgrade
|
|
157
|
+
"helm.sh/hook-weight": "-19"
|
|
158
|
+
"helm.sh/hook-delete-policy": before-hook-creation
|
|
159
|
+
labels:
|
|
160
|
+
{{- include "{{ .Values.project.name }}.labels" . | nindent 4 }}
|
|
161
|
+
subjects:
|
|
162
|
+
- kind: ServiceAccount
|
|
163
|
+
name: {{ include "{{ .Values.project.name }}.serviceAccountName" . }}
|
|
164
|
+
namespace: {{ .Release.Namespace }}
|
|
165
|
+
roleRef:
|
|
166
|
+
kind: ClusterRole
|
|
167
|
+
name: query-admin-role
|
|
168
|
+
apiGroup: rbac.authorization.k8s.io
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Models - Deploy FIRST using pre-install hook
|
|
3
|
+
These resources are deployed before everything else and must be ready before agents can be created
|
|
4
|
+
*/}}
|
|
5
|
+
{{- if not .Values.excludeResources }}
|
|
6
|
+
{{- range $path, $_ := .Files.Glob "models/*.yaml" }}
|
|
7
|
+
---
|
|
8
|
+
{{- $content := $.Files.Get $path }}
|
|
9
|
+
{{- $content | replace "metadata:" "metadata:\n annotations:\n \"helm.sh/hook\": pre-install,pre-upgrade\n \"helm.sh/hook-weight\": \"-10\"\n \"helm.sh/hook-delete-policy\": before-hook-creation" }}
|
|
10
|
+
{{- end }}
|
|
11
|
+
{{- end }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
MCP Servers - Deploy after models but before agents
|
|
3
|
+
These resources provide tools and services that agents and teams can use
|
|
4
|
+
They should be deployed before agents so agents can reference them
|
|
5
|
+
*/}}
|
|
6
|
+
{{- if not .Values.excludeResources }}
|
|
7
|
+
{{- range $path, $_ := .Files.Glob "mcp-servers/*/chart/templates/mcpserver.yaml" }}
|
|
8
|
+
---
|
|
9
|
+
{{- $content := $.Files.Get $path }}
|
|
10
|
+
{{- $content | replace "metadata:" "metadata:\n annotations:\n \"helm.sh/hook\": pre-install,pre-upgrade\n \"helm.sh/hook-weight\": \"-5\"\n \"helm.sh/hook-delete-policy\": before-hook-creation" }}
|
|
11
|
+
{{- end }}
|
|
12
|
+
{{/*
|
|
13
|
+
Also include any standalone MCP server definitions in the mcp-servers directory
|
|
14
|
+
*/}}
|
|
15
|
+
{{- range $path, $_ := .Files.Glob "mcp-servers/*.yaml" }}
|
|
16
|
+
{{- $content := $.Files.Get $path }}
|
|
17
|
+
{{- if contains "kind: MCPServer" $content }}
|
|
18
|
+
---
|
|
19
|
+
{{- $content | replace "metadata:" "metadata:\n annotations:\n \"helm.sh/hook\": pre-install,pre-upgrade\n \"helm.sh/hook-weight\": \"-5\"\n \"helm.sh/hook-delete-policy\": before-hook-creation" }}
|
|
20
|
+
{{- end }}
|
|
21
|
+
{{- end }}
|
|
22
|
+
{{- end }}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Tools - Deploy after models but before agents
|
|
3
|
+
These resources provide custom tools that agents can use
|
|
4
|
+
They should be deployed before agents so agents can reference them
|
|
5
|
+
*/}}
|
|
6
|
+
{{- if not .Values.excludeResources }}
|
|
7
|
+
{{- range $path, $_ := .Files.Glob "tools/*.yaml" }}
|
|
8
|
+
---
|
|
9
|
+
{{- $content := $.Files.Get $path }}
|
|
10
|
+
{{- $content | replace "metadata:" "metadata:\n annotations:\n \"helm.sh/hook\": pre-install,pre-upgrade\n \"helm.sh/hook-weight\": \"-3\"\n \"helm.sh/hook-delete-policy\": before-hook-creation" }}
|
|
11
|
+
{{- end }}
|
|
12
|
+
{{- end }}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Agents - Deploy after models, MCP servers, and tools are ready
|
|
3
|
+
These resources depend on models and can reference MCP servers and tools
|
|
4
|
+
Agents must be ready before teams and queries can reference them
|
|
5
|
+
*/}}
|
|
6
|
+
{{- if not .Values.excludeResources }}
|
|
7
|
+
{{- range $path, $_ := .Files.Glob "agents/*.yaml" }}
|
|
8
|
+
---
|
|
9
|
+
{{- $content := $.Files.Get $path }}
|
|
10
|
+
{{- $content | replace "metadata:" "metadata:\n annotations:\n \"helm.sh/hook\": pre-install,pre-upgrade\n \"helm.sh/hook-weight\": \"0\"\n \"helm.sh/hook-delete-policy\": before-hook-creation" }}
|
|
11
|
+
{{- end }}
|
|
12
|
+
{{- end }}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Teams - Deploy after agents are ready
|
|
3
|
+
Teams depend on agents and should be created after agents but before queries
|
|
4
|
+
*/}}
|
|
5
|
+
{{- if not .Values.excludeResources }}
|
|
6
|
+
{{- range $path, $_ := .Files.Glob "teams/*.yaml" }}
|
|
7
|
+
---
|
|
8
|
+
{{- $content := $.Files.Get $path }}
|
|
9
|
+
{{- $content | replace "metadata:" "metadata:\n annotations:\n \"helm.sh/hook\": post-install,post-upgrade\n \"helm.sh/hook-weight\": \"5\"" }}
|
|
10
|
+
{{- end }}
|
|
11
|
+
{{- end }}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Queries - Deploy LAST after teams and agents are ready
|
|
3
|
+
Queries can reference both teams and agents, so they deploy last
|
|
4
|
+
*/}}
|
|
5
|
+
{{- if not .Values.excludeResources }}
|
|
6
|
+
{{- range $path, $_ := .Files.Glob "queries/*.yaml" }}
|
|
7
|
+
---
|
|
8
|
+
{{- $content := $.Files.Get $path }}
|
|
9
|
+
{{- $content | replace "metadata:" "metadata:\n annotations:\n \"helm.sh/hook\": post-install,post-upgrade\n \"helm.sh/hook-weight\": \"10\"" }}
|
|
10
|
+
{{- end }}
|
|
11
|
+
{{- end }}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{{/*
|
|
2
|
+
Expand the name of the chart.
|
|
3
|
+
*/}}
|
|
4
|
+
{{- define "{{ .Values.project.name }}.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.project.name }}.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.project.name }}.chart" -}}
|
|
30
|
+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
31
|
+
{{- end }}
|
|
32
|
+
|
|
33
|
+
{{/*
|
|
34
|
+
Common labels
|
|
35
|
+
*/}}
|
|
36
|
+
{{- define "{{ .Values.project.name }}.labels" -}}
|
|
37
|
+
helm.sh/chart: {{ include "{{ .Values.project.name }}.chart" . }}
|
|
38
|
+
{{ include "{{ .Values.project.name }}.selectorLabels" . }}
|
|
39
|
+
{{- if .Chart.AppVersion }}
|
|
40
|
+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
41
|
+
{{- end }}
|
|
42
|
+
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
43
|
+
project: {{ .Values.project.name }}
|
|
44
|
+
{{- with .Values.labels }}
|
|
45
|
+
{{ toYaml . }}
|
|
46
|
+
{{- end }}
|
|
47
|
+
{{- end }}
|
|
48
|
+
|
|
49
|
+
{{/*
|
|
50
|
+
Selector labels
|
|
51
|
+
*/}}
|
|
52
|
+
{{- define "{{ .Values.project.name }}.selectorLabels" -}}
|
|
53
|
+
app.kubernetes.io/name: {{ include "{{ .Values.project.name }}.name" . }}
|
|
54
|
+
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
55
|
+
{{- end }}
|
|
56
|
+
|
|
57
|
+
{{/*
|
|
58
|
+
Create the name of the service account to use
|
|
59
|
+
*/}}
|
|
60
|
+
{{- define "{{ .Values.project.name }}.serviceAccountName" -}}
|
|
61
|
+
{{- if .Values.serviceAccount.create }}
|
|
62
|
+
{{- default (include "{{ .Values.project.name }}.fullname" .) .Values.serviceAccount.name }}
|
|
63
|
+
{{- else }}
|
|
64
|
+
{{- default "default" .Values.serviceAccount.name }}
|
|
65
|
+
{{- end }}
|
|
66
|
+
{{- end }}
|
|
67
|
+
|
|
68
|
+
{{/*
|
|
69
|
+
Generate image name
|
|
70
|
+
*/}}
|
|
71
|
+
{{- define "{{ .Values.project.name }}.image" -}}
|
|
72
|
+
{{- $registry := .Values.image.registry -}}
|
|
73
|
+
{{- $repository := .repository -}}
|
|
74
|
+
{{- $tag := .Values.image.tag -}}
|
|
75
|
+
{{- printf "%s/%s-%s:%s" $registry .Values.project.name $repository $tag }}
|
|
76
|
+
{{- end }}
|
|
77
|
+
|
|
78
|
+
{{/*
|
|
79
|
+
Generate model reference
|
|
80
|
+
*/}}
|
|
81
|
+
{{- define "{{ .Values.project.name }}.modelRef" -}}
|
|
82
|
+
{{- if .Values.models.azure.enabled }}
|
|
83
|
+
{{- .Values.models.azure.name }}
|
|
84
|
+
{{- else if .Values.models.openai.enabled }}
|
|
85
|
+
{{- .Values.models.openai.name }}
|
|
86
|
+
{{- else if .Values.models.anthropic.enabled }}
|
|
87
|
+
{{- .Values.models.anthropic.name }}
|
|
88
|
+
{{- else }}
|
|
89
|
+
default
|
|
90
|
+
{{- end }}
|
|
91
|
+
{{- end }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Tools Directory
|
|
2
|
+
|
|
3
|
+
Add your custom tools here as Kubernetes YAML files.
|
|
4
|
+
|
|
5
|
+
Each tool should be defined as a YAML file containing the necessary Kubernetes resources:
|
|
6
|
+
- Deployment
|
|
7
|
+
- Service
|
|
8
|
+
- MCPServer (for MCP integration)
|
|
9
|
+
|
|
10
|
+
Example structure:
|
|
11
|
+
```
|
|
12
|
+
tools/
|
|
13
|
+
├── my-tool.yaml # Complete tool definition
|
|
14
|
+
├── data-processor.yaml # Another tool
|
|
15
|
+
└── examples/ # Example implementations
|
|
16
|
+
└── data-tool/
|
|
17
|
+
├── Dockerfile
|
|
18
|
+
├── main.py
|
|
19
|
+
└── requirements.txt
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Tool YAML files will be automatically deployed by the Helm chart.
|
|
23
|
+
|
|
24
|
+
For complex tools that need their own Helm charts and independent lifecycle,
|
|
25
|
+
use `ark generate mcp-server` in the `mcp-servers/` directory instead.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Example Tool Definition
|
|
2
|
+
# Rename this file to example-tool.yaml to enable it
|
|
3
|
+
|
|
4
|
+
apiVersion: apps/v1
|
|
5
|
+
kind: Deployment
|
|
6
|
+
metadata:
|
|
7
|
+
name: {{ include "{{ .Values.projectName }}.fullname" . }}-example-tool
|
|
8
|
+
labels:
|
|
9
|
+
{{- include "{{ .Values.projectName }}.labels" . | nindent 4 }}
|
|
10
|
+
component: tool
|
|
11
|
+
tool: example-tool
|
|
12
|
+
spec:
|
|
13
|
+
replicas: 1
|
|
14
|
+
selector:
|
|
15
|
+
matchLabels:
|
|
16
|
+
{{- include "{{ .Values.projectName }}.selectorLabels" . | nindent 6 }}
|
|
17
|
+
component: tool
|
|
18
|
+
tool: example-tool
|
|
19
|
+
template:
|
|
20
|
+
metadata:
|
|
21
|
+
labels:
|
|
22
|
+
{{- include "{{ .Values.projectName }}.selectorLabels" . | nindent 8 }}
|
|
23
|
+
component: tool
|
|
24
|
+
tool: example-tool
|
|
25
|
+
spec:
|
|
26
|
+
{{- with .Values.security.podSecurityContext }}
|
|
27
|
+
securityContext:
|
|
28
|
+
{{- toYaml . | nindent 8 }}
|
|
29
|
+
{{- end }}
|
|
30
|
+
containers:
|
|
31
|
+
- name: example-tool
|
|
32
|
+
image: "{{ .Values.image.registry }}/{{ .Values.project.name }}-example-tool:{{ .Values.image.tag }}"
|
|
33
|
+
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
34
|
+
ports:
|
|
35
|
+
- containerPort: 8000
|
|
36
|
+
name: http
|
|
37
|
+
protocol: TCP
|
|
38
|
+
{{- with .Values.security.securityContext }}
|
|
39
|
+
securityContext:
|
|
40
|
+
{{- toYaml . | nindent 10 }}
|
|
41
|
+
{{- end }}
|
|
42
|
+
resources:
|
|
43
|
+
limits:
|
|
44
|
+
memory: "512Mi"
|
|
45
|
+
cpu: "500m"
|
|
46
|
+
requests:
|
|
47
|
+
memory: "256Mi"
|
|
48
|
+
cpu: "250m"
|
|
49
|
+
env:
|
|
50
|
+
- name: PORT
|
|
51
|
+
value: "8000"
|
|
52
|
+
- name: TOOL_NAME
|
|
53
|
+
value: "example-tool"
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
apiVersion: v1
|
|
57
|
+
kind: Service
|
|
58
|
+
metadata:
|
|
59
|
+
name: {{ include "{{ .Values.projectName }}.fullname" . }}-example-tool
|
|
60
|
+
labels:
|
|
61
|
+
{{- include "{{ .Values.projectName }}.labels" . | nindent 4 }}
|
|
62
|
+
component: tool
|
|
63
|
+
tool: example-tool
|
|
64
|
+
spec:
|
|
65
|
+
type: ClusterIP
|
|
66
|
+
ports:
|
|
67
|
+
- port: 8000
|
|
68
|
+
targetPort: http
|
|
69
|
+
protocol: TCP
|
|
70
|
+
name: http
|
|
71
|
+
selector:
|
|
72
|
+
{{- include "{{ .Values.projectName }}.selectorLabels" . | nindent 4 }}
|
|
73
|
+
component: tool
|
|
74
|
+
tool: example-tool
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
apiVersion: ark.mckinsey.com/v1alpha1
|
|
78
|
+
kind: MCPServer
|
|
79
|
+
metadata:
|
|
80
|
+
name: example-tool
|
|
81
|
+
labels:
|
|
82
|
+
{{- include "{{ .Values.projectName }}.labels" . | nindent 4 }}
|
|
83
|
+
component: mcpserver
|
|
84
|
+
tool: example-tool
|
|
85
|
+
spec:
|
|
86
|
+
address:
|
|
87
|
+
valueFrom:
|
|
88
|
+
serviceRef:
|
|
89
|
+
name: {{ include "{{ .Values.projectName }}.fullname" . }}-example-tool
|
|
90
|
+
port: 8000
|
|
91
|
+
path: /mcp
|
|
92
|
+
transport: sse
|
|
93
|
+
timeout: 30s
|
|
94
|
+
description: "Example tool for demonstration purposes"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
FROM python:3.11-slim
|
|
2
|
+
|
|
3
|
+
# Set working directory
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
|
|
6
|
+
# Install system dependencies (none needed for this tool)
|
|
7
|
+
# RUN apt-get update && apt-get install -y curl \
|
|
8
|
+
# && rm -rf /var/lib/apt/lists/*
|
|
9
|
+
|
|
10
|
+
# Copy requirements
|
|
11
|
+
COPY requirements.txt .
|
|
12
|
+
|
|
13
|
+
# Install Python dependencies
|
|
14
|
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
15
|
+
|
|
16
|
+
# Copy application code
|
|
17
|
+
COPY main.py .
|
|
18
|
+
|
|
19
|
+
# Create non-root user
|
|
20
|
+
RUN groupadd -r appuser && useradd -r -g appuser appuser
|
|
21
|
+
RUN chown -R appuser:appuser /app
|
|
22
|
+
USER appuser
|
|
23
|
+
|
|
24
|
+
# Expose port
|
|
25
|
+
EXPOSE 8000
|
|
26
|
+
|
|
27
|
+
# Health check
|
|
28
|
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
29
|
+
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
|
|
30
|
+
|
|
31
|
+
# Run the application
|
|
32
|
+
CMD ["python", "main.py", "--port", "8000"]
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Default values for {{ .Values.projectName }}
|
|
2
|
+
# This is a YAML-formatted file.
|
|
3
|
+
# Declare variables to be passed into your templates.
|
|
4
|
+
|
|
5
|
+
# Project configuration
|
|
6
|
+
project:
|
|
7
|
+
name: {{ .Values.projectName }}
|
|
8
|
+
namespace: {{ .Values.namespace }}
|
|
9
|
+
|
|
10
|
+
# Image configuration
|
|
11
|
+
image:
|
|
12
|
+
registry: localhost:5000
|
|
13
|
+
tag: latest
|
|
14
|
+
pullPolicy: IfNotPresent
|
|
15
|
+
|
|
16
|
+
# Model configurations
|
|
17
|
+
# Models are deployed from the models/ directory
|
|
18
|
+
# Edit files in models/ to configure your model providers
|
|
19
|
+
|
|
20
|
+
# Agent configurations
|
|
21
|
+
# Agents are deployed from the agents/ directory
|
|
22
|
+
# Edit files in agents/ to configure your agents
|
|
23
|
+
|
|
24
|
+
# Team configurations
|
|
25
|
+
# Teams are deployed from the teams/ directory
|
|
26
|
+
# Edit files in teams/ to configure your teams
|
|
27
|
+
|
|
28
|
+
# Query configurations
|
|
29
|
+
# Queries are deployed from the queries/ directory
|
|
30
|
+
# Edit files in queries/ to configure your queries
|
|
31
|
+
|
|
32
|
+
# Tools configuration
|
|
33
|
+
# Tools are deployed from the tools/ directory as YAML files
|
|
34
|
+
# Each .yaml file in tools/ is automatically deployed
|
|
35
|
+
|
|
36
|
+
# MCP Servers configuration
|
|
37
|
+
# MCP servers are deployed from the mcp-servers/ directory
|
|
38
|
+
# Use 'ark generate mcp-server <name>' to create new MCP servers
|
|
39
|
+
|
|
40
|
+
# Memory configuration
|
|
41
|
+
memory:
|
|
42
|
+
enabled: true
|
|
43
|
+
name: postgres-memory
|
|
44
|
+
type: postgres
|
|
45
|
+
url: "http://postgres-memory:8080"
|
|
46
|
+
|
|
47
|
+
# Security
|
|
48
|
+
security:
|
|
49
|
+
# Pod security context
|
|
50
|
+
podSecurityContext:
|
|
51
|
+
runAsNonRoot: true
|
|
52
|
+
runAsUser: 1000
|
|
53
|
+
fsGroup: 2000
|
|
54
|
+
|
|
55
|
+
# Container security context
|
|
56
|
+
securityContext:
|
|
57
|
+
allowPrivilegeEscalation: false
|
|
58
|
+
readOnlyRootFilesystem: true
|
|
59
|
+
runAsNonRoot: true
|
|
60
|
+
runAsUser: 1000
|
|
61
|
+
capabilities:
|
|
62
|
+
drop:
|
|
63
|
+
- ALL
|
|
64
|
+
|
|
65
|
+
# Service configuration
|
|
66
|
+
service:
|
|
67
|
+
type: ClusterIP
|
|
68
|
+
port: 8000
|
|
69
|
+
targetPort: 8000
|
|
70
|
+
|
|
71
|
+
# Ingress configuration
|
|
72
|
+
ingress:
|
|
73
|
+
enabled: false
|
|
74
|
+
className: ""
|
|
75
|
+
annotations: {}
|
|
76
|
+
hosts:
|
|
77
|
+
- host: {{ .Values.projectName }}.local
|
|
78
|
+
paths:
|
|
79
|
+
- path: /
|
|
80
|
+
pathType: Prefix
|
|
81
|
+
tls: []
|
|
82
|
+
|
|
83
|
+
# Resource defaults
|
|
84
|
+
resources:
|
|
85
|
+
limits:
|
|
86
|
+
memory: "1Gi"
|
|
87
|
+
cpu: "1000m"
|
|
88
|
+
requests:
|
|
89
|
+
memory: "512Mi"
|
|
90
|
+
cpu: "500m"
|
|
91
|
+
|
|
92
|
+
# Node selection
|
|
93
|
+
nodeSelector: {}
|
|
94
|
+
tolerations: []
|
|
95
|
+
affinity: {}
|
|
96
|
+
|
|
97
|
+
# Monitoring
|
|
98
|
+
monitoring:
|
|
99
|
+
enabled: false
|
|
100
|
+
serviceMonitor:
|
|
101
|
+
enabled: false
|
|
102
|
+
interval: 30s
|
|
103
|
+
|
|
104
|
+
# Logging
|
|
105
|
+
logging:
|
|
106
|
+
level: INFO
|
|
107
|
+
format: json
|
|
108
|
+
|
|
109
|
+
# Environment variables
|
|
110
|
+
env: {}
|
|
111
|
+
|
|
112
|
+
# Additional labels
|
|
113
|
+
labels: {}
|
|
114
|
+
|
|
115
|
+
# Additional annotations
|
|
116
|
+
annotations: {}
|
|
117
|
+
|
|
118
|
+
# Service Account configuration
|
|
119
|
+
serviceAccount:
|
|
120
|
+
# Specifies whether a service account should be created
|
|
121
|
+
create: true
|
|
122
|
+
# Annotations to add to the service account
|
|
123
|
+
annotations: {}
|
|
124
|
+
# The name of the service account to use.
|
|
125
|
+
# If not set and create is true, a name is generated using the fullname template
|
|
126
|
+
name: ""
|
|
127
|
+
|
|
128
|
+
# Custom secrets (will be created)
|
|
129
|
+
secrets:
|
|
130
|
+
{}
|
|
131
|
+
# example-secret:
|
|
132
|
+
# data:
|
|
133
|
+
# key: value
|
|
134
|
+
|
|
135
|
+
# Custom config maps
|
|
136
|
+
configMaps:
|
|
137
|
+
{}
|
|
138
|
+
# example-config:
|
|
139
|
+
# data:
|
|
140
|
+
# config.yaml: |
|
|
141
|
+
# key: value
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apiVersion: ark.mckinsey.com/v1alpha1
|
|
2
|
+
kind: Query
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{ .Values.queryName }}-query
|
|
5
|
+
labels:
|
|
6
|
+
project: {{ .Values.projectName }}
|
|
7
|
+
type: sample
|
|
8
|
+
target: {{ .Values.targetType }}
|
|
9
|
+
spec:
|
|
10
|
+
input: "{{ .Values.inputMessage }}"
|
|
11
|
+
targets:
|
|
12
|
+
- type: {{ .Values.targetType }}
|
|
13
|
+
name: {{ .Values.targetName }}-{{ .Values.targetType }}
|