diff --git a/go/api/v1alpha2/agent_types.go b/go/api/v1alpha2/agent_types.go index 98d325172..228888342 100644 --- a/go/api/v1alpha2/agent_types.go +++ b/go/api/v1alpha2/agent_types.go @@ -122,6 +122,8 @@ type SharedDeploymentSpec struct { Env []corev1.EnvVar `json:"env,omitempty"` // +optional ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` + // +optional + Resources *corev1.ResourceRequirements `json:"resources,omitempty"` } // ToolProviderType represents the tool provider type diff --git a/go/api/v1alpha2/zz_generated.deepcopy.go b/go/api/v1alpha2/zz_generated.deepcopy.go index fdfc74f31..ab7ffab86 100644 --- a/go/api/v1alpha2/zz_generated.deepcopy.go +++ b/go/api/v1alpha2/zz_generated.deepcopy.go @@ -802,6 +802,11 @@ func (in *SharedDeploymentSpec) DeepCopyInto(out *SharedDeploymentSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(v1.ResourceRequirements) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedDeploymentSpec. diff --git a/go/config/crd/bases/kagent.dev_agents.yaml b/go/config/crd/bases/kagent.dev_agents.yaml index 779e50e7b..228e40e24 100644 --- a/go/config/crd/bases/kagent.dev_agents.yaml +++ b/go/config/crd/bases/kagent.dev_agents.yaml @@ -2584,6 +2584,66 @@ spec: format: int32 minimum: 1 type: integer + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object volumeMounts: items: description: VolumeMount describes a mounting of a Volume @@ -4803,6 +4863,66 @@ spec: format: int32 minimum: 1 type: integer + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object volumeMounts: items: description: VolumeMount describes a mounting of a Volume diff --git a/go/internal/controller/translator/adk_api_translator.go b/go/internal/controller/translator/adk_api_translator.go index 748d37bc1..0eee56bfc 100644 --- a/go/internal/controller/translator/adk_api_translator.go +++ b/go/internal/controller/translator/adk_api_translator.go @@ -387,17 +387,8 @@ func (a *adkApiTranslator) buildManifest( Command: cmd, Args: dep.Args, Ports: []corev1.ContainerPort{{Name: "http", ContainerPort: dep.Port}}, - Resources: corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("100m"), - corev1.ResourceMemory: resource.MustParse("384Mi"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2000m"), - corev1.ResourceMemory: resource.MustParse("1Gi"), - }, - }, - Env: env, + Resources: dep.Resources, + Env: env, ReadinessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ HTTPGet: &corev1.HTTPGetAction{Path: "/health", Port: intstr.FromString("http")}, @@ -486,7 +477,6 @@ func (a *adkApiTranslator) translateInlineAgent(ctx context.Context, agent *v1al case tool.McpServer != nil: toolsByServer[tool.McpServer.TypedLocalReference] = append(toolsByServer[tool.McpServer.TypedLocalReference], tool.McpServer.ToolNames...) case tool.Agent != nil: - agentRef := types.NamespacedName{ Namespace: agent.Namespace, Name: tool.Agent.Name, @@ -1003,6 +993,24 @@ type resolvedDeployment struct { Labels map[string]string Annotations map[string]string Env []corev1.EnvVar + Resources corev1.ResourceRequirements +} + +// getDefaultResources sets default resource requirements if not specified +func getDefaultResources(spec *corev1.ResourceRequirements) corev1.ResourceRequirements { + if spec == nil { + return corev1.ResourceRequirements{ + Requests: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("100m"), + corev1.ResourceMemory: resource.MustParse("384Mi"), + }, + Limits: corev1.ResourceList{ + corev1.ResourceCPU: resource.MustParse("2000m"), + corev1.ResourceMemory: resource.MustParse("1Gi"), + }, + } + } + return *spec } func (a *adkApiTranslator) resolveInlineDeployment(agent *v1alpha2.Agent, mdd *modelDeploymentData) (*resolvedDeployment, error) { @@ -1049,6 +1057,7 @@ func (a *adkApiTranslator) resolveInlineDeployment(agent *v1alpha2.Agent, mdd *m Labels: maps.Clone(spec.Labels), Annotations: maps.Clone(spec.Annotations), Env: append(slices.Clone(spec.Env), mdd.EnvVars...), + Resources: getDefaultResources(spec.Resources), // Set default resources if not specified } // Set default replicas if not specified @@ -1107,6 +1116,7 @@ func (a *adkApiTranslator) resolveByoDeployment(agent *v1alpha2.Agent) (*resolve Labels: maps.Clone(spec.Labels), Annotations: maps.Clone(spec.Annotations), Env: slices.Clone(spec.Env), + Resources: getDefaultResources(spec.Resources), // Set default resources if not specified } return dep, nil diff --git a/go/internal/controller/translator/testdata/inputs/basic_agent.yaml b/go/internal/controller/translator/testdata/inputs/basic_agent.yaml index 9f63c022e..b7868a691 100644 --- a/go/internal/controller/translator/testdata/inputs/basic_agent.yaml +++ b/go/internal/controller/translator/testdata/inputs/basic_agent.yaml @@ -34,4 +34,12 @@ objects: description: A basic test agent systemMessage: You are a helpful assistant. modelConfig: basic-model + deployment: + resources: + requests: + cpu: 200m + memory: 684Mi + limits: + cpu: 3000m + memory: 2Gi tools: [] \ No newline at end of file diff --git a/go/internal/controller/translator/testdata/outputs/basic_agent.json b/go/internal/controller/translator/testdata/outputs/basic_agent.json index 5ff4f5d8b..2cc2030fd 100644 --- a/go/internal/controller/translator/testdata/outputs/basic_agent.json +++ b/go/internal/controller/translator/testdata/outputs/basic_agent.json @@ -191,12 +191,12 @@ }, "resources": { "limits": { - "cpu": "2", - "memory": "1Gi" + "cpu": "3", + "memory": "2Gi" }, "requests": { - "cpu": "100m", - "memory": "384Mi" + "cpu": "200m", + "memory": "684Mi" } }, "volumeMounts": [ diff --git a/helm/agents/argo-rollouts/templates/agent.yaml b/helm/agents/argo-rollouts/templates/agent.yaml index 01101402c..dfd113be8 100644 --- a/helm/agents/argo-rollouts/templates/agent.yaml +++ b/helm/agents/argo-rollouts/templates/agent.yaml @@ -180,4 +180,7 @@ spec: - "Should I convert my Deployment directly or use workloadRef for my 'user-service'?" - "How can I check if the Argo Rollouts controller is installed and running in my cluster before I start migrating?" - "My Deployment YAML is complex. Can you help me get its YAML so I can plan the conversion to a Rollout?" + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/argo-rollouts/values.yaml b/helm/agents/argo-rollouts/values.yaml index b47cf95be..47cde6ba9 100644 --- a/helm/agents/argo-rollouts/values.yaml +++ b/helm/agents/argo-rollouts/values.yaml @@ -1 +1,9 @@ -modelConfigRef: "" \ No newline at end of file +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file diff --git a/helm/agents/cilium-debug/templates/agent.yaml b/helm/agents/cilium-debug/templates/agent.yaml index e0530ec02..2812caaaa 100644 --- a/helm/agents/cilium-debug/templates/agent.yaml +++ b/helm/agents/cilium-debug/templates/agent.yaml @@ -198,3 +198,6 @@ spec: - "Monitor real-time traffic using cilium-dbg monitor" - "Check the health status of Cilium endpoints" - "Verify encryption status between pods" + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/cilium-debug/values.yaml b/helm/agents/cilium-debug/values.yaml index 717c54687..4bb3d3cad 100644 --- a/helm/agents/cilium-debug/values.yaml +++ b/helm/agents/cilium-debug/values.yaml @@ -1 +1,9 @@ modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi diff --git a/helm/agents/cilium-manager/templates/agent.yaml b/helm/agents/cilium-manager/templates/agent.yaml index e85f2af23..49110d015 100644 --- a/helm/agents/cilium-manager/templates/agent.yaml +++ b/helm/agents/cilium-manager/templates/agent.yaml @@ -462,3 +462,6 @@ spec: - "I need a CiliumNetworkPolicy for my application." - "How do I write a policy to allow only specific DNS queries?" - "What's the syntax for creating a Cilium egress policy?" + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/cilium-manager/values.yaml b/helm/agents/cilium-manager/values.yaml index 717c54687..4bb3d3cad 100644 --- a/helm/agents/cilium-manager/values.yaml +++ b/helm/agents/cilium-manager/values.yaml @@ -1 +1,9 @@ modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi diff --git a/helm/agents/cilium-policy/templates/agent.yaml b/helm/agents/cilium-policy/templates/agent.yaml index ffb036059..295a74ff8 100644 --- a/helm/agents/cilium-policy/templates/agent.yaml +++ b/helm/agents/cilium-policy/templates/agent.yaml @@ -517,3 +517,6 @@ spec: - "I want to restrict traffic between pods in the same namespace, which policy should I use?" - "Can you create a Kubernetes NetworkPolicy for me?" - "What's the difference between CiliumNetworkPolicy and CiliumClusterwideNetworkPolicy for securing my nodes?" + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/cilium-policy/values.yaml b/helm/agents/cilium-policy/values.yaml index b47cf95be..47cde6ba9 100644 --- a/helm/agents/cilium-policy/values.yaml +++ b/helm/agents/cilium-policy/values.yaml @@ -1 +1,9 @@ -modelConfigRef: "" \ No newline at end of file +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file diff --git a/helm/agents/helm/templates/agent.yaml b/helm/agents/helm/templates/agent.yaml index 2f1148ba1..a11ee625a 100644 --- a/helm/agents/helm/templates/agent.yaml +++ b/helm/agents/helm/templates/agent.yaml @@ -224,3 +224,6 @@ spec: - "The latest upgrade of the 'api-gateway' release failed. Can you help identify the problem?" - "How do I check the rendered Kubernetes manifests for the 'web-server' release without deploying them?" - "The pods managed by the 'message-broker' Helm release are frequently restarting. What should I investigate?" + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/helm/values.yaml b/helm/agents/helm/values.yaml index b47cf95be..47cde6ba9 100644 --- a/helm/agents/helm/values.yaml +++ b/helm/agents/helm/values.yaml @@ -1 +1,9 @@ -modelConfigRef: "" \ No newline at end of file +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file diff --git a/helm/agents/istio/templates/agent.yaml b/helm/agents/istio/templates/agent.yaml index 669001ba9..7614d160e 100644 --- a/helm/agents/istio/templates/agent.yaml +++ b/helm/agents/istio/templates/agent.yaml @@ -300,3 +300,6 @@ spec: - "The sidecar injection is not working for pods in 'app-ns'. What should I check?" - "query_documentation for best practices on Istio performance tuning." - "Describe the Istio ingress gateway pods in 'istio-system' namespace." + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/istio/values.yaml b/helm/agents/istio/values.yaml index b47cf95be..47cde6ba9 100644 --- a/helm/agents/istio/values.yaml +++ b/helm/agents/istio/values.yaml @@ -1 +1,9 @@ -modelConfigRef: "" \ No newline at end of file +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file diff --git a/helm/agents/k8s/templates/agent.yaml b/helm/agents/k8s/templates/agent.yaml index 435e92e30..8271ca3b9 100644 --- a/helm/agents/k8s/templates/agent.yaml +++ b/helm/agents/k8s/templates/agent.yaml @@ -181,4 +181,7 @@ spec: examples: - "Check for RBAC misconfigurations." - "Audit my network policies." - - "Identify potential security vulnerabilities in my cluster." \ No newline at end of file + - "Identify potential security vulnerabilities in my cluster." + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} \ No newline at end of file diff --git a/helm/agents/k8s/values.yaml b/helm/agents/k8s/values.yaml index b47cf95be..47cde6ba9 100644 --- a/helm/agents/k8s/values.yaml +++ b/helm/agents/k8s/values.yaml @@ -1 +1,9 @@ -modelConfigRef: "" \ No newline at end of file +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file diff --git a/helm/agents/kgateway/templates/agent.yaml b/helm/agents/kgateway/templates/agent.yaml index 4ccb51011..a6af5f579 100644 --- a/helm/agents/kgateway/templates/agent.yaml +++ b/helm/agents/kgateway/templates/agent.yaml @@ -308,3 +308,6 @@ spec: - "Find the official documentation on kgateway security best practices." - "What are the steps to integrate kgateway with Argo CD for GitOps management?" - "Tell me more about configuring advanced traffic routing rules like weighted load balancing with kgateway." + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/kgateway/values.yaml b/helm/agents/kgateway/values.yaml index b47cf95be..47cde6ba9 100644 --- a/helm/agents/kgateway/values.yaml +++ b/helm/agents/kgateway/values.yaml @@ -1 +1,9 @@ -modelConfigRef: "" \ No newline at end of file +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file diff --git a/helm/agents/observability/templates/agent.yaml b/helm/agents/observability/templates/agent.yaml index 5435b2675..af678b72a 100644 --- a/helm/agents/observability/templates/agent.yaml +++ b/helm/agents/observability/templates/agent.yaml @@ -189,3 +189,6 @@ spec: - "What's the current resource utilization (CPU/memory) of nodes tagged with 'workload=critical'?" - "Show me Kubernetes events related to the 'database' StatefulSet along with its key performance metrics." - "Help me identify potential performance bottlenecks in my microservices deployment." + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} diff --git a/helm/agents/observability/values.yaml b/helm/agents/observability/values.yaml index 717c54687..4bb3d3cad 100644 --- a/helm/agents/observability/values.yaml +++ b/helm/agents/observability/values.yaml @@ -1 +1,9 @@ modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi diff --git a/helm/agents/promql/templates/agent.yaml b/helm/agents/promql/templates/agent.yaml index 6d0bc33bf..4543c83d5 100644 --- a/helm/agents/promql/templates/agent.yaml +++ b/helm/agents/promql/templates/agent.yaml @@ -200,4 +200,7 @@ spec: - "Explain the Prometheus histogram metric type and how to query it." - "What are some best practices for choosing the time window in PromQL range vector selectors?" - "How does vector matching work in PromQL, for example, with `on() `and `group_left()`?" + deployment: + resources: + {{- toYaml .Values.resources | nindent 8 }} \ No newline at end of file diff --git a/helm/agents/promql/values.yaml b/helm/agents/promql/values.yaml index b47cf95be..47cde6ba9 100644 --- a/helm/agents/promql/values.yaml +++ b/helm/agents/promql/values.yaml @@ -1 +1,9 @@ -modelConfigRef: "" \ No newline at end of file +modelConfigRef: "" + +resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi \ No newline at end of file diff --git a/helm/kagent-crds/templates/kagent.dev_agents.yaml b/helm/kagent-crds/templates/kagent.dev_agents.yaml index 779e50e7b..228e40e24 100644 --- a/helm/kagent-crds/templates/kagent.dev_agents.yaml +++ b/helm/kagent-crds/templates/kagent.dev_agents.yaml @@ -2584,6 +2584,66 @@ spec: format: int32 minimum: 1 type: integer + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object volumeMounts: items: description: VolumeMount describes a mounting of a Volume @@ -4803,6 +4863,66 @@ spec: format: int32 minimum: 1 type: integer + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object volumeMounts: items: description: VolumeMount describes a mounting of a Volume diff --git a/helm/kagent/values.yaml b/helm/kagent/values.yaml index 9348d6ed3..7bf48a4dd 100644 --- a/helm/kagent/values.yaml +++ b/helm/kagent/values.yaml @@ -186,6 +186,13 @@ kagent-tools: fullnameOverride: kagent-tools enabled: true replicaCount: 1 + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi tools: loglevel: "debug" @@ -196,24 +203,94 @@ kagent-tools: agents: k8s-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi kgateway-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi istio-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi promql-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi observability-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi argo-rollouts-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi helm-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi cilium-policy-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi cilium-manager-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi cilium-debug-agent: enabled: true + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: 1000m + memory: 1Gi # ============================================================================== # MCP TOOLS @@ -229,6 +306,13 @@ grafana-mcp: grafana: url: "grafana.kagent:3000/api" apiKey: "-" + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi querydoc: replicas: 1 diff --git a/helm/tools/grafana-mcp/values.yaml b/helm/tools/grafana-mcp/values.yaml index d14945c5b..ebfc95d32 100644 --- a/helm/tools/grafana-mcp/values.yaml +++ b/helm/tools/grafana-mcp/values.yaml @@ -28,7 +28,13 @@ service: type: ClusterIP port: 8000 -resources: {} +resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi # Deployment configuration - used to populate the ConfigMap template. # Add custom configuration values here as needed. diff --git a/helm/tools/querydoc/values.yaml b/helm/tools/querydoc/values.yaml index bd4c6494b..bc9dcb573 100644 --- a/helm/tools/querydoc/values.yaml +++ b/helm/tools/querydoc/values.yaml @@ -24,7 +24,13 @@ service: type: ClusterIP port: 8080 -resources: {} +resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi logLevel: info