holmesgpt
holmesgpt copied to clipboard
Implemente tolerations for deployment
implement tolerations for deployment
values.yaml
certificate: "" # base64 encoded
logLevel: INFO
additionalEnvVars: []
imagePullSecrets: []
allowedToolsets: "kubernetes/core"
image: holmes:0.0.0
registry: us-central1-docker.pkg.dev/genuine-flight-317411/devel
enableAccountsCreate: true
createServiceAccount: true
customServiceAccountName: ""
customClusterRoleRules: []
enablePostProcessing: false
postProcessingPrompt: "builtin://generic_post_processing.jinja2"
tolerations: []
serviceAccount:
imagePullSecrets: []
annotations: {}
holmes.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-holmes
namespace: {{ .Release.Namespace }}
labels:
app: holmes
spec:
replicas: 1
selector:
matchLabels:
app: holmes
template:
metadata:
labels:
app: holmes
spec:
{{- if .Values.customServiceAccountName }}
serviceAccountName: {{ .Values.customServiceAccountName }}
{{ else }}
serviceAccountName: {{ .Release.Name }}-holmes-service-account
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
containers:
- name: holmes
image: "{{ .Values.registry }}/{{ .Values.image }}"
imagePullPolicy: Always
command: ["python3", "-u", "server.py"]
env:
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
- name: ALLOWED_TOOLSETS
value: {{ .Values.allowedToolsets }}
{{ if .Values.certificate -}}
- name: CERTIFICATE
value: {{ .Values.certificate }}
{{- end }}
{{ if .Values.enablePostProcessing -}}
- name: HOLMES_POST_PROCESSING_PROMPT
value: {{ .Values.postProcessingPrompt }}
{{- end }}
{{- if .Values.additionalEnvVars -}}
{{ toYaml .Values.additionalEnvVars | nindent 10 }}
{{- end }}
lifecycle:
preStop:
exec:
command: ["bash", "-c", "kill -SIGINT 1"]
{{- if .Values.tolerations }}
tolerations:
{{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
volumeMounts:
- name: playbooks-config-secret
mountPath: /etc/robusta/config
volumes:
- name: playbooks-config-secret
secret:
secretName: robusta-playbooks-config-secret
optional: true
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-holmes
namespace: {{ .Release.Namespace }}
labels:
app: holmes
spec:
selector:
app: holmes
ports:
- name: http
protocol: TCP
port: 80
targetPort: 5050
```
@julianobarbosa this will be available on the next holmes release