Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pod plaement policy to v1 api with no defaults #92

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/v1/conversion/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions api/v1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading