Skip to content

Commit

Permalink
Merge pull request #98 from terrestris/mfp-ingress
Browse files Browse the repository at this point in the history
feat: update mapfish print ingress
  • Loading branch information
buehner authored Oct 11, 2024
2 parents ecbd2af + 908b4d6 commit 05d88e7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
4 changes: 2 additions & 2 deletions charts/mapfish-print/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: mapfish-print
description: Helm chart for MapFish Print v3
version: 2.0.3
appVersion: 3.30.5
version: 3.0.0
appVersion: 3.30.11
37 changes: 20 additions & 17 deletions charts/mapfish-print/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
{{- if .Values.ingress.enabled -}}
---
{{ $fullName := include "mapfish-print.fullname" . }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ include "mapfish-print.fullname" . }}
labels:
{{ include "mapfish-print.labels" . | indent 4 }}
{{- include "mapfish-print.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ . }}
pathType: ImplementationSpecific
{{- range .paths }}
- path: {{ .path }}
{{- with .pathType }}
pathType: {{ . }}
{{- end }}
backend:
service:
name: {{ $fullName }}
name: {{ include "mapfish-print.fullname" $ }}
port:
name: http
{{- end }}
{{- end }}
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/mapfish-print/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ service:

ingress:
enabled: false
className: "nginx"
annotations:
spec.ingressClassName: nginx
# kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,X-XSRF-TOKEN"
hosts:
- host: mapfish-print.example.com
paths: [ "/" ]
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: mapfish-print-secret
hosts:
Expand Down

0 comments on commit 05d88e7

Please sign in to comment.