core-deployments/prometheus/ingress.yaml

77 lines
No EOL
2 KiB
YAML

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: prometheus-ingress
namespace: prometheus
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: letsencrypt-prod
acme.cert-manager.io/http01-edit-in-place: "true"
ingress.kubernetes.io/ssl-redirect: "false"
nginx.org/server-snippets: |
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
}
nginx.org/basic-auth-secret: prometheus-basic-auth-secret
#nginx.org/ssl-services: "prometheus-server"
spec:
rules:
- host: "prometheus.apps.yolokube.de"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: prometheus-server
port:
number: 80
tls:
- hosts:
- prometheus.apps.yolokube.de
secretName: prometheus-cert
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: alertmanager-ingress
namespace: prometheus
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: letsencrypt-prod
acme.cert-manager.io/http01-edit-in-place: "true"
ingress.kubernetes.io/ssl-redirect: "false"
nginx.org/server-snippets: |
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
}
nginx.org/basic-auth-secret: prometheus-basic-auth-secret
#nginx.org/ssl-services: "prometheus-server"
spec:
rules:
- host: "alertmanager.apps.yolokube.de"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: prometheus-alertmanager
port:
number: 9093
tls:
- hosts:
- alertmanager.apps.yolokube.de
secretName: alertmanager-cert
---
kind: Secret
metadata:
name: prometheus-basic-auth-secret
namespace: prometheus
apiVersion: v1
type: nginx.org/htpasswd
stringData:
htpasswd: |
aaron:$2y$05$B2.Q.9/e4VEXsnoe.ypjYOkiykmrF2hpApE7CYc2DPIr0pFIdDO1O
tom:$2y$05$BsM7fvmf3Gpuznak5OSgre0x81K4.vxUQO/aKW5cY4gmQOzvssPLO