Skip to content

Commit fedc4c0

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 5200c38 + 6cd5007 commit fedc4c0

27 files changed

Lines changed: 986 additions & 6445 deletions

.github/workflows/rhai-on-xks-chart-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
7575

7676
- name: Install and verify chart
77-
timeout-minutes: 30
77+
timeout-minutes: 60
7878
env:
7979
RHAI_PULL_SECRET: ${{ secrets.RHAI_PULL_SECRET }}
8080
run: |
@@ -125,7 +125,7 @@ jobs:
125125
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
126126

127127
- name: Upgrade test
128-
timeout-minutes: 30
128+
timeout-minutes: 60
129129
env:
130130
RHAI_PULL_SECRET: ${{ secrets.RHAI_PULL_SECRET }}
131131
run: |

charts/rhai-on-xks-chart/scripts/verify-helpers.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,25 @@ helm_deploy() {
345345
read -ra helm_extra <<< "$HELM_EXTRA_ARGS"
346346
fi
347347
log "helm upgrade --install $RELEASE_NAME ${version_args[*]:+(${version_args[*]})}"
348-
helm upgrade --install "$RELEASE_NAME" "$chart_ref" \
348+
if ! helm upgrade --install "$RELEASE_NAME" "$chart_ref" \
349349
-n "$NAMESPACE" --create-namespace \
350350
--set "${CLOUD_PROVIDER}.enabled=true" \
351351
${version_args[@]+"${version_args[@]}"} \
352352
${values_args[@]+"${values_args[@]}"} \
353353
${secret_args[@]+"${secret_args[@]}"} \
354354
${helm_extra[@]+"${helm_extra[@]}"} \
355355
${extra_args[@]+"${extra_args[@]}"} \
356-
--timeout 10m
356+
--timeout 10m; then
357+
log "Helm deploy failed — dumping hook job logs..."
358+
local hook_jobs=(rhai-post-install-crs rhai-post-create-gateway rhai-post-create-maas-gateway rhai-pre-delete-crs)
359+
for job in "${hook_jobs[@]}"; do
360+
if kubectl get "job/${job}" -n "$NAMESPACE" &>/dev/null; then
361+
echo " --- job: ${job} ---"
362+
kubectl logs "job/${job}" -n "$NAMESPACE" --tail=100 2>/dev/null || true
363+
fi
364+
done
365+
return 1
366+
fi
357367
}
358368

359369
wait_ke_ready() {

charts/rhai-on-xks-chart/templates/crds/customresourcedefinition-kserves.components.platform.opendatahub.io.yaml

Lines changed: 0 additions & 310 deletions
This file was deleted.

charts/rhai-on-xks-chart/templates/crds/customresourcedefinition-platforms.config.opendatahub.io.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@ spec:
7979
pattern: ^(Managed|Unmanaged|Force|Removed)$
8080
type: string
8181
type: object
82+
kserve:
83+
description: Kserve controls the kserve module operator lifecycle.
84+
properties:
85+
managementState:
86+
description: |-
87+
Set to one of the following values:
88+
89+
- "Managed" : the operator is actively managing the component and trying to keep it active.
90+
It will only upgrade the component if it is safe to do so
91+
92+
- "Removed" : the operator is actively managing the component and will not install it,
93+
or if it is installed, the operator will try to remove it
94+
enum:
95+
- Managed
96+
- Removed
97+
pattern: ^(Managed|Unmanaged|Force|Removed)$
98+
type: string
99+
type: object
82100
mcplifecycleoperator:
83101
description: MCPLifecycleOperator controls the MCP Lifecycle Operator module lifecycle.
84102
properties:
@@ -97,6 +115,24 @@ spec:
97115
pattern: ^(Managed|Unmanaged|Force|Removed)$
98116
type: string
99117
type: object
118+
mlflowoperator:
119+
description: MLflowOperator controls the MLflow module operator lifecycle.
120+
properties:
121+
managementState:
122+
description: |-
123+
Set to one of the following values:
124+
125+
- "Managed" : the operator is actively managing the component and trying to keep it active.
126+
It will only upgrade the component if it is safe to do so
127+
128+
- "Removed" : the operator is actively managing the component and will not install it,
129+
or if it is installed, the operator will try to remove it
130+
enum:
131+
- Managed
132+
- Removed
133+
pattern: ^(Managed|Unmanaged|Force|Removed)$
134+
type: string
135+
type: object
100136
monitoring:
101137
description: Monitoring controls the monitoring module operator lifecycle.
102138
properties:

charts/rhai-on-xks-chart/templates/hooks/_crs-definitions.tpl

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ To add a new module: add an entry here. All templates update automatically.
5050
{{- define "rhai-on-xks-chart.moduleCRRegistry" -}}
5151
aigateway:
5252
platformModuleKey: aigateway
53+
kserve:
54+
platformModuleKey: kserve
5355
{{- end -}}
5456

5557
{{/*
@@ -155,7 +157,7 @@ Returns "true" if provider + KE are both enabled, empty string otherwise. Used f
155157

156158
{{/*
157159
Returns a JSON list of enabled component names for guard conditions (non-empty = at least one enabled).
158-
Do NOT range over this and access fields with .field syntax — use crApplyCommands / crDeleteCommands instead.
160+
Do NOT range over this and access fields with .field syntax — use crApplyCommands / componentDeleteCommands instead.
159161
*/}}
160162
{{- define "rhai-on-xks-chart.enabledComponentCRs" -}}
161163
{{- $registry := include "rhai-on-xks-chart.componentCRRegistry" . | fromYaml }}
@@ -203,6 +205,11 @@ EOF
203205
{{- $meta := index $compRegistry $name }}
204206
{{- $compVals := index $.Values.components $name | default dict }}
205207
{{- if $compVals.enabled }}
208+
echo "Waiting for CRD {{ index $meta "resource" }}.{{ index $meta "apiGroup" }} to exist..."
209+
elapsed=0; while [ $elapsed -lt 300 ]; do
210+
kubectl get crd/{{ index $meta "resource" }}.{{ index $meta "apiGroup" }} &>/dev/null && break
211+
sleep 5; elapsed=$((elapsed + 5))
212+
done
206213
echo "Waiting for CRD {{ index $meta "resource" }}.{{ index $meta "apiGroup" }} to be established..."
207214
kubectl wait --for condition=established --timeout=300s crd/{{ index $meta "resource" }}.{{ index $meta "apiGroup" }}
208215
echo "Creating {{ index $meta "kind" }} CR..."
@@ -225,10 +232,10 @@ EOF
225232
{{- end -}}
226233

227234
{{/*
228-
Emit kubectl delete commands for all enabled component CRs and provider KE CRs.
229-
Include with: {{- include "rhai-on-xks-chart.crDeleteCommands" . | nindent 14 }}
235+
Emit kubectl delete commands for all enabled component CRs.
236+
Include with: {{- include "rhai-on-xks-chart.componentDeleteCommands" . | nindent 14 }}
230237
*/}}
231-
{{- define "rhai-on-xks-chart.crDeleteCommands" -}}
238+
{{- define "rhai-on-xks-chart.componentDeleteCommands" -}}
232239
{{- $compRegistry := include "rhai-on-xks-chart.componentCRRegistry" . | fromYaml }}
233240
{{- range $name := keys $compRegistry | sortAlpha }}
234241
{{- $meta := index $compRegistry $name }}
@@ -238,6 +245,13 @@ echo "Deleting {{ index $meta "kind" }} CR '{{ index $meta "crName" }}'..."
238245
kubectl delete {{ index $meta "resourceSingular" }} {{ index $meta "crName" }} --ignore-not-found --timeout=300s
239246
{{- end }}
240247
{{- end }}
248+
{{- end -}}
249+
250+
{{/*
251+
Emit kubectl delete command for the provider KE CR.
252+
Include with: {{- include "rhai-on-xks-chart.providerKEDeleteCommands" . | nindent 14 }}
253+
*/}}
254+
{{- define "rhai-on-xks-chart.providerKEDeleteCommands" -}}
241255
{{- $provider := include "rhai-on-xks-chart.activeProvider" . | fromYaml }}
242256
{{- if and $provider (index $provider "keEnabled") }}
243257
echo "Deleting {{ index $provider "keKind" }} CR '{{ index $provider "keName" }}'..."

charts/rhai-on-xks-chart/templates/hooks/pre-delete-crs-job.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ spec:
5151
- -c
5252
- |
5353
set -euo pipefail
54-
{{- include "rhai-on-xks-chart.crDeleteCommands" . | trimPrefix "\n" | nindent 14 }}
54+
{{- include "rhai-on-xks-chart.componentDeleteCommands" . | trimPrefix "\n" | nindent 14 }}
5555
{{- include "rhai-on-xks-chart.moduleDeleteCommands" . | nindent 14 }}
56+
{{- include "rhai-on-xks-chart.providerKEDeleteCommands" . | nindent 14 }}
5657
5758
{{- if $.Values.uninstall.cleanupNamespaces }}
5859
{{- range $ns := $depNamespaces }}

charts/rhai-on-xks-chart/templates/rbac/clusterrole-rhods-operator-role.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,14 +1008,6 @@ rules:
10081008
- patch
10091009
- update
10101010
- watch
1011-
- apiGroups:
1012-
- discovery.k8s.io
1013-
resources:
1014-
- endpointslices
1015-
verbs:
1016-
- get
1017-
- list
1018-
- watch
10191011
- apiGroups:
10201012
- networking.k8s.io
10211013
resources:

0 commit comments

Comments
 (0)