Added authenticated ingres for prometheus

This commit is contained in:
Marcus Noble 2021-06-14 15:47:46 +01:00
parent bc30ffa753
commit cf8b042c98

View File

@ -49,3 +49,41 @@ spec:
backend: backend:
serviceName: auth-proxy serviceName: auth-proxy
servicePort: 80 servicePort: 80
---
apiVersion: v1
kind: Secret
metadata:
name: prometheus-credentials
namespace: logging
annotations:
kube-1password: wpynfxkdipeeacyfxkvtdsuj54
kube-1password/vault: Kubernetes
type: Opaque
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: prometheus-cloud
namespace: monitoring
labels:
app: prometheus-cloud
annotations:
cert-manager.io/cluster-issuer: letsencrypt
traefik.ingress.kubernetes.io/frontend-entry-points: http,https
traefik.ingress.kubernetes.io/redirect-entry-point: https
traefik.ingress.kubernetes.io/redirect-permanent: "true"
ingress.kubernetes.io/auth-type: basic
ingress.kubernetes.io/auth-secret: prometheus-credentials
spec:
tls:
- hosts:
- prometheus-cloud.cluster.fun
secretName: prometheus-cloud-ingress
rules:
- host: prometheus-cloud.cluster.fun
http:
paths:
- path: /
backend:
serviceName: prometheus-server
servicePort: 80