Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .claude/worktrees/agent-aa1cfa7f
Submodule agent-aa1cfa7f deleted from 5bb7e5
1 change: 0 additions & 1 deletion .claude/worktrees/k8s-mcp-docs
Submodule k8s-mcp-docs deleted from c030c2
1 change: 0 additions & 1 deletion .claude/worktrees/litellm-1.83.3-bump
Submodule litellm-1.83.3-bump deleted from e270ea
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ tmp/
config.yaml
checks.yaml
.claude/skills/dev-skills/
.claude/worktrees/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
34 changes: 34 additions & 0 deletions helm/holmes/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,37 @@ true
false
{{- end -}}
{{- end -}}

{{/*
Common annotations to apply to all objects created by this chart.
Usage: {{- include "holmes.commonAnnotations" . | nindent 4 }}
*/}}
{{- define "holmes.commonAnnotations" -}}
{{- range $key, $val := .Values.commonAnnotations }}
{{ $key | toYaml }}: {{ $val | toString | toYaml }}
{{- end }}
{{- end }}

{{/*
Common labels to apply to all objects created by this chart.
Reserved keys used in selector.matchLabels are rejected to prevent
Deployment reconciliation failures caused by label divergence.
Usage: {{- include "holmes.commonLabels" . | nindent 4 }}
*/}}
{{- define "holmes.commonLabels" -}}
{{- $reserved := list
"app"
"app.kubernetes.io/name"
"app.kubernetes.io/instance"
"app.kubernetes.io/component"
"app.kubernetes.io/part-of"
"app.kubernetes.io/managed-by" -}}
{{- with .Values.commonLabels }}
{{- range $key, $val := . }}
{{- if has $key $reserved }}
{{- fail (printf "commonLabels: key %q is reserved and cannot be overridden" $key) }}
{{- end }}
{{ $key | toYaml }}: {{ $val | toString | toYaml }}
{{- end }}
{{- end }}
{{- end }}
18 changes: 16 additions & 2 deletions helm/holmes/templates/holmes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- if (not .Values.autoscaling.enabled) }}
replicas: {{ .Values.replicas }}
Expand All @@ -21,12 +26,16 @@ spec:
metadata:
labels:
app: holmes
{{- include "holmes.commonLabels" . | nindent 8 }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
annotations:
# checksum annotation triggering pod reload when .Values.toolsets changes by helm upgrade
checksum/toolset-config: {{ list .Values.toolsets .Values.modelList .Values.mcp_servers | toYaml | sha256sum }}
{{- with (include "holmes.commonAnnotations" .) }}
{{- . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
# checksum annotation triggering pod reload when .Values.toolsets changes by helm upgrade
checksum/toolset-config: {{ list .Values.toolsets .Values.modelList .Values.mcp_servers | toYaml | sha256sum }}
spec:
serviceAccountName: {{ include "holmes.serviceAccountName" . }}
{{- if .Values.imagePullSecrets }}
Expand Down Expand Up @@ -181,6 +190,11 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
selector:
app: holmes
Expand Down
41 changes: 37 additions & 4 deletions helm/holmes/templates/holmesgpt-service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-holmes-cluster-role
namespace : {{ .Release.Namespace }}
{{- with (include "holmes.commonLabels" .) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
rules:
{{- if .Values.customClusterRoleRules }}
{{ toYaml .Values.customClusterRoleRules | indent 2 }}
Expand Down Expand Up @@ -412,11 +420,20 @@ kind: ServiceAccount
metadata:
name: {{ include "holmes.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.serviceAccount.annotations }}
annotations:
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4}}
{{- with (include "holmes.commonLabels" .) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- $ann := dict -}}
{{- with (include "holmes.commonAnnotations" . | fromYaml) -}}
{{- $ann = mergeOverwrite $ann . -}}
{{- end -}}
{{- with .Values.serviceAccount.annotations -}}
{{- $ann = mergeOverwrite $ann . -}}
{{- end -}}
{{- if $ann }}
annotations:
{{- toYaml $ann | nindent 4 }}
{{- end }}
{{- if .Values.serviceAccount.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -427,6 +444,14 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}-holmes-cluster-role-binding
{{- with (include "holmes.commonLabels" .) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand All @@ -441,6 +466,14 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-holmes-cluster-monitoring
{{- with (include "holmes.commonLabels" .) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "holmes.serviceAccountName" . }}
Expand Down
5 changes: 5 additions & 0 deletions helm/holmes/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
31 changes: 29 additions & 2 deletions helm/holmes/templates/mcp-servers/aws/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
data:
AWS_REGION: {{ .Values.mcpAddons.aws.config.region | quote }}
READ_OPERATIONS_ONLY: {{ .Values.mcpAddons.aws.config.readOnlyMode | quote }}
Expand Down Expand Up @@ -40,9 +45,17 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- if and .Values.mcpAddons.aws.serviceAccount.annotations (not (and .Values.mcpAddons.aws.multiAccount.enabled .Values.mcpAddons.aws.multiAccount.profiles)) }}
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- $ann := dict -}}
{{- with (include "holmes.commonAnnotations" . | fromYaml) -}}
{{- $ann = mergeOverwrite $ann . -}}
{{- end -}}
{{- if and .Values.mcpAddons.aws.serviceAccount.annotations (not (and .Values.mcpAddons.aws.multiAccount.enabled .Values.mcpAddons.aws.multiAccount.profiles)) -}}
{{- $ann = mergeOverwrite $ann .Values.mcpAddons.aws.serviceAccount.annotations -}}
{{- end -}}
{{- if $ann }}
annotations:
{{- toYaml .Values.mcpAddons.aws.serviceAccount.annotations | nindent 4 }}
{{- toYaml $ann | nindent 4 }}
{{- end }}
{{- end }}
---
Expand All @@ -57,6 +70,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
Expand All @@ -72,7 +90,11 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 8 }}
annotations:
{{- with (include "holmes.commonAnnotations" .) }}
{{- . | nindent 8 }}
{{- end }}
checksum/config: {{ .Values.mcpAddons.aws | toYaml | sha256sum }}
spec:
serviceAccountName: {{ .Values.mcpAddons.aws.serviceAccount.name }}
Expand Down Expand Up @@ -182,6 +204,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
selector:
app: {{ .Release.Name }}-aws-mcp
Expand Down
5 changes: 5 additions & 0 deletions helm/holmes/templates/mcp-servers/aws/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
podSelector:
matchLabels:
Expand Down
33 changes: 31 additions & 2 deletions helm/holmes/templates/mcp-servers/azure/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
data:
AZURE_TENANT_ID: {{ .Values.mcpAddons.azure.config.tenantId | quote }}
AZURE_SUBSCRIPTION_ID: {{ .Values.mcpAddons.azure.config.subscriptionId | quote }}
Expand All @@ -29,12 +34,20 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- if eq .Values.mcpAddons.azure.config.authMethod "workload-identity" }}
azure.workload.identity/use: "true"
{{- end }}
{{- if .Values.mcpAddons.azure.serviceAccount.annotations }}
{{- $ann := dict -}}
{{- with (include "holmes.commonAnnotations" . | fromYaml) -}}
{{- $ann = mergeOverwrite $ann . -}}
{{- end -}}
{{- with .Values.mcpAddons.azure.serviceAccount.annotations -}}
{{- $ann = mergeOverwrite $ann . -}}
{{- end -}}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
{{- if $ann }}
annotations:
{{- toYaml .Values.mcpAddons.azure.serviceAccount.annotations | nindent 4 }}
{{- toYaml $ann | nindent 4 }}
{{- end }}
{{- end }}
---
Expand All @@ -49,6 +62,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
Expand All @@ -64,9 +82,15 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 8 }}
{{- if eq .Values.mcpAddons.azure.config.authMethod "workload-identity" }}
azure.workload.identity/use: "true"
{{- end }}
annotations:
{{- with (include "holmes.commonAnnotations" .) }}
{{- . | nindent 8 }}
{{- end }}
checksum/config: {{ .Values.mcpAddons.azure | toYaml | sha256sum }}
spec:
{{- if or .Values.mcpAddons.azure.serviceAccount.create .Values.mcpAddons.azure.serviceAccount.name }}
serviceAccountName: {{ .Values.mcpAddons.azure.serviceAccount.name }}
Expand Down Expand Up @@ -185,6 +209,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
selector:
Expand Down
5 changes: 5 additions & 0 deletions helm/holmes/templates/mcp-servers/azure/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
podSelector:
matchLabels:
Expand Down
19 changes: 19 additions & 0 deletions helm/holmes/templates/mcp-servers/confluence-mcp/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
data:
TRANSPORT: "sse"
CONFLUENCE_URL: {{ required "mcpAddons.confluenceMcp.config.url is required" .Values.mcpAddons.confluenceMcp.config.url | quote }}
Expand All @@ -32,6 +37,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
Expand All @@ -47,7 +57,11 @@ spec:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 8 }}
annotations:
{{- with (include "holmes.commonAnnotations" .) }}
{{- . | nindent 8 }}
{{- end }}
checksum/config: {{ .Values.mcpAddons.confluenceMcp | toYaml | sha256sum }}
spec:
{{- if .Values.mcpAddons.confluenceMcp.nodeSelector }}
Expand Down Expand Up @@ -157,6 +171,11 @@ metadata:
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: mcp-server
app.kubernetes.io/part-of: holmes
{{- include "holmes.commonLabels" . | nindent 4 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 4 }}
{{- end }}
spec:
selector:
app: {{ .Release.Name }}-confluence-mcp
Expand Down
Loading
Loading