forked from rancher/types
/
types.go
56 lines (46 loc) · 1.12 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package v1
import (
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type WorkloadSpec struct {
DeployConfig DeployConfig
Template v1.PodTemplateSpec
}
type WorkloadStatus struct {
}
type Workload struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkloadSpec `json:"spec"`
Status *WorkloadStatus `json:"status"`
}
type DeployConfig struct {
Scale int64
BatchSize string
DeploymentStrategy *DeployStrategy
}
type DeploymentParallelConfig struct {
StartFirst bool
MinReadySeconds int64
ProgressDeadlineSeconds int64
}
type DeploymentJobConfig struct {
BatchLimit int64
ActiveDeadlineSeconds int64
OnDelete bool
}
type DeploymentOrderedConfig struct {
PartitionSize int64
OnDelete bool
}
type DeploymentGlobalConfig struct {
OnDelete bool
}
type DeployStrategy struct {
Kind string
ParallelConfig *DeploymentParallelConfig
JobConfig *DeploymentJobConfig
OrderedConfig *DeploymentOrderedConfig
GlobalConfig *DeploymentGlobalConfig
}