Skip to content

Commit

Permalink
feat: add resource instance
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed Apr 27, 2023
1 parent 70d0804 commit 044066b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions modelschemas/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type ClusterConfigSchema struct {
DefaultDeploymentKubeNamespace string `json:"default_deployment_kube_namespace"`
IngressIp string `json:"ingress_ip"`
AWS *ClusterConfigAWSSchema `json:"aws"`
ResourceInstances []ResourceInstance `json:"resource_instances"`
}

func (c *ClusterConfigSchema) Scan(value interface{}) error {
Expand Down
2 changes: 2 additions & 0 deletions modelschemas/deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ type RunnerBentoDeploymentOverrides struct {
}

type DeploymentTargetRunnerConfig struct {
ResourceInstance *string `json:"resource_instance,omitempty"`
Resources *DeploymentTargetResources `json:"resources,omitempty"`
HPAConf *DeploymentTargetHPAConf `json:"hpa_conf,omitempty"`
Envs *[]*LabelItemSchema `json:"envs,omitempty"`
Expand Down Expand Up @@ -227,6 +228,7 @@ type RequestQueueConfig struct {
type DeploymentTargetConfig struct {
KubeResourceUid string `json:"kubeResourceUid"`
KubeResourceVersion string `json:"kubeResourceVersion"`
ResourceInstance *string `json:"resource_instance,omitempty"`
Resources *DeploymentTargetResources `json:"resources"`
HPAConf *DeploymentTargetHPAConf `json:"hpa_conf,omitempty"`
Envs *[]*LabelItemSchema `json:"envs,omitempty"`
Expand Down
10 changes: 10 additions & 0 deletions modelschemas/resource_instance.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package modelschemas

type ResourceInstance struct {
ID string `json:"id"`
Name string `json:"name"`
Group string `json:"group"`
Description string `json:"description"`
NodeSelectors map[string]string `json:"node_selectors"`
Resources DeploymentTargetResources `json:"resources"`
}

0 comments on commit 044066b

Please sign in to comment.