Skip to content

Commit

Permalink
[jiralert] Fix template error in ingress (prometheus-community#3936)
Browse files Browse the repository at this point in the history
Co-authored-by: MH <[email protected]>
  • Loading branch information
2 people authored and Matiasmct committed Mar 20, 2024
1 parent 04f47f2 commit bbb10b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/jiralert/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: jiralert
description: A Helm chart for Kubernetes to install jiralert
type: application
version: 1.6.0
version: 1.6.1
appVersion: "v1.3.0"
home: "https://github.com/prometheus-community/jiralert"
keywords:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ config:
receivers:
- name: 'default'
project: EXAMPLE

ingress:
enabled: true
7 changes: 3 additions & 4 deletions charts/jiralert/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "jiralert.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
apiVersion: {{template "jiralert.ingress.apiversion" . }}
apiVersion: {{ template "jiralert.ingress.apiversion" . }}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand Down Expand Up @@ -49,10 +48,10 @@ spec:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
number: 9097
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
servicePort: 9097
{{- end }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit bbb10b7

Please sign in to comment.