@@ -426,3 +426,91 @@ func formatPodHostname(stsName, serviceName, namespace, domain string) string {
426426
427427 return fmt .Sprintf ("%s-0.%s.%s.svc.%s" , stsName , serviceName , namespace , domain )
428428}
429+
430+ // TemplateMeta defines supported metadata settings for template objects.
431+ type TemplateMeta struct {
432+ // Labels are labels applied to the template objects.
433+ // +optional
434+ Labels map [string ]string `json:"labels,omitempty"`
435+ // Annotations are annotations applied to the template objects.
436+ // +optional
437+ Annotations map [string ]string `json:"annotations,omitempty"`
438+ }
439+
440+ // VersionProbeTemplate defines overrides for the version detection Job.
441+ // The structure mirrors batchv1.JobTemplateSpec, exposing only supported fields.
442+ type VersionProbeTemplate struct {
443+ // Metadata applied to the version probe Job.
444+ // +optional
445+ Metadata TemplateMeta `json:"metadata,omitempty"`
446+
447+ // Specification of the desired behavior of the version probe Job.
448+ // +optional
449+ Spec VersionProbeJobSpec `json:"spec,omitempty"`
450+ }
451+
452+ // VersionProbeJobSpec defines Job-level overrides for the version probe.
453+ type VersionProbeJobSpec struct {
454+ // TTLSecondsAfterFinished limits the lifetime of a completed Job.
455+ // +optional
456+ TTLSecondsAfterFinished * int32 `json:"ttlSecondsAfterFinished,omitempty"`
457+
458+ // Template describes the pod that will be created for the version probe Job.
459+ // +optional
460+ Template VersionProbePodTemplate `json:"template,omitempty"`
461+ }
462+
463+ // VersionProbePodTemplate describes overrides for the version probe Pod.
464+ type VersionProbePodTemplate struct {
465+ // Metadata applied to version probe Pods.
466+ // +optional
467+ Metadata TemplateMeta `json:"metadata,omitempty"`
468+
469+ // Specification of the desired behavior of the version probe Pod.
470+ // +optional
471+ Spec VersionProbePodSpec `json:"spec,omitempty"`
472+ }
473+
474+ // VersionProbePodSpec defines Pod-level overrides for the version probe.
475+ // Field names and JSON tags match corev1.PodSpec for strategic merge patch compatibility.
476+ type VersionProbePodSpec struct {
477+ // NodeSelector constrains the version probe Pod to nodes with matching labels.
478+ // +optional
479+ // +mapType=atomic
480+ NodeSelector map [string ]string `json:"nodeSelector,omitempty"`
481+
482+ // Tolerations for the version probe Pod.
483+ // +optional
484+ // +listType=atomic
485+ Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
486+
487+ // SecurityContext holds pod-level security attributes for the version probe Pod.
488+ // +optional
489+ SecurityContext * corev1.PodSecurityContext `json:"securityContext,omitempty"`
490+
491+ // Containers overrides for the version probe Pod.
492+ // The name field is optional — the operator fills it with default container.
493+ // Additional container with the different name may be specified.
494+ // +optional
495+ // +listType=map
496+ // +listMapKey=name
497+ Containers []VersionProbeContainer `json:"containers,omitempty"`
498+ }
499+
500+ // VersionProbeContainer defines container-level overrides for the version probe.
501+ // Field names and JSON tags match corev1.Container so that SMP merges by name.
502+ type VersionProbeContainer struct {
503+ // Name of the container. If empty, the operator sets it to the version probe container name.
504+ // +kubebuilder:default:=version-probe
505+ Name string `json:"name"`
506+
507+ // Resources are the compute resource requirements for the version probe container.
508+ // Deep-merged with operator defaults via SMP.
509+ // +optional
510+ Resources corev1.ResourceRequirements `json:"resources,omitempty"`
511+
512+ // SecurityContext defines the security options for the version probe container.
513+ // Deep-merged with operator defaults via SMP.
514+ // +optional
515+ SecurityContext * corev1.SecurityContext `json:"securityContext,omitempty"`
516+ }
0 commit comments