api: Workload API and Pod WorkloadReference generated files

This commit is contained in:
Maciej Skoczeń 2025-10-10 09:44:19 +00:00
parent 9639274676
commit 078f462a95
106 changed files with 8602 additions and 20 deletions

View file

@ -1627,6 +1627,32 @@
}
],
"version": "v1"
},
{
"freshness": "Current",
"resources": [
{
"resource": "workloads",
"responseKind": {
"group": "",
"kind": "Workload",
"version": ""
},
"scope": "Namespaced",
"singularResource": "workload",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
}
],
"version": "v1alpha1"
}
]
},

View file

@ -221,6 +221,10 @@
{
"groupVersion": "scheduling.k8s.io/v1",
"version": "v1"
},
{
"groupVersion": "scheduling.k8s.io/v1alpha1",
"version": "v1alpha1"
}
]
},

View file

@ -10,6 +10,10 @@
{
"groupVersion": "scheduling.k8s.io/v1",
"version": "v1"
},
{
"groupVersion": "scheduling.k8s.io/v1alpha1",
"version": "v1alpha1"
}
]
}

View file

@ -0,0 +1,24 @@
{
"apiVersion": "v1",
"groupVersion": "scheduling.k8s.io/v1alpha1",
"kind": "APIResourceList",
"resources": [
{
"kind": "Workload",
"name": "workloads",
"namespaced": true,
"singularName": "workload",
"storageVersionHash": "7X3nQnlLxCA=",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
}
]
}

File diff suppressed because it is too large Load diff

View file

@ -6054,6 +6054,14 @@
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
"workloadRef": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.WorkloadReference"
}
],
"description": "WorkloadRef provides a reference to the Workload object that this Pod belongs to. This field is used by the scheduler to identify the PodGroup and apply the correct group scheduling policies. The Workload object referenced by this field may not exist at the time the Pod is created. This field is immutable, but a Workload object with the same name may be recreated with different policies. Doing this during pod scheduling may result in the placement not conforming to the expected policies."
}
},
"required": [
@ -8872,6 +8880,30 @@
},
"type": "object"
},
"io.k8s.api.core.v1.WorkloadReference": {
"description": "WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.",
"properties": {
"name": {
"default": "",
"description": "Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.",
"type": "string"
},
"podGroup": {
"default": "",
"description": "PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.",
"type": "string"
},
"podGroupReplicaKey": {
"description": "PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.",
"type": "string"
}
},
"required": [
"name",
"podGroup"
],
"type": "object"
},
"io.k8s.api.policy.v1.Eviction": {
"description": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.",
"properties": {

View file

@ -4219,6 +4219,14 @@
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
"workloadRef": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.WorkloadReference"
}
],
"description": "WorkloadRef provides a reference to the Workload object that this Pod belongs to. This field is used by the scheduler to identify the PodGroup and apply the correct group scheduling policies. The Workload object referenced by this field may not exist at the time the Pod is created. This field is immutable, but a Workload object with the same name may be recreated with different policies. Doing this during pod scheduling may result in the placement not conforming to the expected policies."
}
},
"required": [
@ -5550,6 +5558,30 @@
},
"type": "object"
},
"io.k8s.api.core.v1.WorkloadReference": {
"description": "WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.",
"properties": {
"name": {
"default": "",
"description": "Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.",
"type": "string"
},
"podGroup": {
"default": "",
"description": "PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.",
"type": "string"
},
"podGroupReplicaKey": {
"description": "PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.",
"type": "string"
}
},
"required": [
"name",
"podGroup"
],
"type": "object"
},
"io.k8s.apimachinery.pkg.api.resource.Quantity": {
"description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.",
"oneOf": [

View file

@ -3410,6 +3410,14 @@
"x-kubernetes-list-type": "map",
"x-kubernetes-patch-merge-key": "name",
"x-kubernetes-patch-strategy": "merge,retainKeys"
},
"workloadRef": {
"allOf": [
{
"$ref": "#/components/schemas/io.k8s.api.core.v1.WorkloadReference"
}
],
"description": "WorkloadRef provides a reference to the Workload object that this Pod belongs to. This field is used by the scheduler to identify the PodGroup and apply the correct group scheduling policies. The Workload object referenced by this field may not exist at the time the Pod is created. This field is immutable, but a Workload object with the same name may be recreated with different policies. Doing this during pod scheduling may result in the placement not conforming to the expected policies."
}
},
"required": [
@ -4741,6 +4749,30 @@
},
"type": "object"
},
"io.k8s.api.core.v1.WorkloadReference": {
"description": "WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.",
"properties": {
"name": {
"default": "",
"description": "Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.",
"type": "string"
},
"podGroup": {
"default": "",
"description": "PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.",
"type": "string"
},
"podGroupReplicaKey": {
"description": "PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.",
"type": "string"
}
},
"required": [
"name",
"podGroup"
],
"type": "object"
},
"io.k8s.apimachinery.pkg.api.resource.Quantity": {
"description": "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` <quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber> ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.",
"oneOf": [

File diff suppressed because it is too large Load diff

View file

@ -2337,6 +2337,16 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*corev1.WorkloadReference)(nil), (*core.WorkloadReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_WorkloadReference_To_core_WorkloadReference(a.(*corev1.WorkloadReference), b.(*core.WorkloadReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*core.WorkloadReference)(nil), (*corev1.WorkloadReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_core_WorkloadReference_To_v1_WorkloadReference(a.(*core.WorkloadReference), b.(*corev1.WorkloadReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*corev1.NodeProxyOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_url_Values_To_v1_NodeProxyOptions(a.(*url.Values), b.(*corev1.NodeProxyOptions), scope)
}); err != nil {
@ -7006,6 +7016,7 @@ func autoConvert_v1_PodSpec_To_core_PodSpec(in *corev1.PodSpec, out *core.PodSpe
out.ResourceClaims = *(*[]core.PodResourceClaim)(unsafe.Pointer(&in.ResourceClaims))
out.Resources = (*core.ResourceRequirements)(unsafe.Pointer(in.Resources))
out.HostnameOverride = (*string)(unsafe.Pointer(in.HostnameOverride))
out.WorkloadRef = (*core.WorkloadReference)(unsafe.Pointer(in.WorkloadRef))
return nil
}
@ -7063,6 +7074,7 @@ func autoConvert_core_PodSpec_To_v1_PodSpec(in *core.PodSpec, out *corev1.PodSpe
out.ResourceClaims = *(*[]corev1.PodResourceClaim)(unsafe.Pointer(&in.ResourceClaims))
out.Resources = (*corev1.ResourceRequirements)(unsafe.Pointer(in.Resources))
out.HostnameOverride = (*string)(unsafe.Pointer(in.HostnameOverride))
out.WorkloadRef = (*corev1.WorkloadReference)(unsafe.Pointer(in.WorkloadRef))
return nil
}
@ -9362,3 +9374,27 @@ func autoConvert_core_WindowsSecurityContextOptions_To_v1_WindowsSecurityContext
func Convert_core_WindowsSecurityContextOptions_To_v1_WindowsSecurityContextOptions(in *core.WindowsSecurityContextOptions, out *corev1.WindowsSecurityContextOptions, s conversion.Scope) error {
return autoConvert_core_WindowsSecurityContextOptions_To_v1_WindowsSecurityContextOptions(in, out, s)
}
func autoConvert_v1_WorkloadReference_To_core_WorkloadReference(in *corev1.WorkloadReference, out *core.WorkloadReference, s conversion.Scope) error {
out.Name = in.Name
out.PodGroup = in.PodGroup
out.PodGroupReplicaKey = in.PodGroupReplicaKey
return nil
}
// Convert_v1_WorkloadReference_To_core_WorkloadReference is an autogenerated conversion function.
func Convert_v1_WorkloadReference_To_core_WorkloadReference(in *corev1.WorkloadReference, out *core.WorkloadReference, s conversion.Scope) error {
return autoConvert_v1_WorkloadReference_To_core_WorkloadReference(in, out, s)
}
func autoConvert_core_WorkloadReference_To_v1_WorkloadReference(in *core.WorkloadReference, out *corev1.WorkloadReference, s conversion.Scope) error {
out.Name = in.Name
out.PodGroup = in.PodGroup
out.PodGroupReplicaKey = in.PodGroupReplicaKey
return nil
}
// Convert_core_WorkloadReference_To_v1_WorkloadReference is an autogenerated conversion function.
func Convert_core_WorkloadReference_To_v1_WorkloadReference(in *core.WorkloadReference, out *corev1.WorkloadReference, s conversion.Scope) error {
return autoConvert_core_WorkloadReference_To_v1_WorkloadReference(in, out, s)
}

View file

@ -4571,6 +4571,11 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) {
*out = new(string)
**out = **in
}
if in.WorkloadRef != nil {
in, out := &in.WorkloadRef, &out.WorkloadRef
*out = new(WorkloadReference)
**out = **in
}
return
}
@ -6846,3 +6851,19 @@ func (in *WindowsSecurityContextOptions) DeepCopy() *WindowsSecurityContextOptio
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadReference) DeepCopyInto(out *WorkloadReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadReference.
func (in *WorkloadReference) DeepCopy() *WorkloadReference {
if in == nil {
return nil
}
out := new(WorkloadReference)
in.DeepCopyInto(out)
return out
}

View file

@ -39,6 +39,46 @@ func init() {
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.BasicSchedulingPolicy)(nil), (*scheduling.BasicSchedulingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_BasicSchedulingPolicy_To_scheduling_BasicSchedulingPolicy(a.(*schedulingv1alpha1.BasicSchedulingPolicy), b.(*scheduling.BasicSchedulingPolicy), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.BasicSchedulingPolicy)(nil), (*schedulingv1alpha1.BasicSchedulingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_BasicSchedulingPolicy_To_v1alpha1_BasicSchedulingPolicy(a.(*scheduling.BasicSchedulingPolicy), b.(*schedulingv1alpha1.BasicSchedulingPolicy), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.GangSchedulingPolicy)(nil), (*scheduling.GangSchedulingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_GangSchedulingPolicy_To_scheduling_GangSchedulingPolicy(a.(*schedulingv1alpha1.GangSchedulingPolicy), b.(*scheduling.GangSchedulingPolicy), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.GangSchedulingPolicy)(nil), (*schedulingv1alpha1.GangSchedulingPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_GangSchedulingPolicy_To_v1alpha1_GangSchedulingPolicy(a.(*scheduling.GangSchedulingPolicy), b.(*schedulingv1alpha1.GangSchedulingPolicy), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.PodGroup)(nil), (*scheduling.PodGroup)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodGroup_To_scheduling_PodGroup(a.(*schedulingv1alpha1.PodGroup), b.(*scheduling.PodGroup), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.PodGroup)(nil), (*schedulingv1alpha1.PodGroup)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_PodGroup_To_v1alpha1_PodGroup(a.(*scheduling.PodGroup), b.(*schedulingv1alpha1.PodGroup), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.PodGroupPolicy)(nil), (*scheduling.PodGroupPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodGroupPolicy_To_scheduling_PodGroupPolicy(a.(*schedulingv1alpha1.PodGroupPolicy), b.(*scheduling.PodGroupPolicy), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.PodGroupPolicy)(nil), (*schedulingv1alpha1.PodGroupPolicy)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_PodGroupPolicy_To_v1alpha1_PodGroupPolicy(a.(*scheduling.PodGroupPolicy), b.(*schedulingv1alpha1.PodGroupPolicy), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.PriorityClass)(nil), (*scheduling.PriorityClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PriorityClass_To_scheduling_PriorityClass(a.(*schedulingv1alpha1.PriorityClass), b.(*scheduling.PriorityClass), scope)
}); err != nil {
@ -59,9 +99,135 @@ func RegisterConversions(s *runtime.Scheme) error {
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.TypedLocalObjectReference)(nil), (*scheduling.TypedLocalObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_TypedLocalObjectReference_To_scheduling_TypedLocalObjectReference(a.(*schedulingv1alpha1.TypedLocalObjectReference), b.(*scheduling.TypedLocalObjectReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.TypedLocalObjectReference)(nil), (*schedulingv1alpha1.TypedLocalObjectReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_TypedLocalObjectReference_To_v1alpha1_TypedLocalObjectReference(a.(*scheduling.TypedLocalObjectReference), b.(*schedulingv1alpha1.TypedLocalObjectReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.Workload)(nil), (*scheduling.Workload)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_Workload_To_scheduling_Workload(a.(*schedulingv1alpha1.Workload), b.(*scheduling.Workload), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.Workload)(nil), (*schedulingv1alpha1.Workload)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_Workload_To_v1alpha1_Workload(a.(*scheduling.Workload), b.(*schedulingv1alpha1.Workload), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.WorkloadList)(nil), (*scheduling.WorkloadList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_WorkloadList_To_scheduling_WorkloadList(a.(*schedulingv1alpha1.WorkloadList), b.(*scheduling.WorkloadList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.WorkloadList)(nil), (*schedulingv1alpha1.WorkloadList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_WorkloadList_To_v1alpha1_WorkloadList(a.(*scheduling.WorkloadList), b.(*schedulingv1alpha1.WorkloadList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*schedulingv1alpha1.WorkloadSpec)(nil), (*scheduling.WorkloadSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_WorkloadSpec_To_scheduling_WorkloadSpec(a.(*schedulingv1alpha1.WorkloadSpec), b.(*scheduling.WorkloadSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*scheduling.WorkloadSpec)(nil), (*schedulingv1alpha1.WorkloadSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_scheduling_WorkloadSpec_To_v1alpha1_WorkloadSpec(a.(*scheduling.WorkloadSpec), b.(*schedulingv1alpha1.WorkloadSpec), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_BasicSchedulingPolicy_To_scheduling_BasicSchedulingPolicy(in *schedulingv1alpha1.BasicSchedulingPolicy, out *scheduling.BasicSchedulingPolicy, s conversion.Scope) error {
return nil
}
// Convert_v1alpha1_BasicSchedulingPolicy_To_scheduling_BasicSchedulingPolicy is an autogenerated conversion function.
func Convert_v1alpha1_BasicSchedulingPolicy_To_scheduling_BasicSchedulingPolicy(in *schedulingv1alpha1.BasicSchedulingPolicy, out *scheduling.BasicSchedulingPolicy, s conversion.Scope) error {
return autoConvert_v1alpha1_BasicSchedulingPolicy_To_scheduling_BasicSchedulingPolicy(in, out, s)
}
func autoConvert_scheduling_BasicSchedulingPolicy_To_v1alpha1_BasicSchedulingPolicy(in *scheduling.BasicSchedulingPolicy, out *schedulingv1alpha1.BasicSchedulingPolicy, s conversion.Scope) error {
return nil
}
// Convert_scheduling_BasicSchedulingPolicy_To_v1alpha1_BasicSchedulingPolicy is an autogenerated conversion function.
func Convert_scheduling_BasicSchedulingPolicy_To_v1alpha1_BasicSchedulingPolicy(in *scheduling.BasicSchedulingPolicy, out *schedulingv1alpha1.BasicSchedulingPolicy, s conversion.Scope) error {
return autoConvert_scheduling_BasicSchedulingPolicy_To_v1alpha1_BasicSchedulingPolicy(in, out, s)
}
func autoConvert_v1alpha1_GangSchedulingPolicy_To_scheduling_GangSchedulingPolicy(in *schedulingv1alpha1.GangSchedulingPolicy, out *scheduling.GangSchedulingPolicy, s conversion.Scope) error {
out.MinCount = in.MinCount
return nil
}
// Convert_v1alpha1_GangSchedulingPolicy_To_scheduling_GangSchedulingPolicy is an autogenerated conversion function.
func Convert_v1alpha1_GangSchedulingPolicy_To_scheduling_GangSchedulingPolicy(in *schedulingv1alpha1.GangSchedulingPolicy, out *scheduling.GangSchedulingPolicy, s conversion.Scope) error {
return autoConvert_v1alpha1_GangSchedulingPolicy_To_scheduling_GangSchedulingPolicy(in, out, s)
}
func autoConvert_scheduling_GangSchedulingPolicy_To_v1alpha1_GangSchedulingPolicy(in *scheduling.GangSchedulingPolicy, out *schedulingv1alpha1.GangSchedulingPolicy, s conversion.Scope) error {
out.MinCount = in.MinCount
return nil
}
// Convert_scheduling_GangSchedulingPolicy_To_v1alpha1_GangSchedulingPolicy is an autogenerated conversion function.
func Convert_scheduling_GangSchedulingPolicy_To_v1alpha1_GangSchedulingPolicy(in *scheduling.GangSchedulingPolicy, out *schedulingv1alpha1.GangSchedulingPolicy, s conversion.Scope) error {
return autoConvert_scheduling_GangSchedulingPolicy_To_v1alpha1_GangSchedulingPolicy(in, out, s)
}
func autoConvert_v1alpha1_PodGroup_To_scheduling_PodGroup(in *schedulingv1alpha1.PodGroup, out *scheduling.PodGroup, s conversion.Scope) error {
out.Name = in.Name
if err := Convert_v1alpha1_PodGroupPolicy_To_scheduling_PodGroupPolicy(&in.Policy, &out.Policy, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_PodGroup_To_scheduling_PodGroup is an autogenerated conversion function.
func Convert_v1alpha1_PodGroup_To_scheduling_PodGroup(in *schedulingv1alpha1.PodGroup, out *scheduling.PodGroup, s conversion.Scope) error {
return autoConvert_v1alpha1_PodGroup_To_scheduling_PodGroup(in, out, s)
}
func autoConvert_scheduling_PodGroup_To_v1alpha1_PodGroup(in *scheduling.PodGroup, out *schedulingv1alpha1.PodGroup, s conversion.Scope) error {
out.Name = in.Name
if err := Convert_scheduling_PodGroupPolicy_To_v1alpha1_PodGroupPolicy(&in.Policy, &out.Policy, s); err != nil {
return err
}
return nil
}
// Convert_scheduling_PodGroup_To_v1alpha1_PodGroup is an autogenerated conversion function.
func Convert_scheduling_PodGroup_To_v1alpha1_PodGroup(in *scheduling.PodGroup, out *schedulingv1alpha1.PodGroup, s conversion.Scope) error {
return autoConvert_scheduling_PodGroup_To_v1alpha1_PodGroup(in, out, s)
}
func autoConvert_v1alpha1_PodGroupPolicy_To_scheduling_PodGroupPolicy(in *schedulingv1alpha1.PodGroupPolicy, out *scheduling.PodGroupPolicy, s conversion.Scope) error {
out.Basic = (*scheduling.BasicSchedulingPolicy)(unsafe.Pointer(in.Basic))
out.Gang = (*scheduling.GangSchedulingPolicy)(unsafe.Pointer(in.Gang))
return nil
}
// Convert_v1alpha1_PodGroupPolicy_To_scheduling_PodGroupPolicy is an autogenerated conversion function.
func Convert_v1alpha1_PodGroupPolicy_To_scheduling_PodGroupPolicy(in *schedulingv1alpha1.PodGroupPolicy, out *scheduling.PodGroupPolicy, s conversion.Scope) error {
return autoConvert_v1alpha1_PodGroupPolicy_To_scheduling_PodGroupPolicy(in, out, s)
}
func autoConvert_scheduling_PodGroupPolicy_To_v1alpha1_PodGroupPolicy(in *scheduling.PodGroupPolicy, out *schedulingv1alpha1.PodGroupPolicy, s conversion.Scope) error {
out.Basic = (*schedulingv1alpha1.BasicSchedulingPolicy)(unsafe.Pointer(in.Basic))
out.Gang = (*schedulingv1alpha1.GangSchedulingPolicy)(unsafe.Pointer(in.Gang))
return nil
}
// Convert_scheduling_PodGroupPolicy_To_v1alpha1_PodGroupPolicy is an autogenerated conversion function.
func Convert_scheduling_PodGroupPolicy_To_v1alpha1_PodGroupPolicy(in *scheduling.PodGroupPolicy, out *schedulingv1alpha1.PodGroupPolicy, s conversion.Scope) error {
return autoConvert_scheduling_PodGroupPolicy_To_v1alpha1_PodGroupPolicy(in, out, s)
}
func autoConvert_v1alpha1_PriorityClass_To_scheduling_PriorityClass(in *schedulingv1alpha1.PriorityClass, out *scheduling.PriorityClass, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.Value = in.Value
@ -111,3 +277,97 @@ func autoConvert_scheduling_PriorityClassList_To_v1alpha1_PriorityClassList(in *
func Convert_scheduling_PriorityClassList_To_v1alpha1_PriorityClassList(in *scheduling.PriorityClassList, out *schedulingv1alpha1.PriorityClassList, s conversion.Scope) error {
return autoConvert_scheduling_PriorityClassList_To_v1alpha1_PriorityClassList(in, out, s)
}
func autoConvert_v1alpha1_TypedLocalObjectReference_To_scheduling_TypedLocalObjectReference(in *schedulingv1alpha1.TypedLocalObjectReference, out *scheduling.TypedLocalObjectReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_v1alpha1_TypedLocalObjectReference_To_scheduling_TypedLocalObjectReference is an autogenerated conversion function.
func Convert_v1alpha1_TypedLocalObjectReference_To_scheduling_TypedLocalObjectReference(in *schedulingv1alpha1.TypedLocalObjectReference, out *scheduling.TypedLocalObjectReference, s conversion.Scope) error {
return autoConvert_v1alpha1_TypedLocalObjectReference_To_scheduling_TypedLocalObjectReference(in, out, s)
}
func autoConvert_scheduling_TypedLocalObjectReference_To_v1alpha1_TypedLocalObjectReference(in *scheduling.TypedLocalObjectReference, out *schedulingv1alpha1.TypedLocalObjectReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_scheduling_TypedLocalObjectReference_To_v1alpha1_TypedLocalObjectReference is an autogenerated conversion function.
func Convert_scheduling_TypedLocalObjectReference_To_v1alpha1_TypedLocalObjectReference(in *scheduling.TypedLocalObjectReference, out *schedulingv1alpha1.TypedLocalObjectReference, s conversion.Scope) error {
return autoConvert_scheduling_TypedLocalObjectReference_To_v1alpha1_TypedLocalObjectReference(in, out, s)
}
func autoConvert_v1alpha1_Workload_To_scheduling_Workload(in *schedulingv1alpha1.Workload, out *scheduling.Workload, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_WorkloadSpec_To_scheduling_WorkloadSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_Workload_To_scheduling_Workload is an autogenerated conversion function.
func Convert_v1alpha1_Workload_To_scheduling_Workload(in *schedulingv1alpha1.Workload, out *scheduling.Workload, s conversion.Scope) error {
return autoConvert_v1alpha1_Workload_To_scheduling_Workload(in, out, s)
}
func autoConvert_scheduling_Workload_To_v1alpha1_Workload(in *scheduling.Workload, out *schedulingv1alpha1.Workload, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_scheduling_WorkloadSpec_To_v1alpha1_WorkloadSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_scheduling_Workload_To_v1alpha1_Workload is an autogenerated conversion function.
func Convert_scheduling_Workload_To_v1alpha1_Workload(in *scheduling.Workload, out *schedulingv1alpha1.Workload, s conversion.Scope) error {
return autoConvert_scheduling_Workload_To_v1alpha1_Workload(in, out, s)
}
func autoConvert_v1alpha1_WorkloadList_To_scheduling_WorkloadList(in *schedulingv1alpha1.WorkloadList, out *scheduling.WorkloadList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]scheduling.Workload)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_WorkloadList_To_scheduling_WorkloadList is an autogenerated conversion function.
func Convert_v1alpha1_WorkloadList_To_scheduling_WorkloadList(in *schedulingv1alpha1.WorkloadList, out *scheduling.WorkloadList, s conversion.Scope) error {
return autoConvert_v1alpha1_WorkloadList_To_scheduling_WorkloadList(in, out, s)
}
func autoConvert_scheduling_WorkloadList_To_v1alpha1_WorkloadList(in *scheduling.WorkloadList, out *schedulingv1alpha1.WorkloadList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]schedulingv1alpha1.Workload)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_scheduling_WorkloadList_To_v1alpha1_WorkloadList is an autogenerated conversion function.
func Convert_scheduling_WorkloadList_To_v1alpha1_WorkloadList(in *scheduling.WorkloadList, out *schedulingv1alpha1.WorkloadList, s conversion.Scope) error {
return autoConvert_scheduling_WorkloadList_To_v1alpha1_WorkloadList(in, out, s)
}
func autoConvert_v1alpha1_WorkloadSpec_To_scheduling_WorkloadSpec(in *schedulingv1alpha1.WorkloadSpec, out *scheduling.WorkloadSpec, s conversion.Scope) error {
out.ControllerRef = (*scheduling.TypedLocalObjectReference)(unsafe.Pointer(in.ControllerRef))
out.PodGroups = *(*[]scheduling.PodGroup)(unsafe.Pointer(&in.PodGroups))
return nil
}
// Convert_v1alpha1_WorkloadSpec_To_scheduling_WorkloadSpec is an autogenerated conversion function.
func Convert_v1alpha1_WorkloadSpec_To_scheduling_WorkloadSpec(in *schedulingv1alpha1.WorkloadSpec, out *scheduling.WorkloadSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_WorkloadSpec_To_scheduling_WorkloadSpec(in, out, s)
}
func autoConvert_scheduling_WorkloadSpec_To_v1alpha1_WorkloadSpec(in *scheduling.WorkloadSpec, out *schedulingv1alpha1.WorkloadSpec, s conversion.Scope) error {
out.ControllerRef = (*schedulingv1alpha1.TypedLocalObjectReference)(unsafe.Pointer(in.ControllerRef))
out.PodGroups = *(*[]schedulingv1alpha1.PodGroup)(unsafe.Pointer(&in.PodGroups))
return nil
}
// Convert_scheduling_WorkloadSpec_To_v1alpha1_WorkloadSpec is an autogenerated conversion function.
func Convert_scheduling_WorkloadSpec_To_v1alpha1_WorkloadSpec(in *scheduling.WorkloadSpec, out *schedulingv1alpha1.WorkloadSpec, s conversion.Scope) error {
return autoConvert_scheduling_WorkloadSpec_To_v1alpha1_WorkloadSpec(in, out, s)
}

View file

@ -26,6 +26,81 @@ import (
core "k8s.io/kubernetes/pkg/apis/core"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BasicSchedulingPolicy) DeepCopyInto(out *BasicSchedulingPolicy) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicSchedulingPolicy.
func (in *BasicSchedulingPolicy) DeepCopy() *BasicSchedulingPolicy {
if in == nil {
return nil
}
out := new(BasicSchedulingPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GangSchedulingPolicy) DeepCopyInto(out *GangSchedulingPolicy) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GangSchedulingPolicy.
func (in *GangSchedulingPolicy) DeepCopy() *GangSchedulingPolicy {
if in == nil {
return nil
}
out := new(GangSchedulingPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodGroup) DeepCopyInto(out *PodGroup) {
*out = *in
in.Policy.DeepCopyInto(&out.Policy)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroup.
func (in *PodGroup) DeepCopy() *PodGroup {
if in == nil {
return nil
}
out := new(PodGroup)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodGroupPolicy) DeepCopyInto(out *PodGroupPolicy) {
*out = *in
if in.Basic != nil {
in, out := &in.Basic, &out.Basic
*out = new(BasicSchedulingPolicy)
**out = **in
}
if in.Gang != nil {
in, out := &in.Gang, &out.Gang
*out = new(GangSchedulingPolicy)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupPolicy.
func (in *PodGroupPolicy) DeepCopy() *PodGroupPolicy {
if in == nil {
return nil
}
out := new(PodGroupPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PriorityClass) DeepCopyInto(out *PriorityClass) {
*out = *in
@ -89,3 +164,107 @@ func (in *PriorityClassList) DeepCopyObject() runtime.Object {
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedLocalObjectReference.
func (in *TypedLocalObjectReference) DeepCopy() *TypedLocalObjectReference {
if in == nil {
return nil
}
out := new(TypedLocalObjectReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Workload) DeepCopyInto(out *Workload) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
func (in *Workload) DeepCopy() *Workload {
if in == nil {
return nil
}
out := new(Workload)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Workload) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadList) DeepCopyInto(out *WorkloadList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Workload, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList.
func (in *WorkloadList) DeepCopy() *WorkloadList {
if in == nil {
return nil
}
out := new(WorkloadList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *WorkloadList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec) {
*out = *in
if in.ControllerRef != nil {
in, out := &in.ControllerRef, &out.ControllerRef
*out = new(TypedLocalObjectReference)
**out = **in
}
if in.PodGroups != nil {
in, out := &in.PodGroups, &out.PodGroups
*out = make([]PodGroup, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSpec.
func (in *WorkloadSpec) DeepCopy() *WorkloadSpec {
if in == nil {
return nil
}
out := new(WorkloadSpec)
in.DeepCopyInto(out)
return out
}

View file

@ -736,6 +736,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
corev1.VsphereVirtualDiskVolumeSource{}.OpenAPIModelName(): schema_k8sio_api_core_v1_VsphereVirtualDiskVolumeSource(ref),
corev1.WeightedPodAffinityTerm{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WeightedPodAffinityTerm(ref),
corev1.WindowsSecurityContextOptions{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref),
corev1.WorkloadReference{}.OpenAPIModelName(): schema_k8sio_api_core_v1_WorkloadReference(ref),
discoveryv1.Endpoint{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_Endpoint(ref),
discoveryv1.EndpointConditions{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_EndpointConditions(ref),
discoveryv1.EndpointHints{}.OpenAPIModelName(): schema_k8sio_api_discovery_v1_EndpointHints(ref),
@ -1157,8 +1158,16 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
resourcev1beta2.ResourceSliceSpec{}.OpenAPIModelName(): schema_k8sio_api_resource_v1beta2_ResourceSliceSpec(ref),
schedulingv1.PriorityClass{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1_PriorityClass(ref),
schedulingv1.PriorityClassList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1_PriorityClassList(ref),
schedulingv1alpha1.BasicSchedulingPolicy{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_BasicSchedulingPolicy(ref),
schedulingv1alpha1.GangSchedulingPolicy{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_GangSchedulingPolicy(ref),
schedulingv1alpha1.PodGroup{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_PodGroup(ref),
schedulingv1alpha1.PodGroupPolicy{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_PodGroupPolicy(ref),
schedulingv1alpha1.PriorityClass{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref),
schedulingv1alpha1.PriorityClassList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref),
schedulingv1alpha1.TypedLocalObjectReference{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_TypedLocalObjectReference(ref),
schedulingv1alpha1.Workload{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_Workload(ref),
schedulingv1alpha1.WorkloadList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_WorkloadList(ref),
schedulingv1alpha1.WorkloadSpec{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1alpha1_WorkloadSpec(ref),
schedulingv1beta1.PriorityClass{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref),
schedulingv1beta1.PriorityClassList{}.OpenAPIModelName(): schema_k8sio_api_scheduling_v1beta1_PriorityClassList(ref),
storagev1.CSIDriver{}.OpenAPIModelName(): schema_k8sio_api_storage_v1_CSIDriver(ref),
@ -30207,12 +30216,18 @@ func schema_k8sio_api_core_v1_PodSpec(ref common.ReferenceCallback) common.OpenA
Format: "",
},
},
"workloadRef": {
SchemaProps: spec.SchemaProps{
Description: "WorkloadRef provides a reference to the Workload object that this Pod belongs to. This field is used by the scheduler to identify the PodGroup and apply the correct group scheduling policies. The Workload object referenced by this field may not exist at the time the Pod is created. This field is immutable, but a Workload object with the same name may be recreated with different policies. Doing this during pod scheduling may result in the placement not conforming to the expected policies.",
Ref: ref(corev1.WorkloadReference{}.OpenAPIModelName()),
},
},
},
Required: []string{"containers"},
},
},
Dependencies: []string{
corev1.Affinity{}.OpenAPIModelName(), corev1.Container{}.OpenAPIModelName(), corev1.EphemeralContainer{}.OpenAPIModelName(), corev1.HostAlias{}.OpenAPIModelName(), corev1.LocalObjectReference{}.OpenAPIModelName(), corev1.PodDNSConfig{}.OpenAPIModelName(), corev1.PodOS{}.OpenAPIModelName(), corev1.PodReadinessGate{}.OpenAPIModelName(), corev1.PodResourceClaim{}.OpenAPIModelName(), corev1.PodSchedulingGate{}.OpenAPIModelName(), corev1.PodSecurityContext{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), corev1.Toleration{}.OpenAPIModelName(), corev1.TopologySpreadConstraint{}.OpenAPIModelName(), corev1.Volume{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()},
corev1.Affinity{}.OpenAPIModelName(), corev1.Container{}.OpenAPIModelName(), corev1.EphemeralContainer{}.OpenAPIModelName(), corev1.HostAlias{}.OpenAPIModelName(), corev1.LocalObjectReference{}.OpenAPIModelName(), corev1.PodDNSConfig{}.OpenAPIModelName(), corev1.PodOS{}.OpenAPIModelName(), corev1.PodReadinessGate{}.OpenAPIModelName(), corev1.PodResourceClaim{}.OpenAPIModelName(), corev1.PodSchedulingGate{}.OpenAPIModelName(), corev1.PodSecurityContext{}.OpenAPIModelName(), corev1.ResourceRequirements{}.OpenAPIModelName(), corev1.Toleration{}.OpenAPIModelName(), corev1.TopologySpreadConstraint{}.OpenAPIModelName(), corev1.Volume{}.OpenAPIModelName(), corev1.WorkloadReference{}.OpenAPIModelName(), resource.Quantity{}.OpenAPIModelName()},
}
}
@ -34718,6 +34733,43 @@ func schema_k8sio_api_core_v1_WindowsSecurityContextOptions(ref common.Reference
}
}
func schema_k8sio_api_core_v1_WorkloadReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"name": {
SchemaProps: spec.SchemaProps{
Description: "Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"podGroup": {
SchemaProps: spec.SchemaProps{
Description: "PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"podGroupReplicaKey": {
SchemaProps: spec.SchemaProps{
Description: "PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.",
Type: []string{"string"},
Format: "",
},
},
},
Required: []string{"name", "podGroup"},
},
},
}
}
func schema_k8sio_api_discovery_v1_Endpoint(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@ -55029,6 +55081,97 @@ func schema_k8sio_api_scheduling_v1_PriorityClassList(ref common.ReferenceCallba
}
}
func schema_k8sio_api_scheduling_v1alpha1_BasicSchedulingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "BasicSchedulingPolicy indicates that standard Kubernetes scheduling behavior should be used.",
Type: []string{"object"},
},
},
}
}
func schema_k8sio_api_scheduling_v1alpha1_GangSchedulingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "GangSchedulingPolicy defines the parameters for gang scheduling.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"minCount": {
SchemaProps: spec.SchemaProps{
Description: "MinCount is the minimum number of pods that must be schedulable or scheduled at the same time for the scheduler to admit the entire group. It must be a positive integer.",
Default: 0,
Type: []string{"integer"},
Format: "int32",
},
},
},
Required: []string{"minCount"},
},
},
}
}
func schema_k8sio_api_scheduling_v1alpha1_PodGroup(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PodGroup represents a set of pods with a common scheduling policy.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"name": {
SchemaProps: spec.SchemaProps{
Description: "Name is a unique identifier for the PodGroup within the Workload. It must be a DNS label. This field is immutable.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"policy": {
SchemaProps: spec.SchemaProps{
Description: "Policy defines the scheduling policy for this PodGroup.",
Default: map[string]interface{}{},
Ref: ref(schedulingv1alpha1.PodGroupPolicy{}.OpenAPIModelName()),
},
},
},
Required: []string{"name", "policy"},
},
},
Dependencies: []string{
schedulingv1alpha1.PodGroupPolicy{}.OpenAPIModelName()},
}
}
func schema_k8sio_api_scheduling_v1alpha1_PodGroupPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "PodGroupPolicy defines the scheduling configuration for a PodGroup.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"basic": {
SchemaProps: spec.SchemaProps{
Description: "Basic specifies that the pods in this group should be scheduled using standard Kubernetes scheduling behavior.",
Ref: ref(schedulingv1alpha1.BasicSchedulingPolicy{}.OpenAPIModelName()),
},
},
"gang": {
SchemaProps: spec.SchemaProps{
Description: "Gang specifies that the pods in this group should be scheduled using all-or-nothing semantics.",
Ref: ref(schedulingv1alpha1.GangSchedulingPolicy{}.OpenAPIModelName()),
},
},
},
},
},
Dependencies: []string{
schedulingv1alpha1.BasicSchedulingPolicy{}.OpenAPIModelName(), schedulingv1alpha1.GangSchedulingPolicy{}.OpenAPIModelName()},
}
}
func schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@ -55147,6 +55290,182 @@ func schema_k8sio_api_scheduling_v1alpha1_PriorityClassList(ref common.Reference
}
}
func schema_k8sio_api_scheduling_v1alpha1_TypedLocalObjectReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "TypedLocalObjectReference allows to reference typed object inside the same namespace.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"apiGroup": {
SchemaProps: spec.SchemaProps{
Description: "APIGroup is the group for the resource being referenced. If APIGroup is empty, the specified Kind must be in the core API group. For any other third-party types, setting APIGroup is required. It must be a DNS subdomain.",
Type: []string{"string"},
Format: "",
},
},
"kind": {
SchemaProps: spec.SchemaProps{
Description: "Kind is the type of resource being referenced. It must be a path segment name.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
"name": {
SchemaProps: spec.SchemaProps{
Description: "Name is the name of resource being referenced. It must be a path segment name.",
Default: "",
Type: []string{"string"},
Format: "",
},
},
},
Required: []string{"kind", "name"},
},
},
}
}
func schema_k8sio_api_scheduling_v1alpha1_Workload(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "Workload allows for expressing scheduling constraints that should be used when managing lifecycle of workloads from scheduling perspective, including scheduling, preemption, eviction and other phases.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
Type: []string{"string"},
Format: "",
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Description: "Standard object's metadata. Name must be a DNS subdomain.",
Default: map[string]interface{}{},
Ref: ref(metav1.ObjectMeta{}.OpenAPIModelName()),
},
},
"spec": {
SchemaProps: spec.SchemaProps{
Description: "Spec defines the desired behavior of a Workload.",
Default: map[string]interface{}{},
Ref: ref(schedulingv1alpha1.WorkloadSpec{}.OpenAPIModelName()),
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
schedulingv1alpha1.WorkloadSpec{}.OpenAPIModelName(), metav1.ObjectMeta{}.OpenAPIModelName()},
}
}
func schema_k8sio_api_scheduling_v1alpha1_WorkloadList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "WorkloadList contains a list of Workload resources.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"kind": {
SchemaProps: spec.SchemaProps{
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
Type: []string{"string"},
Format: "",
},
},
"metadata": {
SchemaProps: spec.SchemaProps{
Description: "Standard list metadata.",
Default: map[string]interface{}{},
Ref: ref(metav1.ListMeta{}.OpenAPIModelName()),
},
},
"items": {
SchemaProps: spec.SchemaProps{
Description: "Items is the list of Workloads.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref(schedulingv1alpha1.Workload{}.OpenAPIModelName()),
},
},
},
},
},
},
Required: []string{"items"},
},
},
Dependencies: []string{
schedulingv1alpha1.Workload{}.OpenAPIModelName(), metav1.ListMeta{}.OpenAPIModelName()},
}
}
func schema_k8sio_api_scheduling_v1alpha1_WorkloadSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "WorkloadSpec defines the desired state of a Workload.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"controllerRef": {
SchemaProps: spec.SchemaProps{
Description: "ControllerRef is an optional reference to the controlling object, such as a Deployment or Job. This field is intended for use by tools like CLIs to provide a link back to the original workload definition. When set, it cannot be changed.",
Ref: ref(schedulingv1alpha1.TypedLocalObjectReference{}.OpenAPIModelName()),
},
},
"podGroups": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-map-keys": []interface{}{
"name",
},
"x-kubernetes-list-type": "map",
},
},
SchemaProps: spec.SchemaProps{
Description: "PodGroups is the list of pod groups that make up the Workload. The maximum number of pod groups is 8. This field is immutable.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
Ref: ref(schedulingv1alpha1.PodGroup{}.OpenAPIModelName()),
},
},
},
},
},
},
Required: []string{"podGroups"},
},
},
Dependencies: []string{
schedulingv1alpha1.PodGroup{}.OpenAPIModelName(), schedulingv1alpha1.TypedLocalObjectReference{}.OpenAPIModelName()},
}
}
func schema_k8sio_api_scheduling_v1beta1_PriorityClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{

View file

@ -510,6 +510,8 @@ func (m *WeightedPodAffinityTerm) Reset() { *m = WeightedPodAffinityTerm{} }
func (m *WindowsSecurityContextOptions) Reset() { *m = WindowsSecurityContextOptions{} }
func (m *WorkloadReference) Reset() { *m = WorkloadReference{} }
func (m *AWSElasticBlockStoreVolumeSource) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@ -9637,6 +9639,20 @@ func (m *PodSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.WorkloadRef != nil {
{
size, err := m.WorkloadRef.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x2
i--
dAtA[i] = 0xd2
}
if m.HostnameOverride != nil {
i -= len(*m.HostnameOverride)
copy(dAtA[i:], *m.HostnameOverride)
@ -14873,6 +14889,44 @@ func (m *WindowsSecurityContextOptions) MarshalToSizedBuffer(dAtA []byte) (int,
return len(dAtA) - i, nil
}
func (m *WorkloadReference) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *WorkloadReference) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *WorkloadReference) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
i -= len(m.PodGroupReplicaKey)
copy(dAtA[i:], m.PodGroupReplicaKey)
i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodGroupReplicaKey)))
i--
dAtA[i] = 0x1a
i -= len(m.PodGroup)
copy(dAtA[i:], m.PodGroup)
i = encodeVarintGenerated(dAtA, i, uint64(len(m.PodGroup)))
i--
dAtA[i] = 0x12
i -= len(m.Name)
copy(dAtA[i:], m.Name)
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name)))
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
offset -= sovGenerated(v)
base := offset
@ -18436,6 +18490,10 @@ func (m *PodSpec) Size() (n int) {
l = len(*m.HostnameOverride)
n += 2 + l + sovGenerated(uint64(l))
}
if m.WorkloadRef != nil {
l = m.WorkloadRef.Size()
n += 2 + l + sovGenerated(uint64(l))
}
return n
}
@ -20183,6 +20241,21 @@ func (m *WindowsSecurityContextOptions) Size() (n int) {
return n
}
func (m *WorkloadReference) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Name)
n += 1 + l + sovGenerated(uint64(l))
l = len(m.PodGroup)
n += 1 + l + sovGenerated(uint64(l))
l = len(m.PodGroupReplicaKey)
n += 1 + l + sovGenerated(uint64(l))
return n
}
func sovGenerated(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -22827,6 +22900,7 @@ func (this *PodSpec) String() string {
`ResourceClaims:` + repeatedStringForResourceClaims + `,`,
`Resources:` + strings.Replace(this.Resources.String(), "ResourceRequirements", "ResourceRequirements", 1) + `,`,
`HostnameOverride:` + valueToStringGenerated(this.HostnameOverride) + `,`,
`WorkloadRef:` + strings.Replace(this.WorkloadRef.String(), "WorkloadReference", "WorkloadReference", 1) + `,`,
`}`,
}, "")
return s
@ -24110,6 +24184,18 @@ func (this *WindowsSecurityContextOptions) String() string {
}, "")
return s
}
func (this *WorkloadReference) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&WorkloadReference{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`PodGroup:` + fmt.Sprintf("%v", this.PodGroup) + `,`,
`PodGroupReplicaKey:` + fmt.Sprintf("%v", this.PodGroupReplicaKey) + `,`,
`}`,
}, "")
return s
}
func valueToStringGenerated(v interface{}) string {
rv := reflect.ValueOf(v)
if rv.IsNil() {
@ -54645,6 +54731,42 @@ func (m *PodSpec) Unmarshal(dAtA []byte) error {
s := string(dAtA[iNdEx:postIndex])
m.HostnameOverride = &s
iNdEx = postIndex
case 42:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field WorkloadRef", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.WorkloadRef == nil {
m.WorkloadRef = &WorkloadReference{}
}
if err := m.WorkloadRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
@ -70027,6 +70149,152 @@ func (m *WindowsSecurityContextOptions) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *WorkloadReference) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: WorkloadReference: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: WorkloadReference: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PodGroup", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PodGroup = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PodGroupReplicaKey", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PodGroupReplicaKey = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipGenerated(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View file

@ -4734,6 +4734,18 @@ message PodSpec {
// +featureGate=HostnameOverride
// +optional
optional string hostnameOverride = 41;
// WorkloadRef provides a reference to the Workload object that this Pod belongs to.
// This field is used by the scheduler to identify the PodGroup and apply the
// correct group scheduling policies. The Workload object referenced
// by this field may not exist at the time the Pod is created.
// This field is immutable, but a Workload object with the same name
// may be recreated with different policies. Doing this during pod scheduling
// may result in the placement not conforming to the expected policies.
//
// +featureGate=GenericWorkload
// +optional
optional WorkloadReference workloadRef = 42;
}
// PodStatus represents information about the status of a pod. Status may trail the actual
@ -7222,3 +7234,33 @@ message WindowsSecurityContextOptions {
optional bool hostProcess = 4;
}
// WorkloadReference identifies the Workload object and PodGroup membership
// that a Pod belongs to. The scheduler uses this information to apply
// workload-aware scheduling semantics.
message WorkloadReference {
// Name defines the name of the Workload object this Pod belongs to.
// Workload must be in the same namespace as the Pod.
// If it doesn't match any existing Workload, the Pod will remain unschedulable
// until a Workload object is created and observed by the kube-scheduler.
// It must be a DNS subdomain.
//
// +required
optional string name = 1;
// PodGroup is the name of the PodGroup within the Workload that this Pod
// belongs to. If it doesn't match any existing PodGroup within the Workload,
// the Pod will remain unschedulable until the Workload object is recreated
// and observed by the kube-scheduler. It must be a DNS label.
//
// +required
optional string podGroup = 2;
// PodGroupReplicaKey specifies the replica key of the PodGroup to which this
// Pod belongs. It is used to distinguish pods belonging to different replicas
// of the same pod group. The pod group policy is applied separately to each replica.
// When set, it must be a DNS label.
//
// +optional
optional string podGroupReplicaKey = 3;
}

View file

@ -494,3 +494,5 @@ func (*VsphereVirtualDiskVolumeSource) ProtoMessage() {}
func (*WeightedPodAffinityTerm) ProtoMessage() {}
func (*WindowsSecurityContextOptions) ProtoMessage() {}
func (*WorkloadReference) ProtoMessage() {}

View file

@ -1924,6 +1924,7 @@ var map_PodSpec = map[string]string{
"resourceClaims": "ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name.\n\nThis is a stable field but requires that the DynamicResourceAllocation feature gate is enabled.\n\nThis field is immutable.",
"resources": "Resources is the total amount of CPU and Memory resources required by all containers in the pod. It supports specifying Requests and Limits for \"cpu\", \"memory\" and \"hugepages-\" resource names only. ResourceClaims are not supported.\n\nThis field enables fine-grained control over resource allocation for the entire pod, allowing resource sharing among containers in a pod.\n\nThis is an alpha field and requires enabling the PodLevelResources feature gate.",
"hostnameOverride": "HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. This field only specifies the pod's hostname and does not affect its DNS records. When this field is set to a non-empty string: - It takes precedence over the values set in `hostname` and `subdomain`. - The Pod's hostname will be set to this value. - `setHostnameAsFQDN` must be nil or set to false. - `hostNetwork` must be set to false.\n\nThis field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. Requires the HostnameOverride feature gate to be enabled.",
"workloadRef": "WorkloadRef provides a reference to the Workload object that this Pod belongs to. This field is used by the scheduler to identify the PodGroup and apply the correct group scheduling policies. The Workload object referenced by this field may not exist at the time the Pod is created. This field is immutable, but a Workload object with the same name may be recreated with different policies. Doing this during pod scheduling may result in the placement not conforming to the expected policies.",
}
func (PodSpec) SwaggerDoc() map[string]string {
@ -2890,4 +2891,15 @@ func (WindowsSecurityContextOptions) SwaggerDoc() map[string]string {
return map_WindowsSecurityContextOptions
}
var map_WorkloadReference = map[string]string{
"": "WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.",
"name": "Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.",
"podGroup": "PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.",
"podGroupReplicaKey": "PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.",
}
func (WorkloadReference) SwaggerDoc() map[string]string {
return map_WorkloadReference
}
// AUTO-GENERATED FUNCTIONS END HERE

View file

@ -4569,6 +4569,11 @@ func (in *PodSpec) DeepCopyInto(out *PodSpec) {
*out = new(string)
**out = **in
}
if in.WorkloadRef != nil {
in, out := &in.WorkloadRef, &out.WorkloadRef
*out = new(WorkloadReference)
**out = **in
}
return
}
@ -6856,3 +6861,19 @@ func (in *WindowsSecurityContextOptions) DeepCopy() *WindowsSecurityContextOptio
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadReference) DeepCopyInto(out *WorkloadReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadReference.
func (in *WorkloadReference) DeepCopy() *WorkloadReference {
if in == nil {
return nil
}
out := new(WorkloadReference)
in.DeepCopyInto(out)
return out
}

View file

@ -1205,3 +1205,8 @@ func (in WeightedPodAffinityTerm) OpenAPIModelName() string {
func (in WindowsSecurityContextOptions) OpenAPIModelName() string {
return "io.k8s.api.core.v1.WindowsSecurityContextOptions"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in WorkloadReference) OpenAPIModelName() string {
return "io.k8s.api.core.v1.WorkloadReference"
}

File diff suppressed because it is too large Load diff

View file

@ -29,6 +29,52 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "k8s.io/api/scheduling/v1alpha1";
// BasicSchedulingPolicy indicates that standard Kubernetes
// scheduling behavior should be used.
message BasicSchedulingPolicy {
}
// GangSchedulingPolicy defines the parameters for gang scheduling.
message GangSchedulingPolicy {
// MinCount is the minimum number of pods that must be schedulable or scheduled
// at the same time for the scheduler to admit the entire group.
// It must be a positive integer.
//
// +required
optional int32 minCount = 1;
}
// PodGroup represents a set of pods with a common scheduling policy.
message PodGroup {
// Name is a unique identifier for the PodGroup within the Workload.
// It must be a DNS label. This field is immutable.
//
// +required
optional string name = 1;
// Policy defines the scheduling policy for this PodGroup.
//
// +required
optional PodGroupPolicy policy = 3;
}
// PodGroupPolicy defines the scheduling configuration for a PodGroup.
message PodGroupPolicy {
// Basic specifies that the pods in this group should be scheduled using
// standard Kubernetes scheduling behavior.
//
// +optional
// +oneOf=PolicySelection
optional BasicSchedulingPolicy basic = 2;
// Gang specifies that the pods in this group should be scheduled using
// all-or-nothing semantics.
//
// +optional
// +oneOf=PolicySelection
optional GangSchedulingPolicy gang = 3;
}
// DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass.
// PriorityClass defines mapping from a priority class name to the priority
// integer value. The value can be any valid integer.
@ -73,3 +119,72 @@ message PriorityClassList {
repeated PriorityClass items = 2;
}
// TypedLocalObjectReference allows to reference typed object inside the same namespace.
message TypedLocalObjectReference {
// APIGroup is the group for the resource being referenced.
// If APIGroup is empty, the specified Kind must be in the core API group.
// For any other third-party types, setting APIGroup is required.
// It must be a DNS subdomain.
//
// +optional
optional string apiGroup = 1;
// Kind is the type of resource being referenced.
// It must be a path segment name.
//
// +required
optional string kind = 2;
// Name is the name of resource being referenced.
// It must be a path segment name.
//
// +required
optional string name = 3;
}
// Workload allows for expressing scheduling constraints that should be used
// when managing lifecycle of workloads from scheduling perspective,
// including scheduling, preemption, eviction and other phases.
message Workload {
// Standard object's metadata.
// Name must be a DNS subdomain.
//
// +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec defines the desired behavior of a Workload.
//
// +required
optional WorkloadSpec spec = 2;
}
// WorkloadList contains a list of Workload resources.
message WorkloadList {
// Standard list metadata.
//
// +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
// Items is the list of Workloads.
repeated Workload items = 2;
}
// WorkloadSpec defines the desired state of a Workload.
message WorkloadSpec {
// ControllerRef is an optional reference to the controlling object, such as a
// Deployment or Job. This field is intended for use by tools like CLIs
// to provide a link back to the original workload definition.
// When set, it cannot be changed.
//
// +optional
optional TypedLocalObjectReference controllerRef = 1;
// PodGroups is the list of pod groups that make up the Workload.
// The maximum number of pod groups is 8. This field is immutable.
//
// +required
// +listType=map
// +listMapKey=name
repeated PodGroup podGroups = 2;
}

View file

@ -21,6 +21,22 @@ limitations under the License.
package v1alpha1
func (*BasicSchedulingPolicy) ProtoMessage() {}
func (*GangSchedulingPolicy) ProtoMessage() {}
func (*PodGroup) ProtoMessage() {}
func (*PodGroupPolicy) ProtoMessage() {}
func (*PriorityClass) ProtoMessage() {}
func (*PriorityClassList) ProtoMessage() {}
func (*TypedLocalObjectReference) ProtoMessage() {}
func (*Workload) ProtoMessage() {}
func (*WorkloadList) ProtoMessage() {}
func (*WorkloadSpec) ProtoMessage() {}

View file

@ -27,6 +27,43 @@ package v1alpha1
// Those methods can be generated by using hack/update-codegen.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_BasicSchedulingPolicy = map[string]string{
"": "BasicSchedulingPolicy indicates that standard Kubernetes scheduling behavior should be used.",
}
func (BasicSchedulingPolicy) SwaggerDoc() map[string]string {
return map_BasicSchedulingPolicy
}
var map_GangSchedulingPolicy = map[string]string{
"": "GangSchedulingPolicy defines the parameters for gang scheduling.",
"minCount": "MinCount is the minimum number of pods that must be schedulable or scheduled at the same time for the scheduler to admit the entire group. It must be a positive integer.",
}
func (GangSchedulingPolicy) SwaggerDoc() map[string]string {
return map_GangSchedulingPolicy
}
var map_PodGroup = map[string]string{
"": "PodGroup represents a set of pods with a common scheduling policy.",
"name": "Name is a unique identifier for the PodGroup within the Workload. It must be a DNS label. This field is immutable.",
"policy": "Policy defines the scheduling policy for this PodGroup.",
}
func (PodGroup) SwaggerDoc() map[string]string {
return map_PodGroup
}
var map_PodGroupPolicy = map[string]string{
"": "PodGroupPolicy defines the scheduling configuration for a PodGroup.",
"basic": "Basic specifies that the pods in this group should be scheduled using standard Kubernetes scheduling behavior.",
"gang": "Gang specifies that the pods in this group should be scheduled using all-or-nothing semantics.",
}
func (PodGroupPolicy) SwaggerDoc() map[string]string {
return map_PodGroupPolicy
}
var map_PriorityClass = map[string]string{
"": "DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.",
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
@ -50,4 +87,45 @@ func (PriorityClassList) SwaggerDoc() map[string]string {
return map_PriorityClassList
}
var map_TypedLocalObjectReference = map[string]string{
"": "TypedLocalObjectReference allows to reference typed object inside the same namespace.",
"apiGroup": "APIGroup is the group for the resource being referenced. If APIGroup is empty, the specified Kind must be in the core API group. For any other third-party types, setting APIGroup is required. It must be a DNS subdomain.",
"kind": "Kind is the type of resource being referenced. It must be a path segment name.",
"name": "Name is the name of resource being referenced. It must be a path segment name.",
}
func (TypedLocalObjectReference) SwaggerDoc() map[string]string {
return map_TypedLocalObjectReference
}
var map_Workload = map[string]string{
"": "Workload allows for expressing scheduling constraints that should be used when managing lifecycle of workloads from scheduling perspective, including scheduling, preemption, eviction and other phases.",
"metadata": "Standard object's metadata. Name must be a DNS subdomain.",
"spec": "Spec defines the desired behavior of a Workload.",
}
func (Workload) SwaggerDoc() map[string]string {
return map_Workload
}
var map_WorkloadList = map[string]string{
"": "WorkloadList contains a list of Workload resources.",
"metadata": "Standard list metadata.",
"items": "Items is the list of Workloads.",
}
func (WorkloadList) SwaggerDoc() map[string]string {
return map_WorkloadList
}
var map_WorkloadSpec = map[string]string{
"": "WorkloadSpec defines the desired state of a Workload.",
"controllerRef": "ControllerRef is an optional reference to the controlling object, such as a Deployment or Job. This field is intended for use by tools like CLIs to provide a link back to the original workload definition. When set, it cannot be changed.",
"podGroups": "PodGroups is the list of pod groups that make up the Workload. The maximum number of pod groups is 8. This field is immutable.",
}
func (WorkloadSpec) SwaggerDoc() map[string]string {
return map_WorkloadSpec
}
// AUTO-GENERATED FUNCTIONS END HERE

View file

@ -26,6 +26,81 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BasicSchedulingPolicy) DeepCopyInto(out *BasicSchedulingPolicy) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicSchedulingPolicy.
func (in *BasicSchedulingPolicy) DeepCopy() *BasicSchedulingPolicy {
if in == nil {
return nil
}
out := new(BasicSchedulingPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GangSchedulingPolicy) DeepCopyInto(out *GangSchedulingPolicy) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GangSchedulingPolicy.
func (in *GangSchedulingPolicy) DeepCopy() *GangSchedulingPolicy {
if in == nil {
return nil
}
out := new(GangSchedulingPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodGroup) DeepCopyInto(out *PodGroup) {
*out = *in
in.Policy.DeepCopyInto(&out.Policy)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroup.
func (in *PodGroup) DeepCopy() *PodGroup {
if in == nil {
return nil
}
out := new(PodGroup)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodGroupPolicy) DeepCopyInto(out *PodGroupPolicy) {
*out = *in
if in.Basic != nil {
in, out := &in.Basic, &out.Basic
*out = new(BasicSchedulingPolicy)
**out = **in
}
if in.Gang != nil {
in, out := &in.Gang, &out.Gang
*out = new(GangSchedulingPolicy)
**out = **in
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodGroupPolicy.
func (in *PodGroupPolicy) DeepCopy() *PodGroupPolicy {
if in == nil {
return nil
}
out := new(PodGroupPolicy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PriorityClass) DeepCopyInto(out *PriorityClass) {
*out = *in
@ -89,3 +164,107 @@ func (in *PriorityClassList) DeepCopyObject() runtime.Object {
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TypedLocalObjectReference) DeepCopyInto(out *TypedLocalObjectReference) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypedLocalObjectReference.
func (in *TypedLocalObjectReference) DeepCopy() *TypedLocalObjectReference {
if in == nil {
return nil
}
out := new(TypedLocalObjectReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Workload) DeepCopyInto(out *Workload) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
func (in *Workload) DeepCopy() *Workload {
if in == nil {
return nil
}
out := new(Workload)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Workload) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadList) DeepCopyInto(out *WorkloadList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Workload, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList.
func (in *WorkloadList) DeepCopy() *WorkloadList {
if in == nil {
return nil
}
out := new(WorkloadList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *WorkloadList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec) {
*out = *in
if in.ControllerRef != nil {
in, out := &in.ControllerRef, &out.ControllerRef
*out = new(TypedLocalObjectReference)
**out = **in
}
if in.PodGroups != nil {
in, out := &in.PodGroups, &out.PodGroups
*out = make([]PodGroup, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadSpec.
func (in *WorkloadSpec) DeepCopy() *WorkloadSpec {
if in == nil {
return nil
}
out := new(WorkloadSpec)
in.DeepCopyInto(out)
return out
}

View file

@ -21,6 +21,26 @@ limitations under the License.
package v1alpha1
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in BasicSchedulingPolicy) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.BasicSchedulingPolicy"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in GangSchedulingPolicy) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in PodGroup) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.PodGroup"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in PodGroupPolicy) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.PodGroupPolicy"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in PriorityClass) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.PriorityClass"
@ -30,3 +50,23 @@ func (in PriorityClass) OpenAPIModelName() string {
func (in PriorityClassList) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.PriorityClassList"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in TypedLocalObjectReference) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in Workload) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.Workload"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in WorkloadList) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.WorkloadList"
}
// OpenAPIModelName returns the OpenAPI model name for this type.
func (in WorkloadSpec) OpenAPIModelName() string {
return "io.k8s.api.scheduling.v1alpha1.WorkloadSpec"
}

View file

@ -1846,7 +1846,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"updateStrategy": {

View file

@ -1269,6 +1269,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
updateStrategy:
rollingUpdate:
maxSurge: maxSurgeValue

View file

@ -1847,7 +1847,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"strategy": {

View file

@ -1277,6 +1277,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 4
collisionCount: 8

View file

@ -1848,7 +1848,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
}
},

View file

@ -1269,6 +1269,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 5
conditions:

View file

@ -1847,7 +1847,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"volumeClaimTemplates": [

View file

@ -1277,6 +1277,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
updateStrategy:
rollingUpdate:
maxUnavailable: maxUnavailableValue

View file

@ -1847,7 +1847,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"strategy": {

View file

@ -1279,6 +1279,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 4
collisionCount: 8

View file

@ -1847,7 +1847,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"volumeClaimTemplates": [

View file

@ -1277,6 +1277,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
updateStrategy:
rollingUpdate:
maxUnavailable: maxUnavailableValue

View file

@ -1846,7 +1846,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"updateStrategy": {

View file

@ -1269,6 +1269,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
updateStrategy:
rollingUpdate:
maxSurge: maxSurgeValue

View file

@ -1847,7 +1847,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"strategy": {

View file

@ -1277,6 +1277,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 4
collisionCount: 8

View file

@ -1848,7 +1848,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
}
},

View file

@ -1269,6 +1269,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 5
conditions:

View file

@ -1847,7 +1847,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"volumeClaimTemplates": [

View file

@ -1277,6 +1277,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
updateStrategy:
rollingUpdate:
maxUnavailable: maxUnavailableValue

View file

@ -1930,7 +1930,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"ttlSecondsAfterFinished": 8,

View file

@ -1329,6 +1329,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
ttlSecondsAfterFinished: 8
schedule: scheduleValue
startingDeadlineSeconds: 2

View file

@ -1881,7 +1881,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"ttlSecondsAfterFinished": 8,

View file

@ -1293,6 +1293,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
ttlSecondsAfterFinished: 8
status:
active: 4

View file

@ -1930,7 +1930,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"ttlSecondsAfterFinished": 8,

View file

@ -1329,6 +1329,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
ttlSecondsAfterFinished: 8
schedule: scheduleValue
startingDeadlineSeconds: 2

View file

@ -1788,7 +1788,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
},
"status": {
"observedGeneration": 17,

View file

@ -1225,6 +1225,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
conditions:
- lastProbeTime: "2003-01-01T01:01:01Z"

View file

@ -1831,7 +1831,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
}
}

View file

@ -1258,3 +1258,7 @@ template:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue

View file

@ -1837,7 +1837,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
}
},

View file

@ -1263,6 +1263,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 5
conditions:

View file

@ -1846,7 +1846,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"updateStrategy": {

View file

@ -1269,6 +1269,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
templateGeneration: 5
updateStrategy:
rollingUpdate:

View file

@ -1847,7 +1847,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
},
"strategy": {

View file

@ -1279,6 +1279,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 4
collisionCount: 8

View file

@ -1848,7 +1848,12 @@
}
]
},
"hostnameOverride": "hostnameOverrideValue"
"hostnameOverride": "hostnameOverrideValue",
"workloadRef": {
"name": "nameValue",
"podGroup": "podGroupValue",
"podGroupReplicaKey": "podGroupReplicaKeyValue"
}
}
}
},

View file

@ -1269,6 +1269,10 @@ spec:
storagePolicyID: storagePolicyIDValue
storagePolicyName: storagePolicyNameValue
volumePath: volumePathValue
workloadRef:
name: nameValue
podGroup: podGroupValue
podGroupReplicaKey: podGroupReplicaKeyValue
status:
availableReplicas: 5
conditions:

View file

@ -0,0 +1,64 @@
{
"kind": "Workload",
"apiVersion": "scheduling.k8s.io/v1alpha1",
"metadata": {
"name": "nameValue",
"generateName": "generateNameValue",
"namespace": "namespaceValue",
"selfLink": "selfLinkValue",
"uid": "uidValue",
"resourceVersion": "resourceVersionValue",
"generation": 7,
"creationTimestamp": "2008-01-01T01:01:01Z",
"deletionTimestamp": "2009-01-01T01:01:01Z",
"deletionGracePeriodSeconds": 10,
"labels": {
"labelsKey": "labelsValue"
},
"annotations": {
"annotationsKey": "annotationsValue"
},
"ownerReferences": [
{
"apiVersion": "apiVersionValue",
"kind": "kindValue",
"name": "nameValue",
"uid": "uidValue",
"controller": true,
"blockOwnerDeletion": true
}
],
"finalizers": [
"finalizersValue"
],
"managedFields": [
{
"manager": "managerValue",
"operation": "operationValue",
"apiVersion": "apiVersionValue",
"time": "2004-01-01T01:01:01Z",
"fieldsType": "fieldsTypeValue",
"fieldsV1": {},
"subresource": "subresourceValue"
}
]
},
"spec": {
"controllerRef": {
"apiGroup": "apiGroupValue",
"kind": "kindValue",
"name": "nameValue"
},
"podGroups": [
{
"name": "nameValue",
"policy": {
"basic": {},
"gang": {
"minCount": 1
}
}
}
]
}
}

View file

@ -0,0 +1,45 @@
apiVersion: scheduling.k8s.io/v1alpha1
kind: Workload
metadata:
annotations:
annotationsKey: annotationsValue
creationTimestamp: "2008-01-01T01:01:01Z"
deletionGracePeriodSeconds: 10
deletionTimestamp: "2009-01-01T01:01:01Z"
finalizers:
- finalizersValue
generateName: generateNameValue
generation: 7
labels:
labelsKey: labelsValue
managedFields:
- apiVersion: apiVersionValue
fieldsType: fieldsTypeValue
fieldsV1: {}
manager: managerValue
operation: operationValue
subresource: subresourceValue
time: "2004-01-01T01:01:01Z"
name: nameValue
namespace: namespaceValue
ownerReferences:
- apiVersion: apiVersionValue
blockOwnerDeletion: true
controller: true
kind: kindValue
name: nameValue
uid: uidValue
resourceVersion: resourceVersionValue
selfLink: selfLinkValue
uid: uidValue
spec:
controllerRef:
apiGroup: apiGroupValue
kind: kindValue
name: nameValue
podGroups:
- name: nameValue
policy:
basic: {}
gang:
minCount: 1

View file

@ -273,6 +273,14 @@ type PodSpecApplyConfiguration struct {
// This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters.
// Requires the HostnameOverride feature gate to be enabled.
HostnameOverride *string `json:"hostnameOverride,omitempty"`
// WorkloadRef provides a reference to the Workload object that this Pod belongs to.
// This field is used by the scheduler to identify the PodGroup and apply the
// correct group scheduling policies. The Workload object referenced
// by this field may not exist at the time the Pod is created.
// This field is immutable, but a Workload object with the same name
// may be recreated with different policies. Doing this during pod scheduling
// may result in the placement not conforming to the expected policies.
WorkloadRef *WorkloadReferenceApplyConfiguration `json:"workloadRef,omitempty"`
}
// PodSpecApplyConfiguration constructs a declarative configuration of the PodSpec type for use with
@ -669,3 +677,11 @@ func (b *PodSpecApplyConfiguration) WithHostnameOverride(value string) *PodSpecA
b.HostnameOverride = &value
return b
}
// 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 WorkloadRef field is set to the value of the last call.
func (b *PodSpecApplyConfiguration) WithWorkloadRef(value *WorkloadReferenceApplyConfiguration) *PodSpecApplyConfiguration {
b.WorkloadRef = value
return b
}

View file

@ -0,0 +1,74 @@
/*
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 v1
// WorkloadReferenceApplyConfiguration represents a declarative configuration of the WorkloadReference type for use
// with apply.
//
// WorkloadReference identifies the Workload object and PodGroup membership
// that a Pod belongs to. The scheduler uses this information to apply
// workload-aware scheduling semantics.
type WorkloadReferenceApplyConfiguration struct {
// Name defines the name of the Workload object this Pod belongs to.
// Workload must be in the same namespace as the Pod.
// If it doesn't match any existing Workload, the Pod will remain unschedulable
// until a Workload object is created and observed by the kube-scheduler.
// It must be a DNS subdomain.
Name *string `json:"name,omitempty"`
// PodGroup is the name of the PodGroup within the Workload that this Pod
// belongs to. If it doesn't match any existing PodGroup within the Workload,
// the Pod will remain unschedulable until the Workload object is recreated
// and observed by the kube-scheduler. It must be a DNS label.
PodGroup *string `json:"podGroup,omitempty"`
// PodGroupReplicaKey specifies the replica key of the PodGroup to which this
// Pod belongs. It is used to distinguish pods belonging to different replicas
// of the same pod group. The pod group policy is applied separately to each replica.
// When set, it must be a DNS label.
PodGroupReplicaKey *string `json:"podGroupReplicaKey,omitempty"`
}
// WorkloadReferenceApplyConfiguration constructs a declarative configuration of the WorkloadReference type for use with
// apply.
func WorkloadReference() *WorkloadReferenceApplyConfiguration {
return &WorkloadReferenceApplyConfiguration{}
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *WorkloadReferenceApplyConfiguration) WithName(value string) *WorkloadReferenceApplyConfiguration {
b.Name = &value
return b
}
// WithPodGroup sets the PodGroup 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 PodGroup field is set to the value of the last call.
func (b *WorkloadReferenceApplyConfiguration) WithPodGroup(value string) *WorkloadReferenceApplyConfiguration {
b.PodGroup = &value
return b
}
// WithPodGroupReplicaKey sets the PodGroupReplicaKey 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 PodGroupReplicaKey field is set to the value of the last call.
func (b *WorkloadReferenceApplyConfiguration) WithPodGroupReplicaKey(value string) *WorkloadReferenceApplyConfiguration {
b.PodGroupReplicaKey = &value
return b
}

View file

@ -7649,6 +7649,9 @@ var schemaYAML = typed.YAMLObject(`types:
elementRelationship: associative
keys:
- name
- name: workloadRef
type:
namedType: io.k8s.api.core.v1.WorkloadReference
- name: io.k8s.api.core.v1.PodStatus
map:
fields:
@ -9023,6 +9026,20 @@ var schemaYAML = typed.YAMLObject(`types:
- name: runAsUserName
type:
scalar: string
- name: io.k8s.api.core.v1.WorkloadReference
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: podGroup
type:
scalar: string
default: ""
- name: podGroupReplicaKey
type:
scalar: string
- name: io.k8s.api.discovery.v1.Endpoint
map:
fields:
@ -14943,6 +14960,45 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: numeric
default: 0
- name: io.k8s.api.scheduling.v1alpha1.BasicSchedulingPolicy
map:
elementType:
scalar: untyped
list:
elementType:
namedType: __untyped_atomic_
elementRelationship: atomic
map:
elementType:
namedType: __untyped_deduced_
elementRelationship: separable
- name: io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy
map:
fields:
- name: minCount
type:
scalar: numeric
default: 0
- name: io.k8s.api.scheduling.v1alpha1.PodGroup
map:
fields:
- name: name
type:
scalar: string
default: ""
- name: policy
type:
namedType: io.k8s.api.scheduling.v1alpha1.PodGroupPolicy
default: {}
- name: io.k8s.api.scheduling.v1alpha1.PodGroupPolicy
map:
fields:
- name: basic
type:
namedType: io.k8s.api.scheduling.v1alpha1.BasicSchedulingPolicy
- name: gang
type:
namedType: io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy
- name: io.k8s.api.scheduling.v1alpha1.PriorityClass
map:
fields:
@ -14969,6 +15025,51 @@ var schemaYAML = typed.YAMLObject(`types:
type:
scalar: numeric
default: 0
- name: io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference
map:
fields:
- name: apiGroup
type:
scalar: string
- name: kind
type:
scalar: string
default: ""
- name: name
type:
scalar: string
default: ""
- name: io.k8s.api.scheduling.v1alpha1.Workload
map:
fields:
- name: apiVersion
type:
scalar: string
- name: kind
type:
scalar: string
- name: metadata
type:
namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta
default: {}
- name: spec
type:
namedType: io.k8s.api.scheduling.v1alpha1.WorkloadSpec
default: {}
- name: io.k8s.api.scheduling.v1alpha1.WorkloadSpec
map:
fields:
- name: controllerRef
type:
namedType: io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference
- name: podGroups
type:
list:
elementType:
namedType: io.k8s.api.scheduling.v1alpha1.PodGroup
elementRelationship: associative
keys:
- name
- name: io.k8s.api.scheduling.v1beta1.PriorityClass
map:
fields:

View file

@ -0,0 +1,44 @@
/*
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 v1alpha1
// GangSchedulingPolicyApplyConfiguration represents a declarative configuration of the GangSchedulingPolicy type for use
// with apply.
//
// GangSchedulingPolicy defines the parameters for gang scheduling.
type GangSchedulingPolicyApplyConfiguration struct {
// MinCount is the minimum number of pods that must be schedulable or scheduled
// at the same time for the scheduler to admit the entire group.
// It must be a positive integer.
MinCount *int32 `json:"minCount,omitempty"`
}
// GangSchedulingPolicyApplyConfiguration constructs a declarative configuration of the GangSchedulingPolicy type for use with
// apply.
func GangSchedulingPolicy() *GangSchedulingPolicyApplyConfiguration {
return &GangSchedulingPolicyApplyConfiguration{}
}
// WithMinCount sets the MinCount 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 MinCount field is set to the value of the last call.
func (b *GangSchedulingPolicyApplyConfiguration) WithMinCount(value int32) *GangSchedulingPolicyApplyConfiguration {
b.MinCount = &value
return b
}

View file

@ -0,0 +1,53 @@
/*
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 v1alpha1
// PodGroupApplyConfiguration represents a declarative configuration of the PodGroup type for use
// with apply.
//
// PodGroup represents a set of pods with a common scheduling policy.
type PodGroupApplyConfiguration struct {
// Name is a unique identifier for the PodGroup within the Workload.
// It must be a DNS label. This field is immutable.
Name *string `json:"name,omitempty"`
// Policy defines the scheduling policy for this PodGroup.
Policy *PodGroupPolicyApplyConfiguration `json:"policy,omitempty"`
}
// PodGroupApplyConfiguration constructs a declarative configuration of the PodGroup type for use with
// apply.
func PodGroup() *PodGroupApplyConfiguration {
return &PodGroupApplyConfiguration{}
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *PodGroupApplyConfiguration) WithName(value string) *PodGroupApplyConfiguration {
b.Name = &value
return b
}
// WithPolicy sets the Policy 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 Policy field is set to the value of the last call.
func (b *PodGroupApplyConfiguration) WithPolicy(value *PodGroupPolicyApplyConfiguration) *PodGroupApplyConfiguration {
b.Policy = value
return b
}

View file

@ -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 v1alpha1
import (
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
)
// PodGroupPolicyApplyConfiguration represents a declarative configuration of the PodGroupPolicy type for use
// with apply.
//
// PodGroupPolicy defines the scheduling configuration for a PodGroup.
type PodGroupPolicyApplyConfiguration struct {
// Basic specifies that the pods in this group should be scheduled using
// standard Kubernetes scheduling behavior.
Basic *schedulingv1alpha1.BasicSchedulingPolicy `json:"basic,omitempty"`
// Gang specifies that the pods in this group should be scheduled using
// all-or-nothing semantics.
Gang *GangSchedulingPolicyApplyConfiguration `json:"gang,omitempty"`
}
// PodGroupPolicyApplyConfiguration constructs a declarative configuration of the PodGroupPolicy type for use with
// apply.
func PodGroupPolicy() *PodGroupPolicyApplyConfiguration {
return &PodGroupPolicyApplyConfiguration{}
}
// WithBasic sets the Basic 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 Basic field is set to the value of the last call.
func (b *PodGroupPolicyApplyConfiguration) WithBasic(value schedulingv1alpha1.BasicSchedulingPolicy) *PodGroupPolicyApplyConfiguration {
b.Basic = &value
return b
}
// WithGang sets the Gang 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 Gang field is set to the value of the last call.
func (b *PodGroupPolicyApplyConfiguration) WithGang(value *GangSchedulingPolicyApplyConfiguration) *PodGroupPolicyApplyConfiguration {
b.Gang = value
return b
}

View file

@ -0,0 +1,67 @@
/*
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 v1alpha1
// TypedLocalObjectReferenceApplyConfiguration represents a declarative configuration of the TypedLocalObjectReference type for use
// with apply.
//
// TypedLocalObjectReference allows to reference typed object inside the same namespace.
type TypedLocalObjectReferenceApplyConfiguration struct {
// APIGroup is the group for the resource being referenced.
// If APIGroup is empty, the specified Kind must be in the core API group.
// For any other third-party types, setting APIGroup is required.
// It must be a DNS subdomain.
APIGroup *string `json:"apiGroup,omitempty"`
// Kind is the type of resource being referenced.
// It must be a path segment name.
Kind *string `json:"kind,omitempty"`
// Name is the name of resource being referenced.
// It must be a path segment name.
Name *string `json:"name,omitempty"`
}
// TypedLocalObjectReferenceApplyConfiguration constructs a declarative configuration of the TypedLocalObjectReference type for use with
// apply.
func TypedLocalObjectReference() *TypedLocalObjectReferenceApplyConfiguration {
return &TypedLocalObjectReferenceApplyConfiguration{}
}
// WithAPIGroup sets the APIGroup 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 APIGroup field is set to the value of the last call.
func (b *TypedLocalObjectReferenceApplyConfiguration) WithAPIGroup(value string) *TypedLocalObjectReferenceApplyConfiguration {
b.APIGroup = &value
return b
}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *TypedLocalObjectReferenceApplyConfiguration) WithKind(value string) *TypedLocalObjectReferenceApplyConfiguration {
b.Kind = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *TypedLocalObjectReferenceApplyConfiguration) WithName(value string) *TypedLocalObjectReferenceApplyConfiguration {
b.Name = &value
return b
}

View file

@ -0,0 +1,279 @@
/*
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 v1alpha1
import (
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
internal "k8s.io/client-go/applyconfigurations/internal"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// WorkloadApplyConfiguration represents a declarative configuration of the Workload type for use
// with apply.
//
// Workload allows for expressing scheduling constraints that should be used
// when managing lifecycle of workloads from scheduling perspective,
// including scheduling, preemption, eviction and other phases.
type WorkloadApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
// Standard object's metadata.
// Name must be a DNS subdomain.
*v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
// Spec defines the desired behavior of a Workload.
Spec *WorkloadSpecApplyConfiguration `json:"spec,omitempty"`
}
// Workload constructs a declarative configuration of the Workload type for use with
// apply.
func Workload(name, namespace string) *WorkloadApplyConfiguration {
b := &WorkloadApplyConfiguration{}
b.WithName(name)
b.WithNamespace(namespace)
b.WithKind("Workload")
b.WithAPIVersion("scheduling.k8s.io/v1alpha1")
return b
}
// ExtractWorkloadFrom extracts the applied configuration owned by fieldManager from
// workload for the specified subresource. Pass an empty string for subresource to extract
// the main resource. Common subresources include "status", "scale", etc.
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
// ExtractWorkloadFrom provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractWorkloadFrom(workload *schedulingv1alpha1.Workload, fieldManager string, subresource string) (*WorkloadApplyConfiguration, error) {
b := &WorkloadApplyConfiguration{}
err := managedfields.ExtractInto(workload, internal.Parser().Type("io.k8s.api.scheduling.v1alpha1.Workload"), fieldManager, b, subresource)
if err != nil {
return nil, err
}
b.WithName(workload.Name)
b.WithNamespace(workload.Namespace)
b.WithKind("Workload")
b.WithAPIVersion("scheduling.k8s.io/v1alpha1")
return b, nil
}
// ExtractWorkload extracts the applied configuration owned by fieldManager from
// workload. If no managedFields are found in workload for fieldManager, a
// WorkloadApplyConfiguration is returned with only the Name, Namespace (if applicable),
// APIVersion and Kind populated. It is possible that no managed fields were found for because other
// field managers have taken ownership of all the fields previously owned by fieldManager, or because
// the fieldManager never owned fields any fields.
// workload must be a unmodified Workload API object that was retrieved from the Kubernetes API.
// ExtractWorkload provides a way to perform a extract/modify-in-place/apply workflow.
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields.
func ExtractWorkload(workload *schedulingv1alpha1.Workload, fieldManager string) (*WorkloadApplyConfiguration, error) {
return ExtractWorkloadFrom(workload, fieldManager, "")
}
func (b WorkloadApplyConfiguration) IsApplyConfiguration() {}
// WithKind sets the Kind 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 Kind field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithKind(value string) *WorkloadApplyConfiguration {
b.TypeMetaApplyConfiguration.Kind = &value
return b
}
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithAPIVersion(value string) *WorkloadApplyConfiguration {
b.TypeMetaApplyConfiguration.APIVersion = &value
return b
}
// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithName(value string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Name = &value
return b
}
// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithGenerateName(value string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.GenerateName = &value
return b
}
// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithNamespace(value string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Namespace = &value
return b
}
// WithUID sets the UID 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 UID field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithUID(value types.UID) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.UID = &value
return b
}
// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithResourceVersion(value string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
return b
}
// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithGeneration(value int64) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.Generation = &value
return b
}
// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithCreationTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
return b
}
// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
return b
}
// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
return b
}
// WithLabels puts the entries into the Labels field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Labels field,
// overwriting an existing map entries in Labels field with the same key.
func (b *WorkloadApplyConfiguration) WithLabels(entries map[string]string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Labels[k] = v
}
return b
}
// WithAnnotations puts the entries into the Annotations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Annotations field,
// overwriting an existing map entries in Annotations field with the same key.
func (b *WorkloadApplyConfiguration) WithAnnotations(entries map[string]string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
}
for k, v := range entries {
b.ObjectMetaApplyConfiguration.Annotations[k] = v
}
return b
}
// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the OwnerReferences field.
func (b *WorkloadApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
if values[i] == nil {
panic("nil value passed to WithOwnerReferences")
}
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
}
return b
}
// WithFinalizers adds the given value to the Finalizers field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Finalizers field.
func (b *WorkloadApplyConfiguration) WithFinalizers(values ...string) *WorkloadApplyConfiguration {
b.ensureObjectMetaApplyConfigurationExists()
for i := range values {
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
}
return b
}
func (b *WorkloadApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
if b.ObjectMetaApplyConfiguration == nil {
b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
}
}
// WithSpec sets the Spec 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 Spec field is set to the value of the last call.
func (b *WorkloadApplyConfiguration) WithSpec(value *WorkloadSpecApplyConfiguration) *WorkloadApplyConfiguration {
b.Spec = value
return b
}
// GetKind retrieves the value of the Kind field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetKind() *string {
return b.TypeMetaApplyConfiguration.Kind
}
// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetAPIVersion() *string {
return b.TypeMetaApplyConfiguration.APIVersion
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Name
}
// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
func (b *WorkloadApplyConfiguration) GetNamespace() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.ObjectMetaApplyConfiguration.Namespace
}

View file

@ -0,0 +1,61 @@
/*
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 v1alpha1
// WorkloadSpecApplyConfiguration represents a declarative configuration of the WorkloadSpec type for use
// with apply.
//
// WorkloadSpec defines the desired state of a Workload.
type WorkloadSpecApplyConfiguration struct {
// ControllerRef is an optional reference to the controlling object, such as a
// Deployment or Job. This field is intended for use by tools like CLIs
// to provide a link back to the original workload definition.
// When set, it cannot be changed.
ControllerRef *TypedLocalObjectReferenceApplyConfiguration `json:"controllerRef,omitempty"`
// PodGroups is the list of pod groups that make up the Workload.
// The maximum number of pod groups is 8. This field is immutable.
PodGroups []PodGroupApplyConfiguration `json:"podGroups,omitempty"`
}
// WorkloadSpecApplyConfiguration constructs a declarative configuration of the WorkloadSpec type for use with
// apply.
func WorkloadSpec() *WorkloadSpecApplyConfiguration {
return &WorkloadSpecApplyConfiguration{}
}
// WithControllerRef sets the ControllerRef 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 ControllerRef field is set to the value of the last call.
func (b *WorkloadSpecApplyConfiguration) WithControllerRef(value *TypedLocalObjectReferenceApplyConfiguration) *WorkloadSpecApplyConfiguration {
b.ControllerRef = value
return b
}
// WithPodGroups adds the given value to the PodGroups field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the PodGroups field.
func (b *WorkloadSpecApplyConfiguration) WithPodGroups(values ...*PodGroupApplyConfiguration) *WorkloadSpecApplyConfiguration {
for i := range values {
if values[i] == nil {
panic("nil value passed to WithPodGroups")
}
b.PodGroups = append(b.PodGroups, *values[i])
}
return b
}

View file

@ -1084,6 +1084,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationscorev1.WeightedPodAffinityTermApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("WindowsSecurityContextOptions"):
return &applyconfigurationscorev1.WindowsSecurityContextOptionsApplyConfiguration{}
case corev1.SchemeGroupVersion.WithKind("WorkloadReference"):
return &applyconfigurationscorev1.WorkloadReferenceApplyConfiguration{}
// Group=discovery.k8s.io, Version=v1
case discoveryv1.SchemeGroupVersion.WithKind("Endpoint"):
@ -1886,8 +1888,20 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &applyconfigurationsschedulingv1.PriorityClassApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1alpha1
case schedulingv1alpha1.SchemeGroupVersion.WithKind("GangSchedulingPolicy"):
return &applyconfigurationsschedulingv1alpha1.GangSchedulingPolicyApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PodGroup"):
return &applyconfigurationsschedulingv1alpha1.PodGroupApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PodGroupPolicy"):
return &applyconfigurationsschedulingv1alpha1.PodGroupPolicyApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("PriorityClass"):
return &applyconfigurationsschedulingv1alpha1.PriorityClassApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("TypedLocalObjectReference"):
return &applyconfigurationsschedulingv1alpha1.TypedLocalObjectReferenceApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("Workload"):
return &applyconfigurationsschedulingv1alpha1.WorkloadApplyConfiguration{}
case schedulingv1alpha1.SchemeGroupVersion.WithKind("WorkloadSpec"):
return &applyconfigurationsschedulingv1alpha1.WorkloadSpecApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1beta1
case schedulingv1beta1.SchemeGroupVersion.WithKind("PriorityClass"):

View file

@ -426,6 +426,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=scheduling.k8s.io, Version=v1alpha1
case schedulingv1alpha1.SchemeGroupVersion.WithResource("priorityclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().PriorityClasses().Informer()}, nil
case schedulingv1alpha1.SchemeGroupVersion.WithResource("workloads"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Scheduling().V1alpha1().Workloads().Informer()}, nil
// Group=scheduling.k8s.io, Version=v1beta1
case schedulingv1beta1.SchemeGroupVersion.WithResource("priorityclasses"):

View file

@ -26,6 +26,8 @@ import (
type Interface interface {
// PriorityClasses returns a PriorityClassInformer.
PriorityClasses() PriorityClassInformer
// Workloads returns a WorkloadInformer.
Workloads() WorkloadInformer
}
type version struct {
@ -43,3 +45,8 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) PriorityClasses() PriorityClassInformer {
return &priorityClassInformer{factory: v.factory, tweakListOptions: v.tweakListOptions}
}
// Workloads returns a WorkloadInformer.
func (v *version) Workloads() WorkloadInformer {
return &workloadInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}

View file

@ -0,0 +1,102 @@
/*
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 informer-gen. DO NOT EDIT.
package v1alpha1
import (
context "context"
time "time"
apischedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes"
schedulingv1alpha1 "k8s.io/client-go/listers/scheduling/v1alpha1"
cache "k8s.io/client-go/tools/cache"
)
// WorkloadInformer provides access to a shared informer and lister for
// Workloads.
type WorkloadInformer interface {
Informer() cache.SharedIndexInformer
Lister() schedulingv1alpha1.WorkloadLister
}
type workloadInformer struct {
factory internalinterfaces.SharedInformerFactory
tweakListOptions internalinterfaces.TweakListOptionsFunc
namespace string
}
// NewWorkloadInformer constructs a new informer for Workload type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewWorkloadInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
return NewFilteredWorkloadInformer(client, namespace, resyncPeriod, indexers, nil)
}
// NewFilteredWorkloadInformer constructs a new informer for Workload type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
func NewFilteredWorkloadInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).List(context.Background(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).Watch(context.Background(), options)
},
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).List(ctx, options)
},
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
return client.SchedulingV1alpha1().Workloads(namespace).Watch(ctx, options)
},
}, client),
&apischedulingv1alpha1.Workload{},
resyncPeriod,
indexers,
)
}
func (f *workloadInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
return NewFilteredWorkloadInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
}
func (f *workloadInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&apischedulingv1alpha1.Workload{}, f.defaultInformer)
}
func (f *workloadInformer) Lister() schedulingv1alpha1.WorkloadLister {
return schedulingv1alpha1.NewWorkloadLister(f.Informer().GetIndexer())
}

View file

@ -32,6 +32,10 @@ func (c *FakeSchedulingV1alpha1) PriorityClasses() v1alpha1.PriorityClassInterfa
return newFakePriorityClasses(c)
}
func (c *FakeSchedulingV1alpha1) Workloads(namespace string) v1alpha1.WorkloadInterface {
return newFakeWorkloads(c, namespace)
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeSchedulingV1alpha1) RESTClient() rest.Interface {

Some files were not shown because too many files have changed in this diff Show more