Skip to content

Commit

Permalink
Merge pull request #29 from BouyguesTelecom/fix/ingress
Browse files Browse the repository at this point in the history
variabilise ingress, with annotations & tls
  • Loading branch information
AmelieLoulergue authored Dec 12, 2024
2 parents 7b6fb70 + 74f792c commit 6a81dce
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 18 deletions.
43 changes: 25 additions & 18 deletions opensource/templates/nginx/nginx-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,32 @@ kind: Ingress
metadata:
name: nginx-ingress
annotations:
kubernetes.io/ingress.class: nginx
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
ingressClassName: nginx
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.env }}.{{ .Values.domain }}
secretName: {{ ..Release.Name }}-tls-certificate
{{- end }}
rules:
- host: '{{.Values.env}}{{.Values.domain}}'
- host: '{{ .Values.env }}.{{ .Values.domain }}'
http:
paths:
- path: {{ if hasKey .Values.mediaProvider "apiPrefix" }}{{ .Values.mediaProvider.apiPrefix }}/assets/media{{ else }}/assets/media{{ end }}
pathType: ImplementationSpecific
backend:
service:
name: nginx
port:
number: 80
- path: {{ if hasKey .Values.mediaProvider "apiPrefix" }}{{ .Values.mediaProvider.apiPrefix }}/catalog{{ else }}/catalog{{ end }}
pathType: ImplementationSpecific
backend:
service:
name: nginx
port:
number: 80

- path: {{ if hasKey .Values.mediaProvider "apiPrefix" }}{{ .Values.mediaProvider.apiPrefix }}/assets/media{{ else }}/assets/media{{ end }}
pathType: ImplementationSpecific
backend:
service:
name: nginx
port:
number: 80
- path: {{ if hasKey .Values.mediaProvider "apiPrefix" }}{{ .Values.mediaProvider.apiPrefix }}/catalog{{ else }}/catalog{{ end }}
pathType: ImplementationSpecific
backend:
service:
name: nginx
port:
number: 80
5 changes: 5 additions & 0 deletions opensource/values.local.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
local: true

ingress:
className: nginx
annotations:
kubernetes.io/ingress.class: nginx

redis:
service: redis-service
dumpFolderPath: '/dumps'
Expand Down
5 changes: 5 additions & 0 deletions opensource/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ingress:
className: nginx
annotations:
kubernetes.io/ingress.class: nginx

redis:
service: redis-service
dumpFolderPath: '/dumps'
Expand Down

0 comments on commit 6a81dce

Please sign in to comment.