Skip to content

Commit

Permalink
update catnip chart to 1.3.0 and make use of separate metrics port
Browse files Browse the repository at this point in the history
  • Loading branch information
philmtd committed Jan 15, 2024
1 parent c8d329f commit 01756da
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 7 deletions.
4 changes: 2 additions & 2 deletions charts/o-neko-catnip/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: o-neko-catnip
description: A Helm chart for the O-Neko URL trigger
type: application
version: 1.2.0
appVersion: "1.2.0"
version: 1.3.0
appVersion: "1.3.0"
sources:
- https://github.com/subshell/o-neko-catnip/
14 changes: 11 additions & 3 deletions charts/o-neko-catnip/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,25 @@ spec:
name: {{ required "The oneko credential secret is required" .Values.oneko.api.auth.secretName }}
key: "password"
optional: false
{{- if .Values.oneko.useSeparateMetricsPort }}
- name: ONEKO_API_SERVER_METRICSPORT
value: "8081"
{{- end }}
{{- if .Values.oneko.env -}}
{{- toYaml .Values.oneko.env | nindent 12 }}
{{- end }}
ports:
- containerPort: 8080
name: http
{{- if .Values.oneko.useSeparateMetricsPort }}
- containerPort: 8081
name: metrics
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
httpGet:
path: /up
port: http
port: {{ $.Values.oneko.useSeparateMetricsPort | ternary "metrics" "http" }}
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
Expand All @@ -66,7 +74,7 @@ spec:
readinessProbe:
httpGet:
path: /up
port: http
port: {{ $.Values.oneko.useSeparateMetricsPort | ternary "metrics" "http" }}
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
Expand All @@ -76,7 +84,7 @@ spec:
startupProbe:
httpGet:
path: /up
port: http
port: {{ $.Values.oneko.useSeparateMetricsPort | ternary "metrics" "http" }}
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
Expand Down
6 changes: 6 additions & 0 deletions charts/o-neko-catnip/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ spec:
targetPort: 8080
protocol: TCP
name: http
{{- if .Values.oneko.useSeparateMetricsPort }}
- port: 8081
targetPort: 8081
protocol: TCP
name: metrics
{{- end }}
2 changes: 1 addition & 1 deletion charts/o-neko-catnip/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ spec:
matchLabels: {{- include "o-neko-catnip.selectorLabels" . | nindent 12 }}
endpoints:
- interval: {{ .Values.serviceMonitor.interval }}
port: http
port: {{ .Values.oneko.useSeparateMetricsPort | ternary "metrics" "http" }}
path: /metrics
{{- end }}
10 changes: 10 additions & 0 deletions charts/o-neko-catnip/test-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
oneko:
api:
baseUrl: "oneko.mycompany.com"
auth:
secretName: "auth-credentials"
catnipUrl: "catnip.mycompany.com"
useSeparateMetricsPort: true

serviceMonitor:
enabled: true
5 changes: 4 additions & 1 deletion charts/o-neko-catnip/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ oneko:
## @param oneko.image.imagePullPolicy Image Pull Policy
image:
name: subshellgmbh/o-neko-catnip
tag: 1.2.0
tag: 1.3.0
imagePullPolicy: IfNotPresent

## @param oneko.api.baseUrl The base URL of the O-Neko installation, e.g. my.oneko.com
Expand All @@ -43,6 +43,9 @@ oneko:
## @param oneko.catnipUrl The base URL of the O-Neko Catnip installation, e.g. catnip.oneko.com
catnipUrl:

## @param oneko.useSeparateMetricsPort Whether to host metrics on a different port
useSeparateMetricsPort: true

## @section Probes
##

Expand Down

0 comments on commit 01756da

Please sign in to comment.