mirror of
https://github.com/lukaszraczylo/jobs-manager-operator.git
synced 2026-07-01 05:08:50 +00:00
Completely rebuild the tree generation logic.
This commit is contained in:
@@ -24,10 +24,8 @@ import (
|
||||
type ManagedJobDependencies struct {
|
||||
// +kubebuilder:validation:Optional
|
||||
// +kubebuilder:default=""
|
||||
Group string `json:"group"`
|
||||
// +kubebuilder:validation:Optional
|
||||
// +kubebuilder:default=""
|
||||
Job string `json:"job"`
|
||||
Name string `json:"name"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type ManagedJobDefinition struct {
|
||||
@@ -48,8 +46,9 @@ type ManagedJobDefinition struct {
|
||||
// +kubebuilder:validation:Optional
|
||||
// +kubebuilder:default=pending
|
||||
Status string `json:"status"`
|
||||
// +kubebuilder:validation:Optional
|
||||
// +optional
|
||||
Dependencies ManagedJobDependencies `json:"dependencies"`
|
||||
Dependencies []*ManagedJobDependencies `json:"dependencies"`
|
||||
// +optional
|
||||
CompiledParams ManagedJobParameters `json:"compiledParams"`
|
||||
}
|
||||
@@ -68,6 +67,9 @@ type ManagedJobGroup struct {
|
||||
// +kubebuilder:validation:Optional
|
||||
Params ManagedJobParameters `json:"params"`
|
||||
// +kubebuilder:validation:Optional
|
||||
// +optional
|
||||
Dependencies []*ManagedJobDependencies `json:"dependencies"`
|
||||
// +kubebuilder:validation:Optional
|
||||
// +kubebuilder:default=pending
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
@@ -61,7 +61,17 @@ func (in *ManagedJobDefinition) DeepCopyInto(out *ManagedJobDefinition) {
|
||||
copy(*out, *in)
|
||||
}
|
||||
in.Params.DeepCopyInto(&out.Params)
|
||||
out.Dependencies = in.Dependencies
|
||||
if in.Dependencies != nil {
|
||||
in, out := &in.Dependencies, &out.Dependencies
|
||||
*out = make([]*ManagedJobDependencies, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(ManagedJobDependencies)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
}
|
||||
in.CompiledParams.DeepCopyInto(&out.CompiledParams)
|
||||
}
|
||||
|
||||
@@ -105,6 +115,17 @@ func (in *ManagedJobGroup) DeepCopyInto(out *ManagedJobGroup) {
|
||||
}
|
||||
}
|
||||
in.Params.DeepCopyInto(&out.Params)
|
||||
if in.Dependencies != nil {
|
||||
in, out := &in.Dependencies, &out.Dependencies
|
||||
*out = make([]*ManagedJobDependencies, len(*in))
|
||||
for i := range *in {
|
||||
if (*in)[i] != nil {
|
||||
in, out := &(*in)[i], &(*out)[i]
|
||||
*out = new(ManagedJobDependencies)
|
||||
**out = **in
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedJobGroup.
|
||||
|
||||
Reference in New Issue
Block a user