From 5e809f1e9e3911234e968f55accf9fd00769d0ce Mon Sep 17 00:00:00 2001 From: James Harmison Date: Fri, 9 Apr 2021 10:09:49 -0400 Subject: [PATCH] Expose ingress class --- roles/gitea-ocp/defaults/main.yml | 1 + roles/gitea-ocp/templates/Ingress.yml.j2 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/roles/gitea-ocp/defaults/main.yml b/roles/gitea-ocp/defaults/main.yml index c66b250..846d9a8 100644 --- a/roles/gitea-ocp/defaults/main.yml +++ b/roles/gitea-ocp/defaults/main.yml @@ -29,5 +29,6 @@ _gitea_expose_method: Route _gitea_expose_uri: "" _gitea_route: "{{ _gitea_expose_uri }}" _gitea_ssl: true +_gitea_ingress_class: nginx _gitea_trust_bundle_configmap: '' diff --git a/roles/gitea-ocp/templates/Ingress.yml.j2 b/roles/gitea-ocp/templates/Ingress.yml.j2 index 70e8ba7..864a36c 100644 --- a/roles/gitea-ocp/templates/Ingress.yml.j2 +++ b/roles/gitea-ocp/templates/Ingress.yml.j2 @@ -5,6 +5,8 @@ metadata: namespace: "{{ _gitea_namespace }}" labels: app: "{{ _gitea_name }}" + annotations: + kubernetes.io/ingress.class: {{ _gitea_ingress_class }} spec: {% if _gitea_ssl|bool %} tls: