diff --git a/README.md b/README.md index c338a917..759c2769 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ helm repo add appuio https://charts.appuio.ch | [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/prometheus-blackbox-exporter-0.3.1/total)](https://github.com/appuio/charts/releases/tag/prometheus-blackbox-exporter-0.3.1) | [prometheus-blackbox-exporter](appuio/prometheus-blackbox-exporter/README.md) | | [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/redis-1.3.5/total)](https://github.com/appuio/charts/releases/tag/redis-1.3.5) | [redis](appuio/redis/README.md) | | [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/secret-1.1.0/total)](https://github.com/appuio/charts/releases/tag/secret-1.1.0) | [secret](appuio/secret/README.md) | -| [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/signalilo-0.10.0/total)](https://github.com/appuio/charts/releases/tag/signalilo-0.10.0) | [signalilo](appuio/signalilo/README.md) | +| [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/signalilo-0.10.1/total)](https://github.com/appuio/charts/releases/tag/signalilo-0.10.1) | [signalilo](appuio/signalilo/README.md) | | [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/snappass-0.2.15/total)](https://github.com/appuio/charts/releases/tag/snappass-0.2.15) | [snappass](appuio/snappass/README.md) | | [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/stardog-0.15.0/total)](https://github.com/appuio/charts/releases/tag/stardog-0.15.0) | [stardog](appuio/stardog/README.md) | | [![chart downloads](https://img.shields.io/github/downloads/appuio/charts/stardog-userrole-operator-0.1.1/total)](https://github.com/appuio/charts/releases/tag/stardog-userrole-operator-0.1.1) | [stardog-userrole-operator](appuio/stardog-userrole-operator/README.md) | diff --git a/appuio/signalilo/Chart.yaml b/appuio/signalilo/Chart.yaml index 22975d90..39d2757e 100644 --- a/appuio/signalilo/Chart.yaml +++ b/appuio/signalilo/Chart.yaml @@ -7,7 +7,7 @@ keywords: - alertmanager - webhook - icinga2 -version: 0.10.0 +version: 0.10.1 appVersion: v0.12.0 sources: - https://git.vshn.net/vshn/signalilo diff --git a/appuio/signalilo/README.gotmpl.md b/appuio/signalilo/README.gotmpl.md index 12bcfa7f..812f8e0e 100644 --- a/appuio/signalilo/README.gotmpl.md +++ b/appuio/signalilo/README.gotmpl.md @@ -40,6 +40,7 @@ Parameter | Description | Default `securityContext.fsGroup` | fs group to use for the pod | `999` `resources` | Pod resource requests and limits | `{}` `ingress.enabled` | Enable ingress | `false` +`ingress.className` | Ingress className | `""` `ingress.annotations` | Ingress annotations | `{}` `ingress.hosts` | Ingress hostnames | `["signalilo.local"]` `ingress.tls` | Ingress TLS configuration | `[]` diff --git a/appuio/signalilo/README.md b/appuio/signalilo/README.md index 47276675..9c33f661 100644 --- a/appuio/signalilo/README.md +++ b/appuio/signalilo/README.md @@ -1,6 +1,6 @@ # signalilo -![Version: 0.10.0](https://img.shields.io/badge/Version-0.10.0-informational?style=flat-square) ![AppVersion: v0.12.0](https://img.shields.io/badge/AppVersion-v0.12.0-informational?style=flat-square) +![Version: 0.10.1](https://img.shields.io/badge/Version-0.10.1-informational?style=flat-square) ![AppVersion: v0.12.0](https://img.shields.io/badge/AppVersion-v0.12.0-informational?style=flat-square) Alertmanager to Icinga2 bridge @@ -54,6 +54,7 @@ Parameter | Description | Default `securityContext.fsGroup` | fs group to use for the pod | `999` `resources` | Pod resource requests and limits | `{}` `ingress.enabled` | Enable ingress | `false` +`ingress.className` | Ingress className | `""` `ingress.annotations` | Ingress annotations | `{}` `ingress.hosts` | Ingress hostnames | `["signalilo.local"]` `ingress.tls` | Ingress TLS configuration | `[]` diff --git a/appuio/signalilo/templates/ingress.yaml b/appuio/signalilo/templates/ingress.yaml index 8052a3dd..cb0b153c 100644 --- a/appuio/signalilo/templates/ingress.yaml +++ b/appuio/signalilo/templates/ingress.yaml @@ -1,8 +1,20 @@ {{- if .Values.ingress.enabled -}} +{{- $fullName := include "signalilo.fullname" . -}} +{{- 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 }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} kind: Ingress metadata: - name: {{ include "signalilo.fullname" }} + name: {{ $fullName }} labels: app.kubernetes.io/name: {{ include "signalilo.name" . }} helm.sh/chart: {{ include "signalilo.chart" . }} @@ -13,17 +25,30 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} rules: {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: - - path: / + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ include "signalilo.fullname" }} + name: {{ $fullName }} port: number: 80 + {{- else }} + serviceName: {{ $fullName }} + servicePort: 80 + {{- end }} + {{- end }} {{- end }} {{- if .Values.ingress.tls }} tls: diff --git a/appuio/signalilo/values.yaml b/appuio/signalilo/values.yaml index ea4f611b..5f45036e 100644 --- a/appuio/signalilo/values.yaml +++ b/appuio/signalilo/values.yaml @@ -70,14 +70,16 @@ resources: # It is recommended to only use Signalilo inside the same cluster/network as the alertmanager instance sending the alerts. # Running Signalilo on a different network as the connected alertmanager is untested. ingress: - # -- enable ingress enabled: false - # -- ingress annotations + className: "" annotations: {} - # cert-manager.io/cluster-issuer: letsencrypt-prod - # -- ingress hostnames - hosts: ["signalilo.local"] - # -- ingress TLS configuration + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: signalilo.local + paths: + - path: / + pathType: ImplementationSpecific tls: [] # - secretName: signalilo-tls # hosts: