From e0195e45a5f163caf8c41b30d885120637f3f715 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 11 Nov 2023 20:32:32 +0100 Subject: [PATCH] added a container which serves the tileserver's sources --- .../templates/deployments/maps/maps-deployment.yaml | 10 ++++++++++ deployment/k3s/templates/networking/ingress.yaml | 5 +++++ deployment/k3s/templates/networking/service.yaml | 3 +++ 3 files changed, 18 insertions(+) diff --git a/deployment/k3s/templates/deployments/maps/maps-deployment.yaml b/deployment/k3s/templates/deployments/maps/maps-deployment.yaml index d990beaf5..4986a219d 100644 --- a/deployment/k3s/templates/deployments/maps/maps-deployment.yaml +++ b/deployment/k3s/templates/deployments/maps/maps-deployment.yaml @@ -103,3 +103,13 @@ spec: port: tileserver failureThreshold: 6 periodSeconds: 10 + - name: tileserver-src # serve tileserver-vol at /maps/vol/... + image: nginx:1.25 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http + volumeMounts: + - name: tileserver-vol + mountPath: /usr/share/nginx/html/maps/vol + readOnly: true diff --git a/deployment/k3s/templates/networking/ingress.yaml b/deployment/k3s/templates/networking/ingress.yaml index b029fed60..4e1cf191f 100644 --- a/deployment/k3s/templates/networking/ingress.yaml +++ b/deployment/k3s/templates/networking/ingress.yaml @@ -24,6 +24,11 @@ spec: services: - name: api-svc port: 7000 + - kind: Rule + match: Host(`{{ $.Values.url }}`) && PathPrefix(`/maps/vol/`) + services: + - name: maps-svc + port: 7771 - kind: Rule match: Host(`{{ $.Values.url }}`) && PathPrefix(`/maps/`) services: diff --git a/deployment/k3s/templates/networking/service.yaml b/deployment/k3s/templates/networking/service.yaml index 3eeb62326..07698c328 100644 --- a/deployment/k3s/templates/networking/service.yaml +++ b/deployment/k3s/templates/networking/service.yaml @@ -69,6 +69,9 @@ spec: - name: http port: 7770 targetPort: 8080 + - name: src + port: 7771 + targetPort: 80 --- apiVersion: v1 kind: Service