-
Notifications
You must be signed in to change notification settings - Fork 13
/
prometheus_gateway.j2
37 lines (37 loc) · 1.06 KB
/
prometheus_gateway.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
annotations:
cert-manager.io/cluster-issuer: {{ cloudflare_cluster_issuer }}
name: {{ prometheus_vars.kubernetes.prometheus.gateway.service }}
namespace: {{ prometheus_vars.kubernetes.namespace }}
spec:
gatewayClassName: cilium
infrastructure:
annotations:
{% for key, value in prometheus_vars.kubernetes.prometheus.infrastructure.annotations.items() %}
{{ key | indent(6) }}: {{ value }}
{% endfor %}
listeners:
- allowedRoutes:
kinds:
- kind: HTTPRoute
namespaces:
from: Same
hostname: {{ hostname['prometheus'] }}
name: http
port: 80
protocol: HTTP
- allowedRoutes:
kinds:
- kind: HTTPRoute
namespaces:
from: Same
hostname: {{ hostname['prometheus'] }}
name: https
port: 443
protocol: HTTPS
tls:
certificateRefs:
- kind: Secret
name: {{ cloudflare_tls_key_prefix }}-{{ prometheus_vars.kubernetes.prometheus.gateway.service }}