From 183487a9ac563870927d94ba0e5ba2c7965f0e1e Mon Sep 17 00:00:00 2001 From: salaboy Date: Tue, 23 Dec 2025 13:54:43 +0100 Subject: [PATCH 1/2] initial commit Signed-off-by: salaboy --- helm/agents/kueue/Chart-template.yaml | 5 ++ helm/agents/kueue/templates/agent.yaml | 67 ++++++++++++++++++++++++++ helm/agents/kueue/templates/rbac.yaml | 32 ++++++++++++ helm/agents/kueue/values.yaml | 9 ++++ 4 files changed, 113 insertions(+) create mode 100644 helm/agents/kueue/Chart-template.yaml create mode 100644 helm/agents/kueue/templates/agent.yaml create mode 100644 helm/agents/kueue/templates/rbac.yaml create mode 100644 helm/agents/kueue/values.yaml diff --git a/helm/agents/kueue/Chart-template.yaml b/helm/agents/kueue/Chart-template.yaml new file mode 100644 index 000000000..83e81a4f8 --- /dev/null +++ b/helm/agents/kueue/Chart-template.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: argo-rollouts-agent +description: A Argo Rollouts Agent for kagent +type: application +version: ${VERSION} \ No newline at end of file diff --git a/helm/agents/kueue/templates/agent.yaml b/helm/agents/kueue/templates/agent.yaml new file mode 100644 index 000000000..95ed4bbeb --- /dev/null +++ b/helm/agents/kueue/templates/agent.yaml @@ -0,0 +1,67 @@ +apiVersion: kagent.dev/v1alpha2 +kind: Agent +metadata: + name: kueue-conversion-agent + namespace: {{ include "kagent.namespace" . }} + labels: + {{- include "kagent.labels" . | nindent 4 }} +spec: + description: The Kueue AI Agent specializes in assisting users to understand their Kueue configuration, including Queues, Priorities and Workloads. + type: Declarative + declarative: + systemMessage: |- + You are an Kubernetes Kueue specialist focused jobs schedulling. You + are only responsible for helping the user to understand their Kueue configuration, and resources, including Queues and Priorities. + + Your key responsibility is assisting users with scheduling their jobs based on existing queues and priorities. + + + To achieve this use the k8s tools by filtering ClusterQueues, Queues, and PriorityClasses. + ``` + admissionchecks.kueue.x-k8s.io + clusterqueues.kueue.x-k8s.io + cohorts.kueue.x-k8s.io + localqueues.kueue.x-k8s.io + multikueueclusters.kueue.x-k8s.io + multikueueconfigs.kueue.x-k8s.io + provisioningrequestconfigs.kueue.x-k8s.io + resourceflavors.kueue.x-k8s.io + topologies.kueue.x-k8s.io + workloadpriorityclasses.kueue.x-k8s.io + workloads.kueue.x-k8s.io + ``` + + When providing information about Kueue concepts, always refer to the official Kueue documentation at https://kueue.sigs.k8s.io/ for accurate and up-to-date information. + As part of your job, you can teach the user how to optimally use Kueue for their job scheduling needs. + + modelConfig: {{ .Values.modelConfigRef | default (printf "%s" (include "kagent.defaultModelConfigName" .)) }} + tools: + - type: McpServer + mcpServer: + name: kagent-tool-server + kind: RemoteMCPServer + apiGroup: kagent.dev + toolNames: + - k8s_get_resources + - k8s_get_resource_yaml + - k8s_create_resource + - k8s_apply_manifest + - k8s_describe_resource + a2aConfig: + skills: + - id: queues + name: Provide information about Kueue Queues and Workfloads + description: Check the current cluster to see which resources are defined and check their status. + tags: + - queues + - workloads + - kueue + - scheduling + - resources + examples: + - "Show me the list of Kueue Queues and their statuses in my cluster." + - "Show me the Kueue Workloads and their priorities." + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} + diff --git a/helm/agents/kueue/templates/rbac.yaml b/helm/agents/kueue/templates/rbac.yaml new file mode 100644 index 000000000..d0b03f14e --- /dev/null +++ b/helm/agents/kueue/templates/rbac.yaml @@ -0,0 +1,32 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "kagent.fullname" . }}-kueue-role + labels: + {{- include "kagent.labels" . | nindent 4 }} +rules: +- apiGroups: + - kueue.x-k8s.io + resources: + - clusterqueues + - localqueues + - resourceflavors + - workloads + - workloadpriorityclasses + verbs: + - "*" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "kagent.fullname" . }}-kueue-rolebinding + labels: + {{- include "kagent.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "kagent.fullname" . }}-kueue-role +subjects: + - kind: ServiceAccount + name: {{ include "kagent.fullname" . }} + namespace: {{ include "kagent.namespace" . }} \ No newline at end of file diff --git a/helm/agents/kueue/values.yaml b/helm/agents/kueue/values.yaml new file mode 100644 index 000000000..47cde6ba9 --- /dev/null +++ b/helm/agents/kueue/values.yaml @@ -0,0 +1,9 @@ +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file From 171577ed5e218c10d18243b76ce4b7cb825a7278 Mon Sep 17 00:00:00 2001 From: salaboy Date: Tue, 23 Dec 2025 15:49:34 +0100 Subject: [PATCH 2/2] wiring charts Signed-off-by: salaboy --- Makefile | 3 +++ helm/agents/kueue/Chart-template.yaml | 4 ++-- helm/kagent/Chart-template.yaml | 4 ++++ helm/kagent/values.yaml | 9 +++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ab2ba5e84..0dc5ec734 100644 --- a/Makefile +++ b/Makefile @@ -291,6 +291,8 @@ helm-agents: helm package -d $(HELM_DIST_FOLDER) helm/agents/istio VERSION=$(VERSION) envsubst < helm/agents/promql/Chart-template.yaml > helm/agents/promql/Chart.yaml helm package -d $(HELM_DIST_FOLDER) helm/agents/promql + VERSION=$(VERSION) envsubst < helm/agents/kueue/Chart-template.yaml > helm/agents/kueue/Chart.yaml + helm package -d $(HELM_DIST_FOLDER) helm/agents/kueue VERSION=$(VERSION) envsubst < helm/agents/observability/Chart-template.yaml > helm/agents/observability/Chart.yaml helm package -d $(HELM_DIST_FOLDER) helm/agents/observability VERSION=$(VERSION) envsubst < helm/agents/helm/Chart-template.yaml > helm/agents/helm/Chart.yaml @@ -376,6 +378,7 @@ helm-publish: helm-version helm push ./$(HELM_DIST_FOLDER)/kagent-$(VERSION).tgz $(HELM_REPO)/kagent/helm helm push ./$(HELM_DIST_FOLDER)/helm-agent-$(VERSION).tgz $(HELM_REPO)/kagent/agents helm push ./$(HELM_DIST_FOLDER)/istio-agent-$(VERSION).tgz $(HELM_REPO)/kagent/agents + helm push ./$(HELM_DIST_FOLDER)/kueue-agent-$(VERSION).tgz $(HELM_REPO)/kagent/agents helm push ./$(HELM_DIST_FOLDER)/promql-agent-$(VERSION).tgz $(HELM_REPO)/kagent/agents helm push ./$(HELM_DIST_FOLDER)/observability-agent-$(VERSION).tgz $(HELM_REPO)/kagent/agents helm push ./$(HELM_DIST_FOLDER)/argo-rollouts-agent-$(VERSION).tgz $(HELM_REPO)/kagent/agents diff --git a/helm/agents/kueue/Chart-template.yaml b/helm/agents/kueue/Chart-template.yaml index 83e81a4f8..788d557ee 100644 --- a/helm/agents/kueue/Chart-template.yaml +++ b/helm/agents/kueue/Chart-template.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: argo-rollouts-agent -description: A Argo Rollouts Agent for kagent +name: kueue-agent +description: A Kueue Agent for kagent type: application version: ${VERSION} \ No newline at end of file diff --git a/helm/kagent/Chart-template.yaml b/helm/kagent/Chart-template.yaml index 6c88bc933..cf30bd815 100644 --- a/helm/kagent/Chart-template.yaml +++ b/helm/kagent/Chart-template.yaml @@ -40,6 +40,10 @@ dependencies: version: ${VERSION} repository: file://../agents/observability condition: agents.observability-agent.enabled + - name: kueue-agent + version: ${VERSION} + repository: file://../agents/kueue + condition: agents.kueue-agent.enabled - name: argo-rollouts-agent version: ${VERSION} repository: file://../agents/argo-rollouts diff --git a/helm/kagent/values.yaml b/helm/kagent/values.yaml index 1bb8168e6..2f6ad5ac0 100644 --- a/helm/kagent/values.yaml +++ b/helm/kagent/values.yaml @@ -267,6 +267,15 @@ agents: limits: cpu: 1000m memory: 1Gi + kueue-agent: + enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi observability-agent: enabled: true resources: