Skip to content

Commit 05302c5

Browse files
committed
Update EA2 manifests for operator-based deployment (rhai-on-xks-chart)
Signed-off-by: Aneesh Puttur <aneeshputtur@gmail.com>
1 parent 1b98069 commit 05302c5

3 files changed

Lines changed: 29 additions & 5 deletions

File tree

framework/deployer/deployer.go

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ func (d *Deployer) GetPlatformInfo(ctx context.Context) map[string]string {
363363
}
364364

365365
// KServe version — from the controller deployment image tag
366-
for _, ns := range []string{"opendatahub", "kserve", "kserve-system"} {
366+
for _, ns := range []string{"opendatahub", "redhat-ods-applications", "kserve", "kserve-system"} {
367367
output, err := d.Kubectl(ctx, "get", "deployment", "-n", ns, "-l",
368368
"control-plane=kserve-controller-manager",
369369
"-o", "jsonpath={.items[0].spec.template.spec.containers[0].image}")
@@ -378,7 +378,7 @@ func (d *Deployer) GetPlatformInfo(ctx context.Context) map[string]string {
378378
}
379379

380380
// vLLM image — from the inferenceservice-config configmap
381-
for _, ns := range []string{"opendatahub", "kserve", "kserve-system"} {
381+
for _, ns := range []string{"opendatahub", "redhat-ods-applications", "kserve", "kserve-system"} {
382382
output, err := d.Kubectl(ctx, "get", "configmap", "inferenceservice-config", "-n", ns,
383383
"-o", "jsonpath={.data.storageInitializer}")
384384
if err == nil && strings.TrimSpace(output) != "" {
@@ -481,7 +481,7 @@ func (d *Deployer) ensurePullSecrets(ctx context.Context, manifestPath, ns strin
481481
}
482482
}
483483

484-
sourceNamespaces := []string{"istio-system", "kserve", "opendatahub"}
484+
sourceNamespaces := []string{"istio-system", "kserve", "opendatahub", "redhat-ods-applications"}
485485
for secretName := range seen {
486486
// Skip if already exists in target namespace
487487
if _, err := d.Kubectl(ctx, "get", "secret", secretName, "-n", ns); err == nil {
@@ -588,6 +588,30 @@ func (d *Deployer) patchManifest(manifestPath string, tc *config.TestCase) (stri
588588
}
589589
}
590590

591+
// Patch imagePullSecrets name if overridden
592+
if d.PullSecretName != "" {
593+
inPullSecrets := false
594+
for i, line := range lines {
595+
trimmed := strings.TrimSpace(line)
596+
if trimmed == "imagePullSecrets:" {
597+
inPullSecrets = true
598+
continue
599+
}
600+
if inPullSecrets {
601+
if strings.HasPrefix(trimmed, "- name: ") {
602+
indent := line[:len(line)-len(strings.TrimLeft(line, " "))]
603+
lines[i] = fmt.Sprintf("%s- name: %s", indent, d.PullSecretName)
604+
patched = true
605+
continue
606+
}
607+
inPullSecrets = false
608+
}
609+
}
610+
if patched {
611+
d.logProgress(" Patched imagePullSecrets to use %s", d.PullSecretName)
612+
}
613+
}
614+
591615
// Mock mode: replace main vLLM container with mock image (no GPU, no model download)
592616
// Only patches under spec.template.containers, NOT spec.router.scheduler.template.containers
593617
if d.MockImage != "" {

framework/model/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ func (dl *Downloader) jobName(pvcName string) string {
523523
// Falls back to a default if the configmap is not found.
524524
func (dl *Downloader) getStorageInitImage(ctx context.Context) string {
525525
// Try to read from KServe configmap (works for both opendatahub and kserve namespaces)
526-
for _, ns := range []string{"opendatahub", "kserve", "knative-serving"} {
526+
for _, ns := range []string{"opendatahub", "redhat-ods-applications", "kserve", "knative-serving"} {
527527
bin := "kubectl"
528528
args := []string{}
529529
if dl.kubeconfig != "" {

tests/conformance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ var _ = Describe("LLM-D Conformance", func() {
407407
Name: "gateway-programmed",
408408
}, func() error {
409409
// Find gateway referenced by the LLMInferenceService (check common namespaces)
410-
for _, gwNS := range []string{"opendatahub", "kserve", "istio-system", dep.Namespace} {
410+
for _, gwNS := range []string{"opendatahub", "kserve", "istio-system", "redhat-ods-applications", dep.Namespace} {
411411
out, err := dep.Kubectl(ctx, "get", "gateway", "-n", gwNS,
412412
"-o", "jsonpath={range .items[*]}{.metadata.name}|{.status.conditions[?(@.type==\"Programmed\")].status}|{.status.addresses[0].value}{\"\\n\"}{end}")
413413
if err != nil || strings.TrimSpace(out) == "" {

0 commit comments

Comments
 (0)