Commit 602352ce authored by Neelay Shah's avatar Neelay Shah Committed by GitHub
Browse files

chore: rename dynamo (#44)


Co-authored-by: default avatarBiswa Panda <biswa.panda@gmail.com>
parent ecf53ce2
......@@ -339,7 +339,7 @@ spec:
args:
- uv
- run
- compoundai
- dynamo
- start
- --service-name
- {{ $component_name | quote }}
......
......@@ -15,7 +15,7 @@
# `component` contains configuration options related to the Distributed Neural Models Component.
component:
# `component.name` is the name of the Distributed Neural Models (dynemo) Component in the distributed deployment.
# `component.name` is the name of the Distributed Neural Models (dynamo) Component in the distributed deployment.
name: # (required)
# `component.namespace` is the Distributed Neural Models namespace in which the Distributed Neural Models Component will be deployed.
namespace: # (default: "default")
......
......@@ -14,10 +14,10 @@
# limitations under the License.
component:
name: test_dynemo_chart
name: test_dynamo_chart
distributed:
requestPlane:
etcdUrl: etcd:2379
natsUrl: nats://nats:4222
image:
name: test_dynemo_image-name
name: test_dynamo_image-name
......@@ -27,13 +27,13 @@ $tests = @(
lines = @(
'labels:'
' app: test'
' app.kubernetes.io/component: test_dynemo_chart'
' app.kubernetes.io/component: test_dynamo_chart'
' app.kubernetes.io/instance: test'
' app.kubernetes.io/name: test_dynemo_chart'
' app.kubernetes.io/part-of: dynemo'
' app.kubernetes.io/name: test_dynamo_chart'
' app.kubernetes.io/part-of: dynamo'
' app.kubernetes.io/version: "1.0.0"'
' app.kubernetes.io/managed-by: Helm'
' helm.sh/chart: "dynemo_component"'
' helm.sh/chart: "dynamo_component"'
' helm.sh/version: "1.0.0"'
)
}
......
......@@ -31,7 +31,7 @@ issues:
linters:
- dupl
- lll
- path: "pkg/compoundai/*"
- path: "pkg/dynamo/*"
linters:
- lll
- nakedret
......
......@@ -39,7 +39,7 @@ test:
docker:
ARG CI_REGISTRY_IMAGE=my-registry
ARG CI_COMMIT_SHA=latest
ARG IMAGE_SUFFIX=compoundai-operator
ARG IMAGE_SUFFIX=dynamo-operator
FROM urm.nvidia.com/sw-gpu-ucs-hardened-docker/distroless/go:v3.1.3-amd64
WORKDIR /
COPY +build/manager .
......
......@@ -211,7 +211,7 @@ $(HELMIFY): $(LOCALBIN)
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@v0.4.16
helm: manifests kustomize helmify
$(KUSTOMIZE) build config/default | $(HELMIFY) -image-pull-secrets charts/compoundai-kubernetes-operator
$(KUSTOMIZE) build config/default | $(HELMIFY) -image-pull-secrets charts/dynamo-kubernetes-operator
.PHONY: coverage
......
......@@ -5,38 +5,38 @@
domain: nvidia.com
layout:
- go.kubebuilder.io/v4
projectName: compoundai-kubernetes-operator
repo: github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/v1alpha1
projectName: dynamo-kubernetes-operator
repo: github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/v1alpha1
resources:
- api:
crdVersion: v1
namespaced: true
controller: true
domain: nvidia.com
kind: CompoundAINimDeployment
path: github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/v1alpha1
kind: DynamoNimDeployment
path: github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: nvidia.com
kind: CompoundAINimRequest
path: github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/v1alpha1
kind: DynamoNimRequest
path: github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
domain: nvidia.com
kind: CompoundAINim
path: github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/v1alpha1
kind: DynamoNim
path: github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: nvidia.com
kind: CompoundAIDeployment
path: github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/v1alpha1
kind: DynamoDeployment
path: github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/v1alpha1
version: v1alpha1
version: "3"
# Compound AI Kubernetes Operator
The NVIDIA Compound AI Kubernetes Operator uses the [operator framework](https://cloud.redhat.com/blog/introducing-the-operator-framework) within Kubernetes to automate the management of all compound AI resources.
# Dynamo Kubernetes Operator
The NVIDIA Dynamo Kubernetes Operator uses the [operator framework](https://cloud.redhat.com/blog/introducing-the-operator-framework) within Kubernetes to automate the management of all dynamo resources.
## pre-requisites
......
......@@ -21,15 +21,15 @@ import (
"context"
"fmt"
"github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/compoundai/modelschemas"
"github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/compoundai/schemasv1"
"github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/dynamo/modelschemas"
"github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/dynamo/schemasv1"
"github.com/dynemo-ai/dynemo/deploy/compoundai/operator/pkg/compoundai/consts"
"github.com/dynemo-ai/dynemo/deploy/compoundai/operator/pkg/compoundai/reqcli"
"github.com/dynemo-ai/dynemo/deploy/compoundai/operator/pkg/compoundai/utils"
"github.com/dynemo-ai/dynemo/deploy/dynamo/operator/pkg/dynamo/consts"
"github.com/dynemo-ai/dynemo/deploy/dynamo/operator/pkg/dynamo/reqcli"
"github.com/dynemo-ai/dynemo/deploy/dynamo/operator/pkg/dynamo/utils"
)
type CompoundAIAuthHeaders struct {
type DynamoAuthHeaders struct {
OrgId string
UserId string
}
......@@ -37,7 +37,7 @@ type CompoundAIAuthHeaders struct {
type YataiClient struct {
endpoint string
apiToken string
headers CompoundAIAuthHeaders
headers DynamoAuthHeaders
}
func NewYataiClient(endpoint, apiToken string) *YataiClient {
......@@ -47,7 +47,7 @@ func NewYataiClient(endpoint, apiToken string) *YataiClient {
}
}
func (c *YataiClient) SetAuth(headers CompoundAIAuthHeaders) {
func (c *YataiClient) SetAuth(headers DynamoAuthHeaders) {
c.headers = headers
}
......
......@@ -24,20 +24,20 @@ import (
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// CompoundAIDeploymentSpec defines the desired state of CompoundAIDeployment.
type CompoundAIDeploymentSpec struct {
// DynamoDeploymentSpec defines the desired state of DynamoDeployment.
type DynamoDeploymentSpec struct {
// required
CompoundAINim string `json:"compoundAINim"`
DynamoNim string `json:"dynamoNim"`
// optional
// key is the name of the service defined in CompoundAINim
// value is the CompoundAINimDeployment override for that service
// if not set, the CompoundAINimDeployment will be used as is
// key is the name of the service defined in DynamoNim
// value is the DynamoNimDeployment override for that service
// if not set, the DynamoNimDeployment will be used as is
// +kubebuilder:validation:Optional
Services map[string]*CompoundAINimDeployment `json:"services,omitempty"`
Services map[string]*DynamoNimDeployment `json:"services,omitempty"`
}
// CompoundAIDeploymentStatus defines the observed state of CompoundAIDeployment.
type CompoundAIDeploymentStatus struct {
// DynamoDeploymentStatus defines the observed state of DynamoDeployment.
type DynamoDeploymentStatus struct {
State string `json:"state,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
}
......@@ -45,28 +45,28 @@ type CompoundAIDeploymentStatus struct {
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// CompoundAIDeployment is the Schema for the compoundaideployments API.
type CompoundAIDeployment struct {
// DynamoDeployment is the Schema for the dynamodeployments API.
type DynamoDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CompoundAIDeploymentSpec `json:"spec,omitempty"`
Status CompoundAIDeploymentStatus `json:"status,omitempty"`
Spec DynamoDeploymentSpec `json:"spec,omitempty"`
Status DynamoDeploymentStatus `json:"status,omitempty"`
}
func (s *CompoundAIDeployment) SetState(state string) {
func (s *DynamoDeployment) SetState(state string) {
s.Status.State = state
}
// +kubebuilder:object:root=true
// CompoundAIDeploymentList contains a list of CompoundAIDeployment.
type CompoundAIDeploymentList struct {
// DynamoDeploymentList contains a list of DynamoDeployment.
type DynamoDeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CompoundAIDeployment `json:"items"`
Items []DynamoDeployment `json:"items"`
}
func init() {
SchemeBuilder.Register(&CompoundAIDeployment{}, &CompoundAIDeploymentList{})
SchemeBuilder.Register(&DynamoDeployment{}, &DynamoDeploymentList{})
}
......@@ -18,34 +18,34 @@
package v1alpha1
import (
compounaiCommon "github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/compoundai/common"
dynamoCommon "github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/dynamo/common"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
CompoundAIDeploymentConditionTypeAvailable = "Available"
CompoundAIDeploymentConditionTypeCompoundAINimFound = "CompoundAINimFound"
CompoundAIDeploymentConditionTypeCompoundAINimRequestFound = "CompoundAINimRequestFound"
DynamoDeploymentConditionTypeAvailable = "Available"
DynamoDeploymentConditionTypeDynamoNimFound = "DynamoNimFound"
DynamoDeploymentConditionTypeDynamoNimRequestFound = "DynamoNimRequestFound"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// CompoundAINimDeploymentSpec defines the desired state of CompoundAINimDeployment
type CompoundAINimDeploymentSpec struct {
// DynamoNimDeploymentSpec defines the desired state of DynamoNimDeployment
type DynamoNimDeploymentSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
Annotations map[string]string `json:"annotations,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
CompoundAINim string `json:"compoundAINim"`
DynamoNim string `json:"dynamoNim"`
// contains the name of the service
ServiceName string `json:"serviceName,omitempty"`
Resources *compounaiCommon.Resources `json:"resources,omitempty"`
Resources *dynamoCommon.Resources `json:"resources,omitempty"`
Autoscaling *Autoscaling `json:"autoscaling,omitempty"`
Envs []corev1.EnvVar `json:"envs,omitempty"`
EnvFromSecret *string `json:"envFromSecret,omitempty"`
......@@ -55,12 +55,12 @@ type CompoundAINimDeploymentSpec struct {
Ingress IngressSpec `json:"ingress,omitempty"`
MonitorExporter *compounaiCommon.MonitorExporterSpec `json:"monitorExporter,omitempty"`
MonitorExporter *dynamoCommon.MonitorExporterSpec `json:"monitorExporter,omitempty"`
// +optional
ExtraPodMetadata *compounaiCommon.ExtraPodMetadata `json:"extraPodMetadata,omitempty"`
ExtraPodMetadata *dynamoCommon.ExtraPodMetadata `json:"extraPodMetadata,omitempty"`
// +optional
ExtraPodSpec *compounaiCommon.ExtraPodSpec `json:"extraPodSpec,omitempty"`
ExtraPodSpec *dynamoCommon.ExtraPodSpec `json:"extraPodSpec,omitempty"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"`
......@@ -88,8 +88,8 @@ type IngressSpec struct {
TLS *IngressTLSSpec `json:"tls,omitempty"`
}
// CompoundAINimDeploymentStatus defines the observed state of CompoundAINimDeployment
type CompoundAINimDeploymentStatus struct {
// DynamoNimDeploymentStatus defines the observed state of DynamoNimDeployment
type DynamoNimDeploymentStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Conditions []metav1.Condition `json:"conditions"`
......@@ -105,31 +105,31 @@ type CompoundAINimDeploymentStatus struct {
//+kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Available"
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// CompoundAINimDeployment is the Schema for the compoundainimdeployments API
type CompoundAINimDeployment struct {
// DynamoNimDeployment is the Schema for the dynamonimdeployments API
type DynamoNimDeployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CompoundAINimDeploymentSpec `json:"spec,omitempty"`
Status CompoundAINimDeploymentStatus `json:"status,omitempty"`
Spec DynamoNimDeploymentSpec `json:"spec,omitempty"`
Status DynamoNimDeploymentStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// CompoundAINimDeploymentList contains a list of CompoundAINimDeployment
type CompoundAINimDeploymentList struct {
// DynamoNimDeploymentList contains a list of DynamoNimDeployment
type DynamoNimDeploymentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CompoundAINimDeployment `json:"items"`
Items []DynamoNimDeployment `json:"items"`
}
func init() {
SchemeBuilder.Register(&CompoundAINimDeployment{}, &CompoundAINimDeploymentList{})
SchemeBuilder.Register(&DynamoNimDeployment{}, &DynamoNimDeploymentList{})
}
func (s *CompoundAINimDeploymentStatus) IsReady() bool {
func (s *DynamoNimDeploymentStatus) IsReady() bool {
for _, condition := range s.Conditions {
if condition.Type == CompoundAIDeploymentConditionTypeAvailable && condition.Status == metav1.ConditionTrue {
if condition.Type == DynamoDeploymentConditionTypeAvailable && condition.Status == metav1.ConditionTrue {
return true
}
}
......
......@@ -18,26 +18,26 @@
package v1alpha1
import (
compoundaiCommon "github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/compoundai/common"
"github.com/dynemo-ai/dynemo/deploy/compoundai/operator/api/compoundai/modelschemas"
dynamoCommon "github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/dynamo/common"
"github.com/dynemo-ai/dynemo/deploy/dynamo/operator/api/dynamo/modelschemas"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
CompoundAINimRequestConditionTypeModelsSeeding = "ModelsSeeding"
CompoundAINimRequestConditionTypeImageBuilding = "ImageBuilding"
CompoundAINimRequestConditionTypeImageExists = "ImageExists"
CompoundAINimRequestConditionTypeImageExistsChecked = "ImageExistsChecked"
CompoundAINimRequestConditionTypeModelsExists = "ModelsExists"
CompoundAINimRequestConditionTypeCompoundAINimAvailable = "CompoundAINimAvailable"
DynamoNimRequestConditionTypeModelsSeeding = "ModelsSeeding"
DynamoNimRequestConditionTypeImageBuilding = "ImageBuilding"
DynamoNimRequestConditionTypeImageExists = "ImageExists"
DynamoNimRequestConditionTypeImageExistsChecked = "ImageExistsChecked"
DynamoNimRequestConditionTypeModelsExists = "ModelsExists"
DynamoNimRequestConditionTypeDynamoNimAvailable = "DynamoNimAvailable"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// CompoundAINimRequestSpec defines the desired state of CompoundAINimRequest
type CompoundAINimRequestSpec struct {
// DynamoNimRequestSpec defines the desired state of DynamoNimRequest
type DynamoNimRequestSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
......@@ -57,9 +57,9 @@ type CompoundAINimRequestSpec struct {
BuildArgs []string `json:"buildArgs,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraPodMetadata *compoundaiCommon.ExtraPodMetadata `json:"imageBuilderExtraPodMetadata,omitempty"`
ImageBuilderExtraPodMetadata *dynamoCommon.ExtraPodMetadata `json:"imageBuilderExtraPodMetadata,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraPodSpec *compoundaiCommon.ExtraPodSpec `json:"imageBuilderExtraPodSpec,omitempty"`
ImageBuilderExtraPodSpec *dynamoCommon.ExtraPodSpec `json:"imageBuilderExtraPodSpec,omitempty"`
// +kubebuilder:validation:Optional
ImageBuilderExtraContainerEnv []corev1.EnvVar `json:"imageBuilderExtraContainerEnv,omitempty"`
// +kubebuilder:validation:Optional
......@@ -75,8 +75,8 @@ type CompoundAINimRequestSpec struct {
DownloaderContainerEnvFrom []corev1.EnvFromSource `json:"downloaderContainerEnvFrom,omitempty"`
}
// CompoundAINimRequestStatus defines the observed state of CompoundAINimRequest
type CompoundAINimRequestStatus struct {
// DynamoNimRequestStatus defines the observed state of DynamoNimRequest
type DynamoNimRequestStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
Conditions []metav1.Condition `json:"conditions"`
......@@ -92,24 +92,24 @@ type CompoundAINimRequestStatus struct {
//+kubebuilder:printcolumn:name="Bento-Available",type="string",JSONPath=".status.conditions[?(@.type=='BentoAvailable')].status",description="Bento Available"
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
// CompoundAINimRequest is the Schema for the compoundainimrequests API
type CompoundAINimRequest struct {
// DynamoNimRequest is the Schema for the dynamonimrequests API
type DynamoNimRequest struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CompoundAINimRequestSpec `json:"spec,omitempty"`
Status CompoundAINimRequestStatus `json:"status,omitempty"`
Spec DynamoNimRequestSpec `json:"spec,omitempty"`
Status DynamoNimRequestStatus `json:"status,omitempty"`
}
//+kubebuilder:object:root=true
// CompoundAINimRequestList contains a list of CompoundAINimRequest
type CompoundAINimRequestList struct {
// DynamoNimRequestList contains a list of DynamoNimRequest
type DynamoNimRequestList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CompoundAINimRequest `json:"items"`
Items []DynamoNimRequest `json:"items"`
}
func init() {
SchemeBuilder.Register(&CompoundAINimRequest{}, &CompoundAINimRequestList{})
SchemeBuilder.Register(&DynamoNimRequest{}, &DynamoNimRequestList{})
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment