Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 4ccdfcb

Browse files
stub OCP ingress controller into opinionated install (#47)
* stub OCP ingress controller into opinionated install Signed-off-by: greg pereira <grpereir@redhat.com> * remove backstage references and respect passing host Signed-off-by: greg pereira <grpereir@redhat.com> --------- Signed-off-by: greg pereira <grpereir@redhat.com>
1 parent 538de67 commit 4ccdfcb

6 files changed

Lines changed: 31 additions & 19 deletions

File tree

charts/llm-d/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: llm-d
33
type: application
4-
version: 0.5.1
4+
version: 0.5.2
55
appVersion: "0.0.1"
66
icon: data:null
77
description: A Helm chart for llm-d

charts/llm-d/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# llm-d Helm Chart for OpenShift
33

4-
![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square)
4+
![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square)
55
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
66

77
A Helm chart for llm-d
@@ -159,11 +159,11 @@ Kubernetes: `>= 1.25.0-0`
159159
| ingress | Ingress configuration | object | `{"annotations":{},"enabled":true,"extraHosts":[],"extraTls":[],"host":"","ingressClassName":"","path":"/","tls":{"enabled":false,"secretName":""}}` |
160160
| ingress.annotations | Additional annotations for the Ingress resource | object | `{}` |
161161
| ingress.enabled | Deploy Ingress | bool | `true` |
162-
| ingress.extraHosts | List of additional hostnames to be covered with this ingress record (e.g. a CNAME) <!-- E.g. extraHosts: - name: backstage.env.example.com path: / (Optional) pathType: Prefix (Optional) port: 7007 (Optional) --> | list | `[]` |
163-
| ingress.extraTls | The TLS configuration for additional hostnames to be covered with this ingress record. <br /> Ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls <!-- E.g. extraTls: - hosts: - backstage.env.example.com secretName: backstage-env --> | list | `[]` |
164-
| ingress.host | Hostname to be used to expose the route to access the backstage application (e.g: backstage.IP.nip.io) | string | `""` |
162+
| ingress.extraHosts | List of additional hostnames to be covered with this ingress record (e.g. a CNAME) <!-- E.g. extraHosts: - name: llm-d.env.example.com path: / (Optional) pathType: Prefix (Optional) port: 7007 (Optional) --> | list | `[]` |
163+
| ingress.extraTls | The TLS configuration for additional hostnames to be covered with this ingress record. <br /> Ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls <!-- E.g. extraTls: - hosts: - llm-d.env.example.com secretName: llm-d-env --> | list | `[]` |
164+
| ingress.host | Hostname to be used to expose the NodePort service to the inferencing gateway | string | `""` |
165165
| ingress.ingressClassName | Name of the IngressClass cluster resource which defines which controller will implement the resource (e.g nginx) | string | `""` |
166-
| ingress.path | Path to be used to expose the full route to access the backstage application (e.g: IP.nip.io/backstage) | string | `"/"` |
166+
| ingress.path | Path to be used to expose the full route to access the inferencing gateway | string | `"/"` |
167167
| ingress.tls | Ingress TLS parameters | object | `{"enabled":false,"secretName":""}` |
168168
| ingress.tls.enabled | Enable TLS configuration for the host defined at `ingress.host` parameter | bool | `false` |
169169
| ingress.tls.secretName | The name to which the TLS Secret will be called | string | `""` |

charts/llm-d/templates/sample-application/_helpers.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,12 @@ Sanitize the model name into a valid k8s label.
1414

1515
{{- $name -}}
1616
{{- end }}
17+
18+
19+
{{- define "sampleApplication.ingressHost" -}}
20+
{{- if .Values.ingress.host -}}
21+
{{- include "common.tplvalues.render" ( dict "value" .Values.ingress.host "context" $ ) }}
22+
{{- else }}
23+
{{- include "gateway.fullname" . }}.{{ default "localhost" .Values.ingress.clusterRouterBase }}
24+
{{- end}}
25+
{{- end }}

charts/llm-d/templates/sample-application/ingress.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{{- if and .Values.gateway.enabled .Values.ingress.enabled (eq .Values.gateway.serviceType "NodePort") }}
2+
{{- $gatewayFullname := include "gateway.fullname" . }}
3+
{{- $host := include "sampleApplication.ingressHost" . }}
24
apiVersion: networking.k8s.io/v1
35
kind: Ingress
46
metadata:
5-
name: {{ include "gateway.fullname" . }}
7+
name: {{ $gatewayFullname }}
68
labels: {{ include "common.labels.standard" $ | nindent 4 }}
7-
app.kubernetes.io/gateway: {{ include "gateway.fullname" . }}
9+
app.kubernetes.io/gateway: {{ $gatewayFullname }}
810
app.kubernetes.io/component: sample-application
911
{{- if $.Values.commonLabels }}
1012
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
@@ -24,7 +26,7 @@ spec:
2426
tls:
2527
{{- if .Values.ingress.tls.enabled }}
2628
- hosts:
27-
- {{ include "common.tplvalues.render" ( dict "value" .Values.ingress.host "context" $ ) }}
29+
- {{ $host }}
2830
secretName: {{ include "common.tplvalues.render" ( dict "value" .Values.ingress.tls.secretName "context" $ ) }}
2931
{{- end }}
3032
{{- if .Values.ingress.extraTls }}
@@ -33,16 +35,14 @@ spec:
3335
{{- end }}
3436
rules:
3537
{{- range .Values.gateway.listeners }}
36-
- {{ if $.Values.ingress.host -}}
37-
host: {{ include "common.tplvalues.render" ( dict "value" $.Values.ingress.host "context" $ ) }}
38-
{{ end -}}
38+
- host: {{ $host }}
3939
http:
4040
paths:
4141
- path: {{ .path }}
4242
pathType: Prefix
4343
backend:
4444
service:
45-
name: {{ include "gateway.fullname" $ }}
45+
name: {{ $gatewayFullname }}
4646
port:
4747
number: {{ .port }}
4848
{{- end }}

charts/llm-d/values.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,19 @@ ingress:
121121
# -- Additional annotations for the Ingress resource
122122
annotations: {}
123123

124-
# -- Hostname to be used to expose the route to access the backstage application (e.g: backstage.IP.nip.io)
124+
# -- Hostname to be used to expose the NodePort service to the inferencing gateway
125125
host: ""
126126

127127
# -- List of additional hostnames to be covered with this ingress record (e.g. a CNAME)
128128
# <!-- E.g.
129129
# extraHosts:
130-
# - name: backstage.env.example.com
130+
# - name: llm-d.env.example.com
131131
# path: / (Optional)
132132
# pathType: Prefix (Optional)
133133
# port: 7007 (Optional) -->
134134
extraHosts: []
135135

136-
# -- Path to be used to expose the full route to access the backstage application (e.g: IP.nip.io/backstage)
136+
# -- Path to be used to expose the full route to access the inferencing gateway
137137
path: "/"
138138

139139
# -- Ingress TLS parameters
@@ -150,8 +150,8 @@ ingress:
150150
# <!-- E.g.
151151
# extraTls:
152152
# - hosts:
153-
# - backstage.env.example.com
154-
# secretName: backstage-env -->
153+
# - llm-d.env.example.com
154+
# secretName: llm-d-env -->
155155
extraTls: []
156156

157157
auth:

quickstart/llmd-installer.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,15 @@ install() {
246246
helm dependency build .
247247
log_success "✅ Dependencies built"
248248

249+
BASE_OCP_DOMAIN=$(kubectl get ingresscontroller default -n openshift-ingress-operator -o jsonpath='{.status.domain}')
250+
249251
log_info "🚚 Deploying llm-d chart with ${VALUES_PATH}..."
250252
helm upgrade -i llm-d . \
251253
${DEBUG} \
252254
--namespace "${NAMESPACE}" \
253255
--values "${VALUES_PATH}" \
254-
--set gateway.parameters.proxyUID="${PROXY_UID}"
256+
--set gateway.parameters.proxyUID="${PROXY_UID}" \
257+
--set ingress.clusterRouterBase="${BASE_OCP_DOMAIN}"
255258
log_success "✅ llm-d deployed"
256259

257260
log_info "🔄 Patching all ServiceAccounts with pull-secret..."

0 commit comments

Comments
 (0)