Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
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" -}}
{{- with .Values.commonAnnotations }}
{{- 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 }}
14 changes: 14 additions & 0 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 @@ -17,12 +22,16 @@ spec:
metadata:
labels:
app: holmes
{{- include "holmes.commonLabels" . | nindent 8 }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
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 .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with (include "holmes.commonAnnotations" .) }}
{{- . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "holmes.serviceAccountName" . }}
{{- if .Values.imagePullSecrets }}
Expand Down Expand Up @@ -151,6 +160,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
38 changes: 35 additions & 3 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,19 @@ kind: ServiceAccount
metadata:
name: {{ include "holmes.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- if .Values.serviceAccount.annotations }}
{{- with (include "holmes.commonLabels" .) }}
labels:
{{- . | nindent 4 }}
{{- end }}
{{- $commonAnn := include "holmes.commonAnnotations" . -}}
{{- if or .Values.serviceAccount.annotations $commonAnn }}
annotations:
{{- with .Values.serviceAccount.annotations }}
{{- with .Values.serviceAccount.annotations }}
{{- toYaml . | nindent 4}}
{{- end }}
{{- end }}
{{- with $commonAnn }}
{{- . | nindent 4 }}
{{- end }}
{{- end }}
{{- if .Values.serviceAccount.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -427,6 +443,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 +465,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
28 changes: 27 additions & 1 deletion 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,16 @@ 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 }}
{{- $commonAnn := include "holmes.commonAnnotations" . -}}
{{- if or (and .Values.mcpAddons.aws.serviceAccount.annotations (not (and .Values.mcpAddons.aws.multiAccount.enabled .Values.mcpAddons.aws.multiAccount.profiles))) $commonAnn }}
annotations:
{{- if and .Values.mcpAddons.aws.serviceAccount.annotations (not (and .Values.mcpAddons.aws.multiAccount.enabled .Values.mcpAddons.aws.multiAccount.profiles)) }}
{{- toYaml .Values.mcpAddons.aws.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- with $commonAnn }}
{{- . | nindent 4 }}
{{- end }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
{{- end }}
{{- end }}
---
Expand All @@ -57,6 +69,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,8 +89,12 @@ 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:
checksum/config: {{ .Values.mcpAddons.aws | toYaml | sha256sum }}
{{- with (include "holmes.commonAnnotations" .) }}
{{- . | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.mcpAddons.aws.serviceAccount.name }}
{{- if .Values.mcpAddons.aws.nodeSelector }}
Expand Down Expand Up @@ -165,6 +186,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
31 changes: 29 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.
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,19 @@ 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 }}
{{- $commonAnn := include "holmes.commonAnnotations" . -}}
{{- if or .Values.mcpAddons.azure.serviceAccount.annotations $commonAnn }}
annotations:
{{- toYaml .Values.mcpAddons.azure.serviceAccount.annotations | nindent 4 }}
{{- with .Values.mcpAddons.azure.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with $commonAnn }}
{{- . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
---
Expand All @@ -49,6 +61,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 +81,14 @@ 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 }}
{{- with (include "holmes.commonAnnotations" .) }}
annotations:
{{- . | nindent 8 }}
{{- end }}
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 +207,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,8 +57,12 @@ 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:
checksum/config: {{ .Values.mcpAddons.confluenceMcp | toYaml | sha256sum }}
{{- with (include "holmes.commonAnnotations" .) }}
{{- . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.mcpAddons.confluenceMcp.nodeSelector }}
nodeSelector:
Expand Down Expand Up @@ -128,6 +142,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
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
Loading
Loading