Add annotations support.

This commit is contained in:
2023-03-16 11:18:44 +00:00
parent 7500a71056
commit bded5b0250
6 changed files with 59 additions and 5 deletions
+2
View File
@@ -94,6 +94,8 @@ type ManagedJobParameters struct {
ImagePullPolicy string `json:"imagePullPolicy,omitempty"`
// +kubebuilder:validation:Optional
Labels map[string]string `json:"labels,omitempty"`
// +kubebuilder:validation:Optional
Annotations map[string]string `json:"annotations,omitempty"`
}
// ManagedJobSpec defines the desired state of ManagedJob
+7
View File
@@ -213,6 +213,13 @@ func (in *ManagedJobParameters) DeepCopyInto(out *ManagedJobParameters) {
(*out)[key] = val
}
}
if in.Annotations != nil {
in, out := &in.Annotations, &out.Annotations
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedJobParameters.