37 lines
1007 B
YAML
37 lines
1007 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: loki
|
|
namespace: loki
|
|
annotations:
|
|
# Traefik annotations
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
|
|
|
# Let's Encrypt TLS certificate
|
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
|
|
# Basic authentication for security
|
|
# Generate password: htpasswd -nb admin your-password | base64
|
|
traefik.ingress.kubernetes.io/router.middlewares: loki-basic-auth@kubernetescrd
|
|
|
|
# Additional headers for Loki
|
|
traefik.ingress.kubernetes.io/custom-request-headers: "X-Scope-OrgID:tenant1"
|
|
spec:
|
|
ingressClassName: traefik
|
|
tls:
|
|
- hosts:
|
|
- loki.thedevops.dev
|
|
secretName: loki-tls
|
|
rules:
|
|
- host: loki.thedevops.dev
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: loki
|
|
port:
|
|
number: 3100
|