Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ingress for services #319

Merged
merged 15 commits into from
Apr 12, 2024
15 changes: 10 additions & 5 deletions osm-seed/templates/nominatim-api/nominatim-api-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 5m
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: /
Expand Down
36 changes: 36 additions & 0 deletions osm-seed/templates/osmcha-app/cronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,42 @@ spec:
- -c
- |
python manage.py fetchchangesets
envFrom:
- configMapRef:
name: {{ .Release.Name }}-osmcha-common-env
restartPolicy: Never
{{- if .Values.osmchaApi.nodeSelector.enabled }}
nodeSelector:
{{ .Values.osmchaApi.nodeSelector.label_key }} : {{ .Values.osmchaApi.nodeSelector.label_value }}
{{- end }}

---
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ .Release.Name }}-osmcha-process-changesets-cronjob
labels:
app: {{ template "osm-seed.name" . }}
component: osmcha-app-deployment
environment: {{ .Values.environment }}
release: {{ .Release.Name }}
spec:
schedule: "0 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 2
jobTemplate:
spec:
template:
spec:
containers:
- name: {{ .Release.Name }}-osmcha-process-changesets
image: "{{ .Values.osmchaApi.image.name }}:{{ .Values.osmchaApi.image.tag }}"
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- |
python manage.py backfill_changesets $(date -d "yesterday" +%Y-%m-%d) $(date +%Y-%m-%d)
envFrom:
- configMapRef:
Expand Down
9 changes: 7 additions & 2 deletions osm-seed/templates/osmcha-app/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 5m
spec:
ingressClassName: nginx
tls:
- hosts:
{{- if .Values.osmchaApi.ingressDomain }}
- {{ .Values.osmchaApi.ingressDomain }}
{{- else }}
- osmcha.{{ .Values.domain }}
{{- end }}
secretName: {{ template "osm-seed.fullname" . }}-secret-osmcha

rules:
- host: osmcha.{{ .Values.domain }}
- host: {{ if .Values.osmchaApi.ingressDomain }}{{ .Values.osmchaApi.ingressDomain }}{{ else }}osmcha.{{ .Values.domain }}{{ end }}
http:
paths:
- path: /
Expand Down
15 changes: 10 additions & 5 deletions osm-seed/templates/overpass-api/overpass-api-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 5m
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: /
Expand Down
17 changes: 11 additions & 6 deletions osm-seed/templates/taginfo/taginfo-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 5m
spec:
ingressClassName: nginx
tls:
- hosts:
- taginfo.{{ .Values.domain }}
secretName: {{ template "osm-seed.fullname" . }}-secret-taginfo

- hosts:
{{- if .Values.taginfo.ingressDomain }}
- {{ .Values.taginfo.ingressDomain }}
{{- else }}
- taginfo.{{ .Values.domain }}
{{- end }}
secretName: {{ template "osm-seed.fullname" . }}-secret-taginfo
rules:
- host: taginfo.{{ .Values.domain }}
- host: {{ if .Values.taginfo.ingressDomain }}{{ .Values.taginfo.ingressDomain }}{{ else }}taginfo.{{ .Values.domain }}{{ end }}
http:
paths:
- path: /
Expand All @@ -23,4 +28,4 @@ spec:
name: {{ template "osm-seed.fullname" . }}-taginfo
port:
number: 80
{{- end }}
{{- end }}

This file was deleted.

31 changes: 31 additions & 0 deletions osm-seed/templates/tasking-manager-api/tm-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{- if and .Values.tmApi.enabled (eq .Values.serviceType "ClusterIP") }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "osm-seed.fullname" . }}-ingress-tm-api
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 5m
spec:
ingressClassName: nginx
tls:
- hosts:
{{- if .Values.tmApi.ingressDomain }}
- {{ .Values.tmApi.ingressDomain }}
{{- else }}
- tm-api.{{ .Values.domain }}
{{- end }}
secretName: {{ template "osm-seed.fullname" . }}-secret-tm-api
rules:
- host: {{ if .Values.tmApi.ingressDomain }}{{ .Values.tmApi.ingressDomain }}{{ else }}tm-api.{{ .Values.domain }}{{ end }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ template "osm-seed.fullname" . }}-tasking-manager-api
port:
number: 80
{{- end }}
15 changes: 10 additions & 5 deletions osm-seed/templates/tiler-server/tiler-server-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ metadata:
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 5m
spec:
ingressClassName: nginx
tls:
- hosts:
- tiler-server.{{ .Values.domain }}
secretName: {{ template "osm-seed.fullname" . }}-secret-tiler-server

- hosts:
{{- if .Values.tilerServer.ingressDomain }}
- {{ .Values.tilerServer.ingressDomain }}
{{- else }}
- tiler.{{ .Values.domain }}
{{- end }}
secretName: {{ template "osm-seed.fullname" . }}-secret-tiler-server
rules:
- host: tiler-server.{{ .Values.domain }}
- host: {{ if .Values.tilerServer.ingressDomain }}{{ .Values.tilerServer.ingressDomain }}{{ else }}tiler.{{ .Values.domain }}{{ end }}
http:
paths:
- path: /
Expand Down
6 changes: 5 additions & 1 deletion osm-seed/templates/web/web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ spec:
# Set SERVER_URL in case we use ingress
{{- if eq .Values.serviceType "ClusterIP" }}
- name: SERVER_URL
value: web.{{ .Values.domain }}
{{- if .Values.web.ingressDomain }}
value: {{ .Values.web.ingressDomain }}
{{- else }}
value: {{ .Values.domain }}
{{- end }}
- name: SERVER_PROTOCOL
value : "https"
{{- end }}
Expand Down
41 changes: 34 additions & 7 deletions osm-seed/templates/web/web-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "osm-seed.fullname" . }}-ingress-web
name: {{ template "osm-seed.fullname" . }}-ingress
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod-issuer
nginx.ingress.kubernetes.io/proxy-body-size: 20m
spec:
ingressClassName: nginx
tls:
- hosts:
- web.{{ .Values.domain }}
secretName: {{ template "osm-seed.fullname" . }}-secret-web

- hosts:
{{- if .Values.web.ingressDomain }}
- {{ .Values.web.ingressDomain }}
{{- else }}
- web.{{ .Values.domain }}
{{- end }}
- api.{{ .Values.domain }}
- {{ .Values.domain }}
secretName: {{ template "osm-seed.fullname" . }}-tls-secret
rules:
- host: web.{{ .Values.domain }}
- host: {{ if .Values.web.ingressDomain }}{{ .Values.web.ingressDomain }}{{ else }}web.{{ .Values.domain }}{{ end }}
http:
paths:
- path: /
Expand All @@ -23,4 +30,24 @@ spec:
name: {{ template "osm-seed.fullname" . }}-web
port:
number: 80
{{- end }}
- host: api.{{ .Values.domain }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ template "osm-seed.fullname" . }}-web
port:
number: 80
- host: {{ .Values.domain }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ template "osm-seed.fullname" . }}-web
port:
number: 80
{{- end }}
Loading
Loading