Spring Boot 3.2.0 application with springdoc-openapi-ui runs on HTTP server port for proxy traefik. The application is deployed to Kubernetes with Ingress routing HTTPS requests from outside the cluster to the service.
In this case Swagger UI available at https://example.com/swagger-ui/index.html has wrong "Generated server url" - http://example.com/. While it should be https://example.com/.
While Swagger UI is accessed by HTTPS, the generated server URL still uses HTTP.
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: smartexit-etl-ingress-route
namespace: {{ .Values.namespace }}
spec:
entryPoints:
- web
routes:
{{- if eq .Values.environment "prod" }}
- match: Host(`events.sea.cloud.example.com`) && {{ .Values.INGRESS_MATCH }}
{{- else }}
- match: Host(`events.sea.{{ .Values.environment }}.cloud.example.com`) && {{ .Values.INGRESS_MATCH }}
{{- end}}
kind: Rule
middlewares:
- name: smartexit-etl-ratelimit
services:
- name: smartexit-etl-service
port: 8082