From c59d7606bad595695b8da15f9c9013fb8c15276c Mon Sep 17 00:00:00 2001 From: Rub21 Date: Thu, 28 Mar 2024 10:43:07 -0500 Subject: [PATCH] Update ingress for nominatim and overpass api --- .../nominatim-api/nominatim-api-ingress.yaml | 44 ++++++++++++++++--- .../overpass-api/overpass-api-ingress.yaml | 14 +++--- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/osm-seed/templates/nominatim-api/nominatim-api-ingress.yaml b/osm-seed/templates/nominatim-api/nominatim-api-ingress.yaml index f6ca8f60..150ad948 100644 --- a/osm-seed/templates/nominatim-api/nominatim-api-ingress.yaml +++ b/osm-seed/templates/nominatim-api/nominatim-api-ingress.yaml @@ -7,13 +7,17 @@ metadata: kubernetes.io/ingress.class: nginx cert-manager.io/cluster-issuer: letsencrypt-prod-issuer spec: + ingressClassName: nginx tls: - - hosts: - - nominatim.{{ .Values.domain }} - secretName: {{ template "osm-seed.fullname" . }}-secret-nominatim - + - hosts: + {{- if .Values.nominatimApi.ingressDomain }} + - {{ .Values.nominatimApi.ingressDomain }} + {{- else }} + - nominatim-api.{{ .Values.domain }} + {{- end }} + secretName: {{ template "osm-seed.fullname" . }}-secret-nominatim rules: - - host: nominatim.{{ .Values.domain }} + - host: {{ if .Values.nominatimApi.ingressDomain }}{{ .Values.nominatimApi.ingressDomain }}{{ else }}nominatim-api.{{ .Values.domain }}{{ end }} http: paths: - path: / @@ -23,4 +27,32 @@ spec: name: {{ template "osm-seed.fullname" . }}-nominatim-api port: number: 80 -{{- end }} \ No newline at end of file +{{- end }} +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: {{ template "osm-seed.fullname" . }}-ingress +# annotations: +# kubernetes.io/ingress.class: nginx +# cert-manager.io/cluster-issuer: letsencrypt-prod-issuer +# spec: +# ingressClassName: nginx +# tls: +# - hosts: +# {{- if .Values.web.ingressDomain }} +# - {{ .Values.web.ingressDomain }} +# {{- else }} +# - web.{{ .Values.domain }} +# {{- end }} +# secretName: {{ template "osm-seed.fullname" . }}-tls-secret +# rules: +# - host: {{ if .Values.web.ingressDomain }}{{ .Values.web.ingressDomain }}{{ else }}web.{{ .Values.domain }}{{ end }} +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: {{ template "osm-seed.fullname" . }}-web +# port: +# number: 80 \ No newline at end of file diff --git a/osm-seed/templates/overpass-api/overpass-api-ingress.yaml b/osm-seed/templates/overpass-api/overpass-api-ingress.yaml index 8ca0e8c1..7a41e1df 100644 --- a/osm-seed/templates/overpass-api/overpass-api-ingress.yaml +++ b/osm-seed/templates/overpass-api/overpass-api-ingress.yaml @@ -7,13 +7,17 @@ metadata: kubernetes.io/ingress.class: nginx cert-manager.io/cluster-issuer: letsencrypt-prod-issuer spec: + ingressClassName: nginx tls: - - hosts: - - overpass.{{ .Values.domain }} - secretName: {{ template "osm-seed.fullname" . }}-secret-overpass - + - hosts: + {{- if .Values.overpassApi.ingressDomain }} + - {{ .Values.overpassApi.ingressDomain }} + {{- else }} + - overpass-api.{{ .Values.domain }} + {{- end }} + secretName: {{ template "osm-seed.fullname" . }}-secret-overpass rules: - - host: overpass.{{ .Values.domain }} + - host: {{ if .Values.overpassApi.ingressDomain }}{{ .Values.overpassApi.ingressDomain }}{{ else }}overpass-api.{{ .Values.domain }}{{ end }} http: paths: - path: /