Skip to content

Commit 5df0335

Browse files
author
Openshift-AI DevOps
committed
Sync helm chart from odh-gitops@5200c38e37161e4f6b904a02115aa7ae856dc6fc
1 parent 9cd40c6 commit 5df0335

5 files changed

Lines changed: 129 additions & 78 deletions

File tree

to-be-processed/helm/rhai-on-openshift-chart/README.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,33 @@ The script can be customized with environment variables:
9999
100100
### Enable Models as Service
101101

102-
To enable Models as Service, Gateway and GatewayClass are needed. They could be created manually or with the chart.
103-
To create them with the chart, you need to manually set the gateway hostname, and the certificate secret name.
104-
By default, the Gateway creation is disabled. To enable it, you need to set the `components.kserve.modelsAsService.gateway.create`
105-
and `components.kserve.modelsAsService.gatewayClass.create` to `true`.
102+
To enable Models as Service, set `components.aigateway.dsc.managementState` and
103+
`components.aigateway.dsc.modelsAsAService.managementState` to `Managed`.
106104

107-
For example, it is possible to enable Models as Service with the following values,
108-
configuring correctly the `<HOSTNAME>`, `<SECRET_NAME>` and correctly define the `allowedRoutes`:
105+
Gateway and GatewayClass are created automatically when MaaS is Managed
106+
(`components.aigateway.modelsAsAService.gateway.create` / `gatewayClass.create`
107+
default to `auto`, matching the KServe gateway pattern). Set either flag to
108+
`false` to skip chart-managed creation and supply your own resources, or to
109+
`true` to always create them.
110+
111+
When using the chart-managed Gateway, customize the listener for your
112+
environment (hostname, `allowedRoutes`, and TLS / certificate secret as needed).
113+
The default annotations (`security.opendatahub.io/authorino-tls-bootstrap` and
114+
`opendatahub.io/managed`) should be kept unless you intentionally change MaaS
115+
TLS / ownership behavior.
116+
117+
For example:
109118

110119
```yaml
111120
# values.yaml
112121
components:
113-
kserve:
114-
modelsAsService:
115-
gatewayClass:
116-
create: true
122+
aigateway:
123+
dsc:
124+
managementState: Managed
125+
modelsAsAService:
126+
managementState: Managed
127+
modelsAsAService:
117128
gateway:
118-
create: true
119129
spec:
120130
gatewayClassName: maas-gateway-class
121131
listeners:

to-be-processed/helm/rhai-on-openshift-chart/templates/definitions/_operator.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ apiVersion: v1
1616
kind: Namespace
1717
metadata:
1818
name: {{ .namespace }}
19+
annotations:
20+
helm.sh/resource-policy: keep
1921
labels:
2022
{{- include "rhoai-dependencies.labels" .root | nindent 4 }}
2123
{{- end }}

to-be-processed/helm/rhai-on-openshift-chart/templates/dependencies/gateway/maas.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{{- $kserve := .Values.components.kserve | default dict -}}
2-
{{- $kserveDscMerged := include "rhoai-dependencies.componentDSCConfig" (dict "componentName" "kserve" "component" $kserve "root" .) | fromYaml -}}
3-
{{- $maas := $kserve.modelsAsService | default dict -}}
1+
{{- $aigateway := .Values.components.aigateway | default dict -}}
2+
{{- $aigatewayDscMerged := include "rhoai-dependencies.componentDSCConfig" (dict "componentName" "aigateway" "component" $aigateway "root" .) | fromYaml -}}
3+
{{- $maas := $aigateway.modelsAsAService | default dict -}}
44
{{- $gateway := $maas.gateway | default dict -}}
5-
{{- $effectiveKserveState := $kserveDscMerged.managementState | default "Removed" -}}
6-
{{- $effectiveMaaSState := ($kserveDscMerged.modelsAsService | default dict).managementState | default "Removed" -}}
7-
{{- $isMaaSEnabled := and (eq $effectiveMaaSState "Managed") (eq $effectiveKserveState "Managed") -}}
5+
{{- $effectiveAIGatewayState := $aigatewayDscMerged.managementState | default "Removed" -}}
6+
{{- $effectiveMaaSState := ($aigatewayDscMerged.modelsAsAService | default dict).managementState | default "Removed" -}}
7+
{{- $isMaaSEnabled := and (eq $effectiveMaaSState "Managed") (eq $effectiveAIGatewayState "Managed") -}}
88
{{- $gatewayClass := $maas.gatewayClass | default dict -}}
99
{{- if or (eq ($gatewayClass.create | toString) "true") (and $isMaaSEnabled (eq ($gatewayClass.create | toString) "auto")) -}}
1010
apiVersion: gateway.networking.k8s.io/v1

to-be-processed/helm/rhai-on-openshift-chart/values.schema.json

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@
111111
"feastoperator": {
112112
"$ref": "#/definitions/component"
113113
},
114+
"aigateway": {
115+
"$ref": "#/definitions/aigatewayComponent"
116+
},
114117
"kserve": {
115118
"$ref": "#/definitions/kserveComponent"
116119
},
@@ -502,15 +505,6 @@
502505
}
503506
},
504507
"additionalProperties": false
505-
},
506-
"modelsAsService": {
507-
"type": "object",
508-
"description": "Models as Service configuration for KServe",
509-
"properties": {
510-
"managementState": {
511-
"$ref": "#/definitions/defaultManagementState"
512-
}
513-
}
514508
}
515509
},
516510
"additionalProperties": false
@@ -520,21 +514,63 @@
520514
},
521515
"gateway": {
522516
"$ref": "#/definitions/gatewayConfig"
517+
}
518+
},
519+
"required": ["dsc", "dependencies"],
520+
"additionalProperties": false
521+
},
522+
"aigatewayComponent": {
523+
"type": "object",
524+
"description": "AI Gateway component configuration (manages MaaS and BatchGateway).",
525+
"properties": {
526+
"dependencies": {
527+
"$ref": "#/definitions/componentDeps"
528+
},
529+
"dsc": {
530+
"type": "object",
531+
"description": "DSC configuration for AI Gateway",
532+
"properties": {
533+
"managementState": {
534+
"$ref": "#/definitions/defaultManagementState"
535+
},
536+
"modelsAsAService": {
537+
"type": "object",
538+
"description": "Models as a Service sub-component (moved from kserve.modelsAsService in 3.5)",
539+
"properties": {
540+
"managementState": {
541+
"$ref": "#/definitions/defaultManagementState"
542+
}
543+
},
544+
"additionalProperties": false
545+
},
546+
"batchGateway": {
547+
"type": "object",
548+
"description": "Batch Gateway sub-component",
549+
"properties": {
550+
"managementState": {
551+
"$ref": "#/definitions/defaultManagementState"
552+
}
553+
},
554+
"additionalProperties": false
555+
}
556+
},
557+
"additionalProperties": false
523558
},
524-
"modelsAsService": {
559+
"modelsAsAService": {
525560
"type": "object",
526-
"description": "Models as Service configuration for KServe",
561+
"description": "Gateway and GatewayClass resources for MaaS",
527562
"properties": {
528563
"gateway": {
529564
"$ref": "#/definitions/gatewayConfig"
530565
},
531566
"gatewayClass": {
532567
"$ref": "#/definitions/gatewayClassConfig"
533568
}
534-
}
569+
},
570+
"additionalProperties": false
535571
}
536572
},
537-
"required": ["dsc", "modelsAsService", "dependencies"],
573+
"required": ["dsc"],
538574
"additionalProperties": false
539575
},
540576
"modelregistryComponent": {

to-be-processed/helm/rhai-on-openshift-chart/values.yaml

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,56 @@ services:
9393
# defaults: (optional) Operator-type-specific defaults for dsc fields
9494
# =============================================================================
9595
components:
96+
# -- AI Gateway component (manages MaaS and BatchGateway sub-components)
97+
aigateway:
98+
dependencies: {}
99+
# -- DSC configuration for AI Gateway
100+
dsc:
101+
# -- Management state for AI Gateway. Null uses profile default.
102+
managementState:
103+
# -- Models as a Service sub-component (moved from kserve.modelsAsService in 3.5)
104+
modelsAsAService:
105+
# -- Management state for Models as a Service. Null uses profile default.
106+
managementState:
107+
batchGateway:
108+
managementState:
109+
# -- Gateway and GatewayClass resources for MaaS (created independently of DSC)
110+
modelsAsAService:
111+
# -- GatewayClass configuration for the LLMInferenceService.
112+
gatewayClass:
113+
# -- Create the GatewayClass: auto (if modelsAsAService is Managed), true (always), false (never)
114+
create: auto
115+
name: maas-gateway-class
116+
spec:
117+
controllerName: "openshift.io/gateway-controller/v1"
118+
# -- Gateway configuration for the LLMInferenceService.
119+
gateway:
120+
# -- Create the Gateway: auto (if modelsAsAService is Managed), true (always), false (never)
121+
create: auto
122+
name: maas-default-gateway
123+
namespace: openshift-ingress
124+
annotations:
125+
security.opendatahub.io/authorino-tls-bootstrap: "true"
126+
opendatahub.io/managed: "false"
127+
spec:
128+
gatewayClassName: maas-gateway-class
129+
listeners:
130+
- name: https
131+
port: 443
132+
protocol: HTTPS
133+
allowedRoutes:
134+
namespaces:
135+
from: All
136+
# Uncomment to enable client-facing TLS termination (required for HTTPS).
137+
# security.opendatahub.io/authorino-tls-bootstrap handles Gateway-to-Authorino
138+
# TLS only; it does not supply client-facing certificates.
139+
# tls:
140+
# mode: Terminate
141+
# certificateRefs:
142+
# - group: ''
143+
# kind: Secret
144+
# name: <YOUR_TLS_SECRET>
145+
96146
# -- AI Pipelines component
97147
aipipelines:
98148
# -- Dependencies required by AI Pipelines
@@ -134,10 +184,6 @@ components:
134184
dsc:
135185
# -- Management state for KServe. Null uses profile default.
136186
managementState:
137-
# -- Models as Service configuration
138-
modelsAsService:
139-
# -- Management state for Models as Service. Null uses profile default.
140-
managementState:
141187
# -- Enables NVIDIA NIM integration
142188
nim:
143189
# -- Management state for NIM. Null uses profile default.
@@ -194,49 +240,6 @@ components:
194240
# kind: Secret
195241
# name: <SECRET_NAME>
196242
# mode: Terminate
197-
modelsAsService:
198-
# -- Gateway Class configuration for the LLMInferenceService.
199-
gatewayClass:
200-
# -- Flag to create the Gateway Class (auto, true, false). If auto, it will be created if Models as Service is Managed.
201-
create: false
202-
name: maas-gateway-class
203-
spec:
204-
controllerName: "openshift.io/gateway-controller/v1"
205-
# -- Gateway configuration for the LLMInferenceService.
206-
gateway:
207-
# -- Flag to create the Gateway (auto, true, false). If auto, it will be created if Models as Service is Managed.
208-
create: false
209-
name: maas-default-gateway
210-
namespace: openshift-ingress
211-
annotations:
212-
security.opendatahub.io/authorino-tls-bootstrap: "true"
213-
opendatahub.io/managed: "false"
214-
spec:
215-
gatewayClassName: maas-gateway-class
216-
listeners:
217-
- name: https
218-
port: 443
219-
# hostname: <HOSTNAME> # Uncomment this line to use a specific hostname.
220-
protocol: HTTPS
221-
allowedRoutes:
222-
namespaces:
223-
from: All
224-
# The following is an example of how to restrict the namespaces to the interested ones.
225-
# from: Selector
226-
# selector:
227-
# matchExpressions:
228-
# - key: kubernetes.io/metadata.name
229-
# operator: In
230-
# values:
231-
# - openshift-ingress
232-
# - ...
233-
# tls: # Uncomment this to enable TLS termination for the Gateway.
234-
# certificateRefs:
235-
# - group: ''
236-
# kind: Secret
237-
# name: <SECRET_NAME>
238-
# mode: Terminate
239-
240243

241244
# -- Kueue job queuing component
242245
kueue:
@@ -459,7 +462,7 @@ dependencies:
459462
dependencies:
460463
certManager: true
461464
olm:
462-
channel: stable-v1.3
465+
channel: stable-v1.4
463466
name: kueue-operator
464467
namespace: openshift-kueue-operator
465468
config:

0 commit comments

Comments
 (0)