From 5417c42c24e7a3aae57a12c01e7255e3ab7b46be Mon Sep 17 00:00:00 2001 From: dom4ha Date: Wed, 1 Jul 2026 13:16:05 +0000 Subject: [PATCH] api: regenerate files for WorkloadRef changes Kubernetes-commit: af1d59c80452abc5bea33e05f460842cd39d5eee --- applyconfigurations/internal/internal.go | 20 ++----- .../scheduling/v1alpha3/podgroupspec.go | 15 ++--- .../v1alpha3/podgrouptemplatereference.go | 44 -------------- .../workloadpodgrouptemplatereference.go | 52 ----------------- .../scheduling/v1alpha3/workloadreference.go | 58 +++++++++++++++++++ applyconfigurations/utils.go | 6 +- 6 files changed, 73 insertions(+), 122 deletions(-) delete mode 100644 applyconfigurations/scheduling/v1alpha3/podgrouptemplatereference.go delete mode 100644 applyconfigurations/scheduling/v1alpha3/workloadpodgrouptemplatereference.go create mode 100644 applyconfigurations/scheduling/v1alpha3/workloadreference.go diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index abc82c489..2f35c7339 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -14836,9 +14836,6 @@ var schemaYAML = typed.YAMLObject(`types: namedType: io.k8s.api.scheduling.v1alpha3.DisruptionMode default: single: {} - - name: podGroupTemplateRef - type: - namedType: io.k8s.api.scheduling.v1alpha3.PodGroupTemplateReference - name: preemptionPolicy type: scalar: string @@ -14863,6 +14860,9 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.scheduling.v1alpha3.PodGroupSchedulingPolicy default: {} + - name: workloadRef + type: + namedType: io.k8s.api.scheduling.v1alpha3.WorkloadReference - name: io.k8s.api.scheduling.v1alpha3.PodGroupStatus map: fields: @@ -14913,16 +14913,6 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.scheduling.v1alpha3.PodGroupSchedulingPolicy default: {} -- name: io.k8s.api.scheduling.v1alpha3.PodGroupTemplateReference - map: - fields: - - name: workload - type: - namedType: io.k8s.api.scheduling.v1alpha3.WorkloadPodGroupTemplateReference - unions: - - fields: - - fieldName: workload - discriminatorValue: Workload - name: io.k8s.api.scheduling.v1alpha3.SingleDisruptionMode map: elementType: @@ -14973,10 +14963,10 @@ var schemaYAML = typed.YAMLObject(`types: type: namedType: io.k8s.api.scheduling.v1alpha3.WorkloadSpec default: {} -- name: io.k8s.api.scheduling.v1alpha3.WorkloadPodGroupTemplateReference +- name: io.k8s.api.scheduling.v1alpha3.WorkloadReference map: fields: - - name: podGroupTemplateName + - name: templateName type: scalar: string default: "" diff --git a/applyconfigurations/scheduling/v1alpha3/podgroupspec.go b/applyconfigurations/scheduling/v1alpha3/podgroupspec.go index d0c18063b..e2ed27345 100644 --- a/applyconfigurations/scheduling/v1alpha3/podgroupspec.go +++ b/applyconfigurations/scheduling/v1alpha3/podgroupspec.go @@ -27,9 +27,10 @@ import ( // // PodGroupSpec defines the desired state of a PodGroup. type PodGroupSpecApplyConfiguration struct { - // PodGroupTemplateRef references an optional PodGroup template within other object - // (e.g. Workload) that was used to create the PodGroup. This field is immutable. - PodGroupTemplateRef *PodGroupTemplateReferenceApplyConfiguration `json:"podGroupTemplateRef,omitempty"` + // WorkloadRef references an optional PodGroup template within the Workload + // object that was used to create the PodGroup. + // This field is immutable. + WorkloadRef *WorkloadReferenceApplyConfiguration `json:"workloadRef,omitempty"` // SchedulingPolicy defines the scheduling policy for this instance of the PodGroup. // Controllers are expected to fill this field by copying it from a PodGroupTemplate. SchedulingPolicy *PodGroupSchedulingPolicyApplyConfiguration `json:"schedulingPolicy,omitempty"` @@ -83,11 +84,11 @@ func PodGroupSpec() *PodGroupSpecApplyConfiguration { return &PodGroupSpecApplyConfiguration{} } -// WithPodGroupTemplateRef sets the PodGroupTemplateRef field in the declarative configuration to the given value +// WithWorkloadRef sets the WorkloadRef field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PodGroupTemplateRef field is set to the value of the last call. -func (b *PodGroupSpecApplyConfiguration) WithPodGroupTemplateRef(value *PodGroupTemplateReferenceApplyConfiguration) *PodGroupSpecApplyConfiguration { - b.PodGroupTemplateRef = value +// If called multiple times, the WorkloadRef field is set to the value of the last call. +func (b *PodGroupSpecApplyConfiguration) WithWorkloadRef(value *WorkloadReferenceApplyConfiguration) *PodGroupSpecApplyConfiguration { + b.WorkloadRef = value return b } diff --git a/applyconfigurations/scheduling/v1alpha3/podgrouptemplatereference.go b/applyconfigurations/scheduling/v1alpha3/podgrouptemplatereference.go deleted file mode 100644 index dbb58ec52..000000000 --- a/applyconfigurations/scheduling/v1alpha3/podgrouptemplatereference.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// PodGroupTemplateReferenceApplyConfiguration represents a declarative configuration of the PodGroupTemplateReference type for use -// with apply. -// -// PodGroupTemplateReference references a PodGroup template defined in some object (e.g. Workload). -// Exactly one reference must be set. -type PodGroupTemplateReferenceApplyConfiguration struct { - // Workload references the PodGroupTemplate within the Workload object that was used to create - // the PodGroup. - Workload *WorkloadPodGroupTemplateReferenceApplyConfiguration `json:"workload,omitempty"` -} - -// PodGroupTemplateReferenceApplyConfiguration constructs a declarative configuration of the PodGroupTemplateReference type for use with -// apply. -func PodGroupTemplateReference() *PodGroupTemplateReferenceApplyConfiguration { - return &PodGroupTemplateReferenceApplyConfiguration{} -} - -// WithWorkload sets the Workload field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Workload field is set to the value of the last call. -func (b *PodGroupTemplateReferenceApplyConfiguration) WithWorkload(value *WorkloadPodGroupTemplateReferenceApplyConfiguration) *PodGroupTemplateReferenceApplyConfiguration { - b.Workload = value - return b -} diff --git a/applyconfigurations/scheduling/v1alpha3/workloadpodgrouptemplatereference.go b/applyconfigurations/scheduling/v1alpha3/workloadpodgrouptemplatereference.go deleted file mode 100644 index 9116c5170..000000000 --- a/applyconfigurations/scheduling/v1alpha3/workloadpodgrouptemplatereference.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha3 - -// WorkloadPodGroupTemplateReferenceApplyConfiguration represents a declarative configuration of the WorkloadPodGroupTemplateReference type for use -// with apply. -// -// WorkloadPodGroupTemplateReference references the PodGroupTemplate within the Workload object. -type WorkloadPodGroupTemplateReferenceApplyConfiguration struct { - // WorkloadName defines the name of the Workload object. - WorkloadName *string `json:"workloadName,omitempty"` - // PodGroupTemplateName defines the PodGroupTemplate name within the Workload object. - PodGroupTemplateName *string `json:"podGroupTemplateName,omitempty"` -} - -// WorkloadPodGroupTemplateReferenceApplyConfiguration constructs a declarative configuration of the WorkloadPodGroupTemplateReference type for use with -// apply. -func WorkloadPodGroupTemplateReference() *WorkloadPodGroupTemplateReferenceApplyConfiguration { - return &WorkloadPodGroupTemplateReferenceApplyConfiguration{} -} - -// WithWorkloadName sets the WorkloadName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the WorkloadName field is set to the value of the last call. -func (b *WorkloadPodGroupTemplateReferenceApplyConfiguration) WithWorkloadName(value string) *WorkloadPodGroupTemplateReferenceApplyConfiguration { - b.WorkloadName = &value - return b -} - -// WithPodGroupTemplateName sets the PodGroupTemplateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PodGroupTemplateName field is set to the value of the last call. -func (b *WorkloadPodGroupTemplateReferenceApplyConfiguration) WithPodGroupTemplateName(value string) *WorkloadPodGroupTemplateReferenceApplyConfiguration { - b.PodGroupTemplateName = &value - return b -} diff --git a/applyconfigurations/scheduling/v1alpha3/workloadreference.go b/applyconfigurations/scheduling/v1alpha3/workloadreference.go new file mode 100644 index 000000000..332dbd56f --- /dev/null +++ b/applyconfigurations/scheduling/v1alpha3/workloadreference.go @@ -0,0 +1,58 @@ +/* +Copyright The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha3 + +// WorkloadReferenceApplyConfiguration represents a declarative configuration of the WorkloadReference type for use +// with apply. +// +// WorkloadReference references the Workload object together with the template +// that was used to create a particular PodGroup. +type WorkloadReferenceApplyConfiguration struct { + // WorkloadName is the name of the Workload object that contains a template + // that was used when creating a pod group. It must + // be a DNS name. + // This field is required. + WorkloadName *string `json:"workloadName,omitempty"` + // TemplateName is the name of a template within the Workload object that + // was used to create a pod group. It must be a DNS label. + // This field is required. + TemplateName *string `json:"templateName,omitempty"` +} + +// WorkloadReferenceApplyConfiguration constructs a declarative configuration of the WorkloadReference type for use with +// apply. +func WorkloadReference() *WorkloadReferenceApplyConfiguration { + return &WorkloadReferenceApplyConfiguration{} +} + +// WithWorkloadName sets the WorkloadName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the WorkloadName field is set to the value of the last call. +func (b *WorkloadReferenceApplyConfiguration) WithWorkloadName(value string) *WorkloadReferenceApplyConfiguration { + b.WorkloadName = &value + return b +} + +// WithTemplateName sets the TemplateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TemplateName field is set to the value of the last call. +func (b *WorkloadReferenceApplyConfiguration) WithTemplateName(value string) *WorkloadReferenceApplyConfiguration { + b.TemplateName = &value + return b +} diff --git a/applyconfigurations/utils.go b/applyconfigurations/utils.go index bb3431ee7..1b4af19d9 100644 --- a/applyconfigurations/utils.go +++ b/applyconfigurations/utils.go @@ -1862,16 +1862,14 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &applyconfigurationsschedulingv1alpha3.PodGroupStatusApplyConfiguration{} case schedulingv1alpha3.SchemeGroupVersion.WithKind("PodGroupTemplate"): return &applyconfigurationsschedulingv1alpha3.PodGroupTemplateApplyConfiguration{} - case schedulingv1alpha3.SchemeGroupVersion.WithKind("PodGroupTemplateReference"): - return &applyconfigurationsschedulingv1alpha3.PodGroupTemplateReferenceApplyConfiguration{} case schedulingv1alpha3.SchemeGroupVersion.WithKind("TopologyConstraint"): return &applyconfigurationsschedulingv1alpha3.TopologyConstraintApplyConfiguration{} case schedulingv1alpha3.SchemeGroupVersion.WithKind("TypedLocalObjectReference"): return &applyconfigurationsschedulingv1alpha3.TypedLocalObjectReferenceApplyConfiguration{} case schedulingv1alpha3.SchemeGroupVersion.WithKind("Workload"): return &applyconfigurationsschedulingv1alpha3.WorkloadApplyConfiguration{} - case schedulingv1alpha3.SchemeGroupVersion.WithKind("WorkloadPodGroupTemplateReference"): - return &applyconfigurationsschedulingv1alpha3.WorkloadPodGroupTemplateReferenceApplyConfiguration{} + case schedulingv1alpha3.SchemeGroupVersion.WithKind("WorkloadReference"): + return &applyconfigurationsschedulingv1alpha3.WorkloadReferenceApplyConfiguration{} case schedulingv1alpha3.SchemeGroupVersion.WithKind("WorkloadSpec"): return &applyconfigurationsschedulingv1alpha3.WorkloadSpecApplyConfiguration{}