summaryrefslogtreecommitdiffstats
path: root/roles/openshift_metrics/templates/route.j2
blob: 9d628b6662e7038cbfaaa7276e0ed0ddd8d56c9d (plain)
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
38
apiVersion: v1
kind: Route
metadata:
  name: {{ name }}
{% if annotations is defined %}
  annotations: {{ annotations | to_yaml }}
{% endif %}
{% if labels is defined and labels %}
  labels:
{% for k, v in labels.items() %}
    {{ k }}: {{ v }}
{% endfor %}
{% endif %}
spec:
  host: {{ host }}
  to:
    kind: {{ to.kind }}
    name: {{ to.name }}
{% if tls is defined %}
  tls:
    termination: {{ tls.termination }}
{% if tls.ca_certificate is defined and tls.ca_certificate | length > 0 %}
    caCertificate: |
{{ tls.ca_certificate|indent(6, true) }}
{% endif %}
{% if tls.key is defined and tls.key | length > 0 %}
    key: |
{{ tls.key|indent(6, true) }}
{% endif %}
{% if tls.certificate is defined and tls.certificate | length > 0 %}
    certificate: |
{{ tls.certificate|indent(6, true) }}
{% endif %}
{% if tls.termination == 'reencrypt' %}
    destinationCACertificate: |
{{ tls.destination_ca_certificate|indent(6, true) }}
{% endif %}
{% endif %}