feat(prometheus): added config for ingress

!5 nofusscomputing/infrastructure/configuration-management/inventory-production!3
This commit is contained in:
2023-11-19 18:03:17 +09:30
parent 26a78bdb33
commit 562bb7d6f5
2 changed files with 34 additions and 0 deletions

View File

@ -26,4 +26,16 @@ spec:
{{ end }}
{{ if .Values.nfc_monitoring.prometheus.ingress.enabled | default "false" | bool -}}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: prometheus
namespace: "{{ .Values.nfc_monitoring.prometheus.namespace }}"
annotations:
{{ toYaml $.Values.nfc_monitoring.prometheus.ingress.annotations | nindent 4 }}
spec:
{{ toYaml $.Values.nfc_monitoring.prometheus.ingress.spec | nindent 2 }}
{{ end }}

View File

@ -251,6 +251,28 @@ nfc_monitoring:
image:
name: prom/prometheus
tag: 'v2.47.0'
ingress:
annotations:
cert-manager.io/cluster-issuer: "selfsigned-issuer"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
# enabled: false # Optional, boolean.
spec:
tls:
- hosts:
- prometheus.local
secretName: certificate-tls-prometheus
rules:
- host: prometheus.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: prometheus-k8s
port:
name: web
# These labels are appended to all Prometheus items and are also the selector labels
labels: