Skip to content

Commit

Permalink
add metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
ellie committed Dec 27, 2023
1 parent 1218d04 commit 8d7534a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/atuin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.0
version: 0.2.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
14 changes: 14 additions & 0 deletions charts/atuin/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,24 @@ spec:
- name: ATUIN_REGISTER_WEBHOOK_USERNAME
value: {{ .Values.atuin.hooks.username }}
{{- end }}

{{- if .Values.atuin.metrics.enabled }}
- name: ATUIN_METRICS__ENABLE
value: true
- name: ATUIN_METRICS__HOST
value: {{ .Values.atuin.metrics.host }}
- name: ATUIN_METRICS__PORT
value: {{ .Values.atuin.metrics.port}}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- if .Values.atuin.metrics.enabled }}
- name: metrics
containerPort: {{ .Values.atuin.metrics.port }}
protocol: TCP
{{- end }}
livenessProbe:
httpGet:
path: /
Expand Down
10 changes: 10 additions & 0 deletions charts/atuin/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:

- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http


{{- if .Values.atuin.metrics.enabled }}
- port: {{ .Values.atuin.metrics.port }}
targetPort: metrics
protocol: TCP
name: metrics
{{- end }}

selector:
{{- include "atuin.selectorLabels" . | nindent 4 }}
4 changes: 4 additions & 0 deletions charts/atuin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ atuin:
username: "Atuin"
url: ""

metrics:
enabled: false
host: "0.0.0.0"
port: 9001

logLevel: info

Expand Down

0 comments on commit 8d7534a

Please sign in to comment.