-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from laincloud/deployd
remove deployd dependency
- Loading branch information
Showing
8 changed files
with
190 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
@@ -1 +1 @@ | ||
2.3.2 | ||
2.4.1 |
This file contains 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 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,143 @@ | ||
package spec | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/mijia/adoc" | ||
) | ||
|
||
type PodGroupWithSpec struct { | ||
Spec PodGroupSpec | ||
PrevState []PodPrevState | ||
PodGroup | ||
} | ||
|
||
type PodGroupSpec struct { | ||
ImSpec | ||
Pod PodSpec | ||
NumInstances int | ||
RestartPolicy RestartPolicy | ||
} | ||
|
||
type ImSpec struct { | ||
Name string | ||
Namespace string | ||
Version int | ||
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
} | ||
|
||
type PodSpec struct { | ||
ImSpec | ||
Network string | ||
Containers []ContainerSpec | ||
Filters []string // for cluster scheduling | ||
Labels map[string]string | ||
Dependencies []Dependency | ||
Annotation string | ||
Stateful bool | ||
SetupTime int | ||
KillTimeout int | ||
PrevState PodPrevState | ||
HealthConfig HealthConfig | ||
} | ||
|
||
type ContainerSpec struct { | ||
ImSpec | ||
Image string | ||
Env []string | ||
User string | ||
WorkingDir string | ||
DnsSearch []string | ||
Volumes []string // a stateful flag | ||
SystemVolumes []string // not a stateful flag, every node has system volumes | ||
CloudVolumes []CloudVolumeSpec | ||
Command []string | ||
Entrypoint []string | ||
CpuLimit int | ||
MemoryLimit int64 | ||
Expose int | ||
LogConfig adoc.LogConfig | ||
} | ||
|
||
type CloudVolumeSpec struct { | ||
Type string | ||
Dirs []string | ||
} | ||
|
||
type Dependency struct { | ||
PodName string | ||
Policy DependencyPolicy | ||
} | ||
|
||
type DependencyPolicy int | ||
|
||
type HealthConfig struct { | ||
Cmd string `json:"cmd"` | ||
Options HealthCnfOptions `json:"options"` | ||
} | ||
|
||
type HealthCnfOptions struct { | ||
Interval int `json:"interval"` | ||
Timeout int `json:"timeout"` | ||
Retries int `json:"retries"` | ||
} | ||
|
||
type RestartPolicy int | ||
|
||
type PodPrevState struct { | ||
NodeName string | ||
IPs []string | ||
} | ||
|
||
type PodGroup struct { | ||
Pods []Pod | ||
BaseRuntime | ||
} | ||
|
||
type Pod struct { | ||
InstanceNo int | ||
Containers []Container | ||
ImRuntime | ||
} | ||
|
||
type Container struct { | ||
// FIXME(mijia): multiple ports supporing, will have multiple entries of <NodePort, ContainerPort, Protocol> | ||
Id string | ||
Runtime adoc.ContainerDetail | ||
NodeName string | ||
NodeIp string | ||
ContainerIp string | ||
NodePort int | ||
ContainerPort int | ||
Protocol string | ||
} | ||
|
||
type ImRuntime struct { | ||
BaseRuntime | ||
TargetState ExpectState | ||
DriftCount int | ||
RestartCount int | ||
RestartAt time.Time | ||
} | ||
|
||
type BaseRuntime struct { | ||
Healthst HealthState | ||
State RunState | ||
OOMkilled bool | ||
LastError string | ||
UpdatedAt time.Time | ||
} | ||
|
||
type HealthState int | ||
|
||
type RunState int | ||
|
||
type ExpectState int | ||
|
||
type SharedPodWithSpec struct { | ||
RefCount int | ||
VerifyTime time.Time | ||
Spec PodSpec | ||
Pod Pod | ||
} |
This file contains 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 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 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