Skip to content

Commit

Permalink
Merge pull request #97 from terrestris/geoserver-ingress
Browse files Browse the repository at this point in the history
feat: update geoserver ingress
  • Loading branch information
buehner authored Oct 11, 2024
2 parents e6ecedb + c12cfb7 commit ecbd2af
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
4 changes: 2 additions & 2 deletions charts/geoserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: geoserver
description: Helm chart for GeoServer
icon: https://geoserver.org/img/uploads/geoserver_icon.png
version: 4.2.2
appVersion: 2.25.2
version: 5.0.0
appVersion: 2.26.0
36 changes: 20 additions & 16 deletions charts/geoserver/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "geoserver.fullname" . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ include "geoserver.fullname" . }}
labels:
{{ include "geoserver.labels" . | indent 4 }}
{{- include "geoserver.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 "geoserver.fullname" $ }}
port:
name: http
{{- end }}
{{- end }}
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 4 additions & 2 deletions charts/geoserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ service:

ingress:
enabled: false
className: "nginx"
annotations:
spec.ingressClassName: nginx
# kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/enable-cors: "true"
hosts:
- host: geoserver.example.com
paths: [ "/" ]
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: geoserver-secret
hosts:
Expand Down

0 comments on commit ecbd2af

Please sign in to comment.