Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jiralert] Fix template error in ingress #3936

Merged
merged 3 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Comment on lines +9 to +10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why enabled by default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recheck the context. This is the test values file and ingress should be covered by tests

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
jkroepke marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}
{{- end }}
{{- end }}
Expand Down