-
Notifications
You must be signed in to change notification settings - Fork 689
fix: operator defaults #2398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix: operator defaults #2398
Changes from 5 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
75101b6
fix: wip
mohammedabdulwahhab 1323498
fix: fix
mohammedabdulwahhab 78ca1cc
fix: fix
mohammedabdulwahhab 8514e2a
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into mabdu…
mohammedabdulwahhab 903baf3
fix: refactor main component type to frontend
mohammedabdulwahhab 86759aa
fix: tests partially fixed
mohammedabdulwahhab 045bae6
fix: parameterize component factory with single vs multinode and fix …
mohammedabdulwahhab bac8c3f
fix: update vllm yamls to use defaults
mohammedabdulwahhab b7fb92c
fix: update sglang yamls
mohammedabdulwahhab a618c0c
fix: trtllm yamls
mohammedabdulwahhab c7d5ad4
fix: add planner component defaults
mohammedabdulwahhab 97b96c5
fix: set planner defaults
mohammedabdulwahhab 286069f
fix: ai lint yaml files
mohammedabdulwahhab a2f4110
fix: more tee removals
mohammedabdulwahhab 2ebaf90
fix: more lint
mohammedabdulwahhab 3a79d26
Update components/backends/vllm/deploy/disagg_planner.yaml
mohammedabdulwahhab fe9c153
fix: fix
mohammedabdulwahhab 4cf9394
Merge branch 'mabdulwahhab/defaults' of https://github.com/ai-dynamo/…
mohammedabdulwahhab 880d2b4
fix: fix merge conflicts
mohammedabdulwahhab b9f9c43
fix: remove backend param
mohammedabdulwahhab d3eb5d3
Apply suggestions from code review
mohammedabdulwahhab 352a4e7
fix: remove multinode guard and fix tests
mohammedabdulwahhab 04919b7
Merge branch 'mabdulwahhab/defaults' of https://github.com/ai-dynamo/…
mohammedabdulwahhab 1a58890
fix: fix role
mohammedabdulwahhab e84d253
fix: planner should add a service account
mohammedabdulwahhab cbd90e9
fix: add startup probe overrides, add checkMainContainerOverrides
mohammedabdulwahhab 042092e
fix: restore prometheus comp in disagg_planner to use componentType f…
mohammedabdulwahhab 0a738a8
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into mabdu…
mohammedabdulwahhab 66dbc51
fix: update prometheus for sglang as well
mohammedabdulwahhab d5f6b2d
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into mabdu…
mohammedabdulwahhab 1a05dab
fix: remove validate main container
mohammedabdulwahhab bf8db83
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into mabdu…
mohammedabdulwahhab e54b451
fix: fix sglang disagg planner
mohammedabdulwahhab 20e84e5
Apply suggestions from code review
mohammedabdulwahhab 117b0ce
Merge branch 'main' of https://github.com/ai-dynamo/dynamo into mabdu…
mohammedabdulwahhab 7aa3627
Merge branch 'mabdulwahhab/defaults' of https://github.com/ai-dynamo/…
mohammedabdulwahhab File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package dynamo | ||
|
|
||
| import ( | ||
| commonconsts "github.com/ai-dynamo/dynamo/deploy/cloud/operator/internal/consts" | ||
| corev1 "k8s.io/api/core/v1" | ||
| ) | ||
|
|
||
| // ComponentDefaults interface defines how defaults should be provided | ||
| type ComponentDefaults interface { | ||
| // GetBaseContainer returns the base container configuration for this component type | ||
| // The backendFramework parameter may be empty for components that don't need backend-specific config | ||
| GetBaseContainer(backendFramework BackendFramework) (corev1.Container, error) | ||
mohammedabdulwahhab marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| // ComponentDefaultsFactory creates appropriate defaults based on component type | ||
| func ComponentDefaultsFactory(componentType string) ComponentDefaults { | ||
| switch componentType { | ||
| case commonconsts.ComponentTypeFrontend: | ||
mohammedabdulwahhab marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return NewFrontendDefaults() | ||
| case commonconsts.ComponentTypeWorker: | ||
| return NewWorkerDefaults() | ||
| default: | ||
| return &BaseComponentDefaults{} | ||
| } | ||
| } | ||
|
|
||
| // BaseComponentDefaults provides common defaults shared by all components | ||
| type BaseComponentDefaults struct{} | ||
|
|
||
| func (b *BaseComponentDefaults) GetBaseContainer(backendFramework BackendFramework) (corev1.Container, error) { | ||
| return b.getCommonContainer(), nil | ||
| } | ||
|
|
||
| func (b *BaseComponentDefaults) getCommonContainer() corev1.Container { | ||
| container := corev1.Container{ | ||
| Name: "main", | ||
| } | ||
|
|
||
| return container | ||
| } | ||
89 changes: 89 additions & 0 deletions
89
deploy/cloud/operator/internal/dynamo/component_frontend.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package dynamo | ||
|
|
||
| import ( | ||
| "fmt" | ||
|
|
||
| commonconsts "github.com/ai-dynamo/dynamo/deploy/cloud/operator/internal/consts" | ||
| corev1 "k8s.io/api/core/v1" | ||
| "k8s.io/apimachinery/pkg/api/resource" | ||
| "k8s.io/apimachinery/pkg/util/intstr" | ||
| ) | ||
|
|
||
| // FrontendDefaults implements ComponentDefaults for Frontend components | ||
| type FrontendDefaults struct { | ||
| *BaseComponentDefaults | ||
| } | ||
|
|
||
| func NewFrontendDefaults() *FrontendDefaults { | ||
| return &FrontendDefaults{&BaseComponentDefaults{}} | ||
| } | ||
|
|
||
| func (f *FrontendDefaults) GetBaseContainer(backendFramework BackendFramework) (corev1.Container, error) { | ||
| // Frontend doesn't need backend-specific config | ||
| container := f.getCommonContainer() | ||
|
|
||
| // Add HTTP port | ||
| container.Ports = []corev1.ContainerPort{ | ||
| { | ||
| Protocol: corev1.ProtocolTCP, | ||
| Name: commonconsts.DynamoContainerPortName, | ||
| ContainerPort: int32(commonconsts.DynamoServicePort), | ||
| }, | ||
| } | ||
|
|
||
| // Add frontend-specific defaults | ||
| container.LivenessProbe = &corev1.Probe{ | ||
| ProbeHandler: corev1.ProbeHandler{ | ||
| HTTPGet: &corev1.HTTPGetAction{ | ||
| Path: "/health", | ||
| Port: intstr.FromString(commonconsts.DynamoContainerPortName), | ||
| }, | ||
| }, | ||
| InitialDelaySeconds: 60, | ||
| PeriodSeconds: 60, | ||
| TimeoutSeconds: 30, | ||
| FailureThreshold: 10, | ||
| } | ||
|
|
||
| container.ReadinessProbe = &corev1.Probe{ | ||
| ProbeHandler: corev1.ProbeHandler{ | ||
| Exec: &corev1.ExecAction{ | ||
| Command: []string{ | ||
| "/bin/sh", | ||
| "-c", | ||
| "curl -s http://localhost:${DYNAMO_PORT}/health | jq -e \".status == \\\"healthy\\\"\"", | ||
| }, | ||
| }, | ||
| }, | ||
| InitialDelaySeconds: 60, | ||
| PeriodSeconds: 60, | ||
| TimeoutSeconds: 30, | ||
| FailureThreshold: 10, | ||
| } | ||
|
|
||
| container.Resources = corev1.ResourceRequirements{ | ||
| Requests: corev1.ResourceList{ | ||
| corev1.ResourceCPU: resource.MustParse("1"), | ||
| corev1.ResourceMemory: resource.MustParse("2Gi"), | ||
| }, | ||
| Limits: corev1.ResourceList{ | ||
| corev1.ResourceCPU: resource.MustParse("1"), | ||
| corev1.ResourceMemory: resource.MustParse("2Gi"), | ||
| }, | ||
| } | ||
|
|
||
| // Add standard environment variables | ||
| container.Env = []corev1.EnvVar{ | ||
| { | ||
| Name: commonconsts.EnvDynamoServicePort, | ||
| Value: fmt.Sprintf("%d", commonconsts.DynamoServicePort), | ||
| }, | ||
| } | ||
|
|
||
| return container, nil | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.