Skip to content

Commit

Permalink
baetyl-225 add app type (#232)
Browse files Browse the repository at this point in the history
* baetyl-225 add app type

* baetyl-225 add app type
  • Loading branch information
zxxf18 authored Feb 2, 2021
1 parent 170bd56 commit 3ec838e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/v1/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@ package v1

import "time"

const (
AppTypeContainer = "container"
AppTypeFunction = "function"

AppDeployTypeDeployment = "deployment"
AppDeployTypeStatefulSet = "statefulset"
AppDeployTypeDaemonSet = "daemonset"
)

// Application application info
type Application struct {
Name string `json:"name,omitempty" yaml:"name,omitempty" validate:"resourceName"`
Type string `json:"type,omitempty" yaml:"type,omitempty" default:"container"`
DeployType string `json:"deployType,omitempty" yaml:"deployType,omitempty" default:"deployment"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
CreationTimestamp time.Time `json:"createTime,omitempty" yaml:"createTime,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions spec/v1/sync_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ type AppInfo struct {
// AppStats app statistics
type AppStats struct {
AppInfo `yaml:",inline" json:",inline"`
DeployType string `json:"deployType,omitempty" yaml:"deployType,omitempty"`
Status Status `yaml:"status,omitempty" json:"status,omitempty"`
Cause string `yaml:"cause,omitempty" json:"cause,omitempty"`
InstanceStats map[string]InstanceStats `yaml:"instances,omitempty" json:"instances,omitempty"`
Expand Down

0 comments on commit 3ec838e

Please sign in to comment.