Skip to content

Commit 88f957a

Browse files
committed
Set in-cluster service addresses automatically
1 parent 2f15872 commit 88f957a

File tree

11 files changed

+15
-40
lines changed

11 files changed

+15
-40
lines changed

charts/azimuth-llm/templates/api/ingress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
pathType: Prefix
1717
backend:
1818
service:
19-
name: {{ .Values.api.service.name }}
19+
name: {{ .Release.Name }}-api
2020
port:
2121
# Must match Service resource
2222
number: 80

charts/azimuth-llm/templates/api/service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: {{ .Values.api.service.name }}
5+
name: {{ .Release.Name }}-api
66
labels:
77
{{- include "azimuth-llm.api-selectorLabels" . | nindent 4 }}
88
spec:

charts/azimuth-llm/templates/api/zenith-client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
spec:
99
reservationName: {{ .Release.Name }}-api
1010
upstream:
11-
serviceName: {{ .Values.api.service.name }}
11+
serviceName: {{ .Release.Name }}-api
1212
auth:
1313
skip: {{ .Values.api.service.zenith.skipAuth }}
1414
{{- end -}}

charts/azimuth-llm/templates/test/end-to-end.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
{{- if .Values.ingress.ui.enabled }}
2222
- {{ .Values.ingress.host }}{{ .Values.ingress.ui.path }}
2323
{{- else }}
24-
- http://{{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc
24+
- http://{{ .Release.Name }}-ui.{{ .Release.Namespace }}.svc
2525
{{- end }}
2626
env:
2727
- name: PYTHONUNBUFFERED

charts/azimuth-llm/templates/test/web-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
{{- if .Values.ingress.ui.enabled }}
1919
- {{ .Values.ingress.host | trimPrefix "http://" | trimPrefix "https://" }}{{ .Values.ingress.ui.path }}
2020
{{- else }}
21-
- {{ .Values.ui.service.name }}.{{ .Release.Namespace }}.svc
21+
- {{ .Release.Name }}-ui.{{ .Release.Namespace }}.svc
2222
{{- end }}
2323
- "80"
2424
restartPolicy: Never

charts/azimuth-llm/templates/ui/app-config-map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ metadata:
77
{{- include "azimuth-llm.labels" . | nindent 4 }}
88
data:
99
overrides.yml: |
10+
{{/* Set backend URL to in-cluster API address */}}
11+
{{- $_ := set .Values.ui.appSettings "backend_url" (printf "http://%s-api.%s.svc" .Release.Name .Release.Namespace) }}
1012
{{- .Values.ui.appSettings | toYaml | nindent 4 }}
1113
{{- end -}}

charts/azimuth-llm/templates/ui/ingress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
pathType: Prefix
1717
backend:
1818
service:
19-
name: {{ .Values.ui.service.name }}
19+
name: {{ .Release.Name }}-ui
2020
port:
2121
# Must match Service resource
2222
number: 80

charts/azimuth-llm/templates/ui/service.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: {{ .Values.ui.service.name }}
5+
name: {{ .Release.Name }}-ui
66
labels:
77
{{- include "azimuth-llm.labels" . | nindent 4 }}
88
spec:

charts/azimuth-llm/templates/ui/ui-zenith-client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
spec:
1010
reservationName: {{ .Release.Name }}-ui
1111
upstream:
12-
serviceName: {{ .Values.ui.service.name }}
12+
serviceName: {{ .Release.Name }}-ui
1313
auth:
1414
skip: {{ .Values.ui.service.zenith.skipAuth }}
1515
{{- end -}}

charts/azimuth-llm/values.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ api:
4343
replicas: 1
4444
# Service config
4545
service:
46-
name: llm-backend
4746
type: ClusterIP
4847
zenith:
4948
enabled: false
@@ -106,7 +105,6 @@ ui:
106105
- Arial
107106
# Service config
108107
service:
109-
name: web-app
110108
type: ClusterIP
111109
zenith:
112110
enabled: true

0 commit comments

Comments
 (0)