Skip to content

Commit

Permalink
Add service and service monitor for forwarder (#1546)
Browse files Browse the repository at this point in the history
* Added holmes_conversation action

* Updated comment for HolmesConversationIssueContext

* Updated lightActions

* Added HolmesToolsResult to verify tools input

* Updated HolmesConversationRequest model

* Added getting holmes model in ActivityStats

* Made parameters optional for HolmesConversationIssueContext

* Made some parameters for conversation api optional

* Removed logging the error from get_holmes_model and fixed a bug

* Added service and service monitor for forwarder

* Updated values.yaml

* Left only default values in forwarder.yaml
  • Loading branch information
itisallgood authored and Sheeproid committed Sep 25, 2024
1 parent 075db46 commit c0c5e0d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
54 changes: 53 additions & 1 deletion helm/robusta/templates/forwarder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,56 @@ spec:
{{- if .Values.kubewatch.priorityClassName }}
priorityClassName: {{ .Values.kubewatch.priorityClassName }}
{{- end }}

---
apiVersion: v1
kind: Service
metadata:
name: {{ include "robusta.fullname" . }}-forwarder
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "robusta.fullname" . }}-forwarder
spec:
selector:
app: {{ include "robusta.fullname" . }}-forwarder
ports:
- name: forwarder-metrics
protocol: TCP
port: 80
targetPort: 2112
---
{{ if and (.Values.enableServiceMonitors) (or (.Values.enablePrometheusStack) (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") ) }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "robusta.fullname" . }}-forwarder-service-monitor
labels:
release: {{ include "robusta.fullname" . }}
{{- with .Values.kubewatch.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- path: {{ .Values.kubewatch.serviceMonitor.path }}
port: forwarder-metrics
{{- if .Values.kubewatch.serviceMonitor.interval }}
interval: {{ .Values.kubewatch.serviceMonitor.interval }}
{{- end }}
{{- if .Values.kubewatch.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.kubewatch.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.kubewatch.serviceMonitor.relabelings }}
relabelings: {{- tpl (toYaml .Values.kubewatch.serviceMonitor.relabelings) . | nindent 8 }}
{{- end }}
{{- if .Values.kubewatch.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- tpl (toYaml .Values.kubewatch.serviceMonitor.metricRelabelings) . | nindent 8 }}
{{- end }}
{{- if .Values.kubewatch.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.kubewatch.serviceMonitor.honorLabels }}
{{- end }}
selector:
matchLabels:
app: {{ include "robusta.fullname" . }}-forwarder
targetLabels:
- target
{{ end }}
---
4 changes: 3 additions & 1 deletion helm/robusta/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ image:

# parameters for the robusta forwarder deployment
kubewatch:
image: ~ # image can be used to override image.registry/imageName
image: ~ # image can be used to override image.registry/imageName
imageName: kubewatch:v2.7.0
imagePullPolicy: IfNotPresent
pprof: True
Expand Down Expand Up @@ -634,6 +634,8 @@ kubewatch:
runAsUser: 1000
pod: {}
customServiceAccount: "" # to override the kubewatch service account
serviceMonitor:
path: /metrics
serviceAccount:
# Additional annotations for the ServiceAccount.
annotations: {}
Expand Down

0 comments on commit c0c5e0d

Please sign in to comment.