27 lines
885 B
Django/Jinja
Executable File
27 lines
885 B
Django/Jinja
Executable File
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: {{ owncast_name | to_json }}
|
|
namespace: {{ owncast_namespace | to_json }}
|
|
annotations: {{ (owncast_ingress_annotations | combine({'cert-manager.io/cluster-issuer': owncast_cluster_issuer} if owncast_cluster_issuer | length > 0 else {})) | to_json }}
|
|
spec:
|
|
{% if owncast_ingress_class | length > 0 %}
|
|
ingressClassName: {{ owncast_ingress_class | to_json }}
|
|
{% endif %}
|
|
rules:
|
|
- host: {{ owncast_hostname | to_json }}
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: {{ owncast_name | to_json }}
|
|
port:
|
|
number: 8080
|
|
{% if owncast_tls_enabled | bool %}
|
|
tls:
|
|
- hosts:
|
|
- {{ owncast_hostname | to_json }}
|
|
secretName: {{ owncast_tls_secret_name | to_json }}
|
|
{% endif %} |