route_reencrypt.j2 871 B

123456789101112131415161718192021222324252627282930313233343536
  1. apiVersion: "v1"
  2. kind: "Route"
  3. metadata:
  4. name: "{{obj_name}}"
  5. {% if labels is defined%}
  6. labels:
  7. {% for key, value in labels.items() %}
  8. {{key}}: {{value}}
  9. {% endfor %}
  10. {% endif %}
  11. spec:
  12. host: {{ route_host }}
  13. tls:
  14. {% if tls_key is defined and tls_key | length > 0 %}
  15. key: |
  16. {{ tls_key|indent(6, true) }}
  17. {% if tls_cert is defined and tls_cert | length > 0 %}
  18. certificate: |
  19. {{ tls_cert|indent(6, true) }}
  20. {% endif %}
  21. {% endif %}
  22. caCertificate: |
  23. {% for line in tls_ca_cert.split('\n') %}
  24. {{ line }}
  25. {% endfor %}
  26. destinationCACertificate: |
  27. {% for line in tls_dest_ca_cert.split('\n') %}
  28. {{ line }}
  29. {% endfor %}
  30. termination: reencrypt
  31. {% if edge_term_policy is defined and edge_term_policy | length > 0 %}
  32. insecureEdgeTerminationPolicy: {{ edge_term_policy }}
  33. {% endif %}
  34. to:
  35. kind: Service
  36. name: {{ service_name }}