38 lines
1.1 KiB
Django/Jinja
38 lines
1.1 KiB
Django/Jinja
# SPDX-License-Identifier: MIT-0
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ the_button_name | to_json }}
|
|
namespace: {{ the_button_namespace | to_json }}
|
|
labels:
|
|
app.kubernetes.io/name: the-button
|
|
app.kubernetes.io/instance: {{ the_button_name | to_json }}
|
|
app.kubernetes.io/managed-by: ansible
|
|
{% if the_button_ingress_annotations %}
|
|
annotations:
|
|
{% for key, value in the_button_ingress_annotations.items() %}
|
|
{{ key | to_json }}: {{ (value | string) | to_json }}
|
|
{% endfor %}
|
|
{% else %}
|
|
annotations: {}
|
|
{% endif %}
|
|
spec:
|
|
{% if the_button_ingress_class_name | length > 0 %}
|
|
ingressClassName: {{ the_button_ingress_class_name | to_json }}
|
|
{% endif %}
|
|
tls:
|
|
- hosts:
|
|
- {{ the_button_ingress_host | to_json }}
|
|
secretName: {{ the_button_tls_secret_name | to_json }}
|
|
rules:
|
|
- host: {{ the_button_ingress_host | to_json }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ the_button_name | to_json }}
|
|
port:
|
|
name: http
|