1
0
mirror of https://github.com/rancher/types.git synced 2025-07-31 04:49:37 +00:00

Merge pull request #206 from moelsayed/plan_types

Plan types
This commit is contained in:
Alena Prokharchyk 2018-02-12 16:15:43 -08:00 committed by GitHub
commit 700826b4d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 198 additions and 0 deletions

View File

@ -203,3 +203,56 @@ type IngressConfig struct {
// NodeSelector key pair
NodeSelector map[string]string `yaml:"node_selector" json:"nodeSelector,omitempty"`
}
type RKEPlan struct {
// List of node Plans
Nodes []RKEConfigNodePlan `json:"nodes,omitempty"`
}
type RKEConfigNodePlan struct {
// Node address
Address string `json:"address,omitempty"`
// List of processes that should run on the node
Processes []Process `json:"processes,omitempty"`
// List of portchecks that should be open on the node
PortChecks []PortCheck `json:"portChecks,omitempty"`
}
type Process struct {
// Process Entrypoint command
Command []string `json:"command,omitempty"`
// Process args
Args []string `json:"args,omitempty"`
// Environment variables list
Env []string `json:"env,omitempty"`
// Process docker image
Image string `json:"image,omitempty"`
// Process docker image VolumesFrom
VolumesFrom []string `json:"volumesFrom,omitempty"`
// Process docker container bind mounts
Binds []string `json:"binds,omitempty"`
// Process docker container netwotk mode
NetworkMode string `json:"networkMode,omitempty"`
// Process container restart policy
RestartPolicy string `json:"restartPolicy,omitempty"`
// Process container pid mode
PidMode string `json:"pidMode,omitempty"`
// Run process in privileged container
Privileged bool `json:"privileged,omitempty"`
// Process healthcheck
HealthCheck HealthCheck `json:"healthCheck,omitempty"`
}
type HealthCheck struct {
// Healthcheck URL
URL string `json:"url,omitempty"`
}
type PortCheck struct {
// Portcheck address to check.
Address string `json:"address,omitempty"`
// Port number
Port int `json:"port,omitempty"`
// Port Protocol
Protocol string `json:"protocol,omitempty"`
}

View File

@ -247,6 +247,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*GroupMemberList).DeepCopyInto(out.(*GroupMemberList))
return nil
}, InType: reflect.TypeOf(&GroupMemberList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*HealthCheck).DeepCopyInto(out.(*HealthCheck))
return nil
}, InType: reflect.TypeOf(&HealthCheck{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ImportedConfig).DeepCopyInto(out.(*ImportedConfig))
return nil
@ -411,6 +415,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*PodSecurityPolicyTemplateList).DeepCopyInto(out.(*PodSecurityPolicyTemplateList))
return nil
}, InType: reflect.TypeOf(&PodSecurityPolicyTemplateList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PortCheck).DeepCopyInto(out.(*PortCheck))
return nil
}, InType: reflect.TypeOf(&PortCheck{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Preference).DeepCopyInto(out.(*Preference))
return nil
@ -431,6 +439,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*PrivateRegistry).DeepCopyInto(out.(*PrivateRegistry))
return nil
}, InType: reflect.TypeOf(&PrivateRegistry{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Process).DeepCopyInto(out.(*Process))
return nil
}, InType: reflect.TypeOf(&Process{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Project).DeepCopyInto(out.(*Project))
return nil
@ -491,10 +503,18 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*RKEConfigNode).DeepCopyInto(out.(*RKEConfigNode))
return nil
}, InType: reflect.TypeOf(&RKEConfigNode{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKEConfigNodePlan).DeepCopyInto(out.(*RKEConfigNodePlan))
return nil
}, InType: reflect.TypeOf(&RKEConfigNodePlan{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKEConfigServices).DeepCopyInto(out.(*RKEConfigServices))
return nil
}, InType: reflect.TypeOf(&RKEConfigServices{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKEPlan).DeepCopyInto(out.(*RKEPlan))
return nil
}, InType: reflect.TypeOf(&RKEPlan{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RKESystemImages).DeepCopyInto(out.(*RKESystemImages))
return nil
@ -2199,6 +2219,22 @@ func (in *GroupMemberList) DeepCopyObject() runtime.Object {
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *HealthCheck) DeepCopyInto(out *HealthCheck) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck.
func (in *HealthCheck) DeepCopy() *HealthCheck {
if in == nil {
return nil
}
out := new(HealthCheck)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ImportedConfig) DeepCopyInto(out *ImportedConfig) {
*out = *in
@ -3372,6 +3408,22 @@ func (in *PodSecurityPolicyTemplateList) DeepCopyObject() runtime.Object {
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PortCheck) DeepCopyInto(out *PortCheck) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortCheck.
func (in *PortCheck) DeepCopy() *PortCheck {
if in == nil {
return nil
}
out := new(PortCheck)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Preference) DeepCopyInto(out *Preference) {
*out = *in
@ -3518,6 +3570,48 @@ func (in *PrivateRegistry) DeepCopy() *PrivateRegistry {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Process) DeepCopyInto(out *Process) {
*out = *in
if in.Command != nil {
in, out := &in.Command, &out.Command
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Args != nil {
in, out := &in.Args, &out.Args
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Env != nil {
in, out := &in.Env, &out.Env
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.VolumesFrom != nil {
in, out := &in.VolumesFrom, &out.VolumesFrom
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Binds != nil {
in, out := &in.Binds, &out.Binds
*out = make([]string, len(*in))
copy(*out, *in)
}
out.HealthCheck = in.HealthCheck
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Process.
func (in *Process) DeepCopy() *Process {
if in == nil {
return nil
}
out := new(Process)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Project) DeepCopyInto(out *Project) {
*out = *in
@ -3910,6 +4004,34 @@ func (in *RKEConfigNode) DeepCopy() *RKEConfigNode {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKEConfigNodePlan) DeepCopyInto(out *RKEConfigNodePlan) {
*out = *in
if in.Processes != nil {
in, out := &in.Processes, &out.Processes
*out = make([]Process, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.PortChecks != nil {
in, out := &in.PortChecks, &out.PortChecks
*out = make([]PortCheck, len(*in))
copy(*out, *in)
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEConfigNodePlan.
func (in *RKEConfigNodePlan) DeepCopy() *RKEConfigNodePlan {
if in == nil {
return nil
}
out := new(RKEConfigNodePlan)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKEConfigServices) DeepCopyInto(out *RKEConfigServices) {
*out = *in
@ -3932,6 +4054,29 @@ func (in *RKEConfigServices) DeepCopy() *RKEConfigServices {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKEPlan) DeepCopyInto(out *RKEPlan) {
*out = *in
if in.Nodes != nil {
in, out := &in.Nodes, &out.Nodes
*out = make([]RKEConfigNodePlan, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEPlan.
func (in *RKEPlan) DeepCopy() *RKEPlan {
if in == nil {
return nil
}
out := new(RKEPlan)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RKESystemImages) DeepCopyInto(out *RKESystemImages) {
*out = *in