Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/prometheus-operator] Default Backend config in ingress #23446

Closed
wants to merge 5 commits into from
Closed
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 stable/prometheus-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sources:
- https://github.com/coreos/kube-prometheus
- https://github.com/coreos/prometheus-operator
- https://coreos.com/operators/prometheus
version: 9.3.1
version: 9.3.2
appVersion: 0.38.1
tillerVersion: ">=2.12.0"
home: https://github.com/coreos/prometheus-operator
Expand Down
2 changes: 2 additions & 0 deletions stable/prometheus-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ The following tables list the configurable parameters of the prometheus-operator
| `prometheus.annotations` | Prometheus annotations | `{}` |
| `prometheus.ingress.annotations` | Prometheus Ingress annotations | `{}` |
| `prometheus.ingress.enabled` | If true, Prometheus Ingress will be created | `false` |
| `prometheus.ingress.defaultBackend` | If true, Prometheus Ingress will be configured with default backend | `false` |
| `prometheus.ingress.hosts` | Prometheus Ingress hostnames | `[]` |
| `prometheus.ingress.labels` | Prometheus Ingress additional labels | `{}` |
| `prometheus.ingress.paths` | Prometheus Ingress paths | `[]` |
Expand Down Expand Up @@ -421,6 +422,7 @@ The following tables list the configurable parameters of the prometheus-operator
| `alertmanager.enabled` | Deploy alertmanager | `true` |
| `alertmanager.ingress.annotations` | Alertmanager Ingress annotations | `{}` |
| `alertmanager.ingress.enabled` | If true, Alertmanager Ingress will be created | `false` |
| `alertmanager.ingress.defaultBackend` | If true, Alertmanager Ingress will be configured with default backend | `false` |
| `alertmanager.ingress.hosts` | Alertmanager Ingress hostnames | `[]` |
| `alertmanager.ingress.labels` | Alertmanager Ingress additional labels | `{}` |
| `alertmanager.ingress.paths` | Alertmanager Ingress paths | `[]` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ metadata:
{{- end }}
{{ include "prometheus-operator.labels" . | indent 4 }}
spec:
{{- if .Values.alertmanager.ingress.defaultBackend }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
rules:
{{- if .Values.alertmanager.ingress.hosts }}
{{- range $host := .Values.alertmanager.ingress.hosts }}
Expand Down
5 changes: 5 additions & 0 deletions stable/prometheus-operator/templates/prometheus/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ metadata:
{{ toYaml .Values.prometheus.ingress.labels | indent 4 }}
{{- end }}
spec:
{{- if .Values.prometheus.ingress.defaultBackend }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
rules:
{{- if .Values.prometheus.ingress.hosts }}
{{- range $host := .Values.prometheus.ingress.hosts }}
Expand Down
5 changes: 5 additions & 0 deletions stable/prometheus-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ alertmanager:
ingress:
enabled: false

# Set default backend for ingress
defaultBackend: false

annotations: {}

labels: {}
Expand Down Expand Up @@ -1482,6 +1485,8 @@ prometheus:

ingress:
enabled: false
# Set default backend for ingress
defaultBackend: false
annotations: {}
labels: {}

Expand Down