diff --git a/api/v1/conversion/conversion.go b/api/v1/conversion/conversion.go index 5abf16b..40ce281 100644 --- a/api/v1/conversion/conversion.go +++ b/api/v1/conversion/conversion.go @@ -117,6 +117,7 @@ func Convert_v1_PodSpec_To_v2_PodSpec(in *v1.PodSpec, out *v2.PodSpec, s convers out.SecurityContext = (*core.PodSecurityContext)(unsafe.Pointer(in.SecurityContext)) out.ImagePullSecrets = *(*[]core.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) // WARNING: in.Affinity requires manual conversion: does not exist in peer-type + out.PodPlacementPolicy = in.PodPlacementPolicy out.SchedulerName = in.SchedulerName out.Tolerations = *(*[]core.Toleration)(unsafe.Pointer(&in.Tolerations)) out.PriorityClassName = in.PriorityClassName @@ -164,6 +165,7 @@ func Convert_v2_PodSpec_To_v1_PodSpec(in *v2.PodSpec, out *v1.PodSpec, s convers out.ShareProcessNamespace = (*bool)(unsafe.Pointer(in.ShareProcessNamespace)) out.SecurityContext = (*core.PodSecurityContext)(unsafe.Pointer(in.SecurityContext)) out.ImagePullSecrets = *(*[]core.LocalObjectReference)(unsafe.Pointer(&in.ImagePullSecrets)) + out.PodPlacementPolicy = in.PodPlacementPolicy out.SchedulerName = in.SchedulerName out.Tolerations = *(*[]core.Toleration)(unsafe.Pointer(&in.Tolerations)) // WARNING: in.HostAliases requires manual conversion: does not exist in peer-type diff --git a/api/v1/openapi_generated.go b/api/v1/openapi_generated.go index 868c844..d69c46e 100644 --- a/api/v1/openapi_generated.go +++ b/api/v1/openapi_generated.go @@ -984,6 +984,12 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback }, }, }, + "podPlacementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PodPlacementPolicy is the reference of the podPlacementPolicy", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, }, }, diff --git a/api/v1/types.go b/api/v1/types.go index 5f55aa5..979f851 100644 --- a/api/v1/types.go +++ b/api/v1/types.go @@ -270,6 +270,10 @@ type PodSpec struct { // +patchMergeKey=mountPath // +patchStrategy=merge VolumeMounts []core.VolumeMount `json:"volumeMounts,omitempty" patchStrategy:"merge" patchMergeKey:"mountPath"` + + // PodPlacementPolicy is the reference of the podPlacementPolicy + // +optional + PodPlacementPolicy *core.LocalObjectReference `json:"podPlacementPolicy,omitempty"` } // ServiceTemplateSpec describes the data a service should have when created from a template diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 52b9367..3889daa 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -497,6 +497,11 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.PodPlacementPolicy != nil { + in, out := &in.PodPlacementPolicy, &out.PodPlacementPolicy + *out = new(corev1.LocalObjectReference) + **out = **in + } return }