-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactors the ingress configuration and adds the option to expose both the UI and the backend API via separate ingress resources. This allows the OpenAI-compatible backend API to be exposed to external tooling.
- Loading branch information
sd109
committed
Jun 11, 2024
1 parent
57a9dfd
commit fafd38a
Showing
5 changed files
with
94 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- if .Values.ingress.api.enabled -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
{{ if .Values.ingress.ui.annotations -}} | ||
annotations: | ||
{{- .Values.ingress.api.annotations | toYaml | nindent 4 }} | ||
{{ end -}} | ||
name: {{ default (printf "%s-api" .Release.Name) .Values.ingress.api.name }} | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- http: | ||
paths: | ||
- path: /v1 | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ .Values.api.service.name }} | ||
port: | ||
# Must match Service resource | ||
number: 80 | ||
{{ if .Values.ingress.host -}} | ||
host: {{ .Values.ingress.host | quote }} | ||
{{- end -}} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
- hosts: | ||
- {{ (required "ingress.host is required when ingress.tls is true" .Values.ingress.host) | quote }} | ||
secretName: {{ .Release.Name }}-tls | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{- if and .Values.ui.enabled .Values.ingress.ui.enabled -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
{{ if .Values.ingress.ui.annotations -}} | ||
annotations: | ||
{{- .Values.ingress.ui.annotations | toYaml | nindent 4 }} | ||
{{ end -}} | ||
name: {{ default (printf "%s-ui" .Release.Name) .Values.ingress.ui.name }} | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: {{ .Values.ui.service.name }} | ||
port: | ||
# Must match Service resource | ||
number: 80 | ||
{{ if .Values.ingress.host -}} | ||
host: {{ .Values.ingress.host | quote }} | ||
{{- end -}} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
- hosts: | ||
- {{ (required "ingress.host is required when ingress.tls is true" .Values.ingress.host) | quote }} | ||
secretName: {{ .Release.Name }}-tls | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters