From c6f907aa2450d2fb5af782cdce3d1470650beb28 Mon Sep 17 00:00:00 2001 From: carlory Date: Mon, 9 Jun 2025 14:54:29 +0800 Subject: [PATCH 1/2] Add inftyai-scheduler support and config updates Signed-off-by: carlory --- Makefile | 4 +++- chart/Chart.lock | 7 +++++-- chart/Chart.yaml | 4 ++++ chart/templates/global-config.yaml | 12 +++++++++++- chart/values.global.yaml | 13 +++++++++++++ chart/values.yaml | 4 ---- 6 files changed, 36 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 1737ad0a..2b7b1822 100644 --- a/Makefile +++ b/Makefile @@ -317,7 +317,9 @@ $(HELMIFY): $(LOCALBIN) .PHONY: helm helm: manifests kustomize helmify - $(KUSTOMIZE) build config/default | $(HELMIFY) -crd-dir + $(KUSTOMIZE) build config/default \ + | yq 'select(.kind and (.kind != "ConfigMap" or .metadata.name != "llmaz-global-config"))' \ + | $(HELMIFY) -crd-dir .PHONY: helm-install helm-install: helm diff --git a/chart/Chart.lock b/chart/Chart.lock index 7ae2be60..4c4904e9 100644 --- a/chart/Chart.lock +++ b/chart/Chart.lock @@ -2,6 +2,9 @@ dependencies: - name: lws repository: oci://registry.k8s.io/lws/charts version: 0.6.1 +- name: kube-scheduler + repository: oci://registry-1.docker.io/inftyai + version: 0.0.1 - name: open-webui repository: https://helm.openwebui.com version: 6.4.0 @@ -11,5 +14,5 @@ dependencies: - name: ai-gateway-helm repository: oci://registry-1.docker.io/envoyproxy version: v0.1.5 -digest: sha256:0ec1b490fc7cd028186811c1776f786b16b5f55faf93cfdf2a04c24b1ba08bdb -generated: "2025-05-20T21:08:50.138833832+08:00" +digest: sha256:b2b856b107e9e03d175f381a93b83b001211df02f1c1ef1ee13b23147aed50e8 +generated: "2025-06-09T10:04:15.540138+08:00" diff --git a/chart/Chart.yaml b/chart/Chart.yaml index e8347485..74d2af41 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -25,6 +25,10 @@ dependencies: version: 0.6.1 repository: "oci://registry.k8s.io/lws/charts" condition: leaderWorkerSet.enabled + - name: kube-scheduler + version: 0.0.1 + repository: "oci://registry-1.docker.io/inftyai" + condition: kube-scheduler.enabled - name: open-webui version: "6.4.0" repository: "https://helm.openwebui.com" diff --git a/chart/templates/global-config.yaml b/chart/templates/global-config.yaml index 5072b63b..80b5dc67 100644 --- a/chart/templates/global-config.yaml +++ b/chart/templates/global-config.yaml @@ -5,4 +5,14 @@ metadata: labels: {{- include "chart.labels" . | nindent 4 }} data: - config.data: {{ .Values.globalConfig.configData | toYaml | indent 1 }} + config.data: |- + {{- $base := deepCopy .Values.globalConfig.configData }} + {{- $ks := get .Values "kube-scheduler" }} + {{- if and $ks (get $ks "enabled") (hasKey $ks "scheduler") }} + {{- $scheduler := get $ks "scheduler" }} + {{- $name := get $scheduler "name" }} + {{- if $name }} + {{- $_ := set $base "scheduler-name" $name }} + {{- end }} + {{- end }} + {{- toYaml $base | nindent 4 }} diff --git a/chart/values.global.yaml b/chart/values.global.yaml index dd67c3b0..b07ae56b 100644 --- a/chart/values.global.yaml +++ b/chart/values.global.yaml @@ -30,6 +30,11 @@ backendRuntime: leaderWorkerSet: enabled: true +kube-scheduler: + enabled: true + # scheduler: + # name: inftyai-scheduler + prometheus: # Prometheus is required to enable smart routing. enabled: false @@ -58,3 +63,11 @@ envoy-gateway: enabled: true envoy-ai-gateway: enabled: true + +globalConfig: + configData: + # If kube-scheduler is enabled, the scheduler-name will + # be automatically overwritten by the kube-scheduler.scheduler.name, + # when generating the global-config ConfigMap. + scheduler-name: default-scheduler + # init-container-image: inftyai/model-loader:v0.0.10 diff --git a/chart/values.yaml b/chart/values.yaml index 7849e032..028604e9 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -25,10 +25,6 @@ controllerManager: replicas: 1 serviceAccount: annotations: {} -globalConfig: - configData: |- - scheduler-name: default-scheduler - # init-container-image: inftyai/model-loader:v0.0.10 kubernetesClusterDomain: cluster.local metricsService: ports: From 38cd59c5e34df19be8f783050229645c206b24e4 Mon Sep 17 00:00:00 2001 From: carlory Date: Tue, 10 Jun 2025 14:26:57 +0800 Subject: [PATCH 2/2] disable scheduler-plugins by default --- Makefile | 4 +--- chart/templates/global-config.yaml | 12 +----------- chart/values.global.yaml | 11 ++--------- chart/values.yaml | 4 ++++ 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 2b7b1822..1737ad0a 100644 --- a/Makefile +++ b/Makefile @@ -317,9 +317,7 @@ $(HELMIFY): $(LOCALBIN) .PHONY: helm helm: manifests kustomize helmify - $(KUSTOMIZE) build config/default \ - | yq 'select(.kind and (.kind != "ConfigMap" or .metadata.name != "llmaz-global-config"))' \ - | $(HELMIFY) -crd-dir + $(KUSTOMIZE) build config/default | $(HELMIFY) -crd-dir .PHONY: helm-install helm-install: helm diff --git a/chart/templates/global-config.yaml b/chart/templates/global-config.yaml index 80b5dc67..5072b63b 100644 --- a/chart/templates/global-config.yaml +++ b/chart/templates/global-config.yaml @@ -5,14 +5,4 @@ metadata: labels: {{- include "chart.labels" . | nindent 4 }} data: - config.data: |- - {{- $base := deepCopy .Values.globalConfig.configData }} - {{- $ks := get .Values "kube-scheduler" }} - {{- if and $ks (get $ks "enabled") (hasKey $ks "scheduler") }} - {{- $scheduler := get $ks "scheduler" }} - {{- $name := get $scheduler "name" }} - {{- if $name }} - {{- $_ := set $base "scheduler-name" $name }} - {{- end }} - {{- end }} - {{- toYaml $base | nindent 4 }} + config.data: {{ .Values.globalConfig.configData | toYaml | indent 1 }} diff --git a/chart/values.global.yaml b/chart/values.global.yaml index b07ae56b..4b467479 100644 --- a/chart/values.global.yaml +++ b/chart/values.global.yaml @@ -31,7 +31,8 @@ leaderWorkerSet: enabled: true kube-scheduler: - enabled: true + # If kube-scheduler is enabled, please set the globalConfig.configData.scheduler-name with the name of the kube-scheduler. + enabled: false # scheduler: # name: inftyai-scheduler @@ -63,11 +64,3 @@ envoy-gateway: enabled: true envoy-ai-gateway: enabled: true - -globalConfig: - configData: - # If kube-scheduler is enabled, the scheduler-name will - # be automatically overwritten by the kube-scheduler.scheduler.name, - # when generating the global-config ConfigMap. - scheduler-name: default-scheduler - # init-container-image: inftyai/model-loader:v0.0.10 diff --git a/chart/values.yaml b/chart/values.yaml index 028604e9..7849e032 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -25,6 +25,10 @@ controllerManager: replicas: 1 serviceAccount: annotations: {} +globalConfig: + configData: |- + scheduler-name: default-scheduler + # init-container-image: inftyai/model-loader:v0.0.10 kubernetesClusterDomain: cluster.local metricsService: ports: