Skip to content

Commit

Permalink
Merge pull request #75 from ministryofjustice/fix-ingress-share-real
Browse files Browse the repository at this point in the history
Revert share ingress to dedicated hostname + enable redirect to /share
  • Loading branch information
georgepstaylor authored Jul 16, 2024
2 parents a682b79 + ca20a8c commit 6cda4f5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions alfresco-content-services/templates/ingress-share.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ metadata:
nginx.ingress.kubernetes.io/session-cookie-path: "/share"
nginx.ingress.kubernetes.io/session-cookie-max-age: "604800"
nginx.ingress.kubernetes.io/session-cookie-expires: "604800"
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($request_uri = "/") {
return 301 /share/page/;
}
{{- include "ingress_annotations" .Values.share }}
{{- if ne .Values.share.ingress.hostName .Values.repository.ingress.hostName }}
{{- include "ingress_vhost_annotations" .Values.share }}
Expand All @@ -25,13 +29,20 @@ spec:
ingressClassName: default
tls:
- hosts:
- {{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }}
- share.{{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }}
secretName: share-ingress-cert
rules:
- host: {{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }}
- host: share.{{ .Release.Namespace }}.{{ .Values.repository.ingress.hostName }}
http:
paths:
- path: {{ .Values.share.ingress.path }}
- path: /
pathType: Prefix
backend:
service:
name: {{ template "content-services.shortname" . }}-share
port:
number: {{ .Values.share.service.externalPort }}
- path: /share/page/
pathType: Prefix
backend:
service:
Expand Down
2 changes: 1 addition & 1 deletion alfresco-content-services/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ share:
type: ClusterIP
externalPort: 80
ingress:
path: /share
path: /
annotations: {}
tls: []
# - secretName: chart-example-tls
Expand Down

0 comments on commit 6cda4f5

Please sign in to comment.