Merge pull request #136424 from JoelSpeed/podgroup-union

Mark PodGroupPolicy up with openapi union member tags
This commit is contained in:
Kubernetes Prow Robot 2026-01-30 01:22:06 +05:30 committed by GitHub
commit 8f4c197169
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 38 additions and 2 deletions

View file

@ -19125,7 +19125,15 @@
"description": "Gang specifies that the pods in this group should be scheduled using all-or-nothing semantics."
}
},
"type": "object"
"type": "object",
"x-kubernetes-unions": [
{
"fields-to-discriminateBy": {
"basic": "Basic",
"gang": "Gang"
}
}
]
},
"io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference": {
"description": "TypedLocalObjectReference allows to reference typed object inside the same namespace.",

View file

@ -64,7 +64,15 @@
"description": "Gang specifies that the pods in this group should be scheduled using all-or-nothing semantics."
}
},
"type": "object"
"type": "object",
"x-kubernetes-unions": [
{
"fields-to-discriminateBy": {
"basic": "Basic",
"gang": "Gang"
}
}
]
},
"io.k8s.api.scheduling.v1alpha1.TypedLocalObjectReference": {
"description": "TypedLocalObjectReference allows to reference typed object inside the same namespace.",

View file

@ -53351,6 +53351,18 @@ func schema_k8sio_api_scheduling_v1alpha1_PodGroupPolicy(ref common.ReferenceCal
},
},
},
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-unions": []interface{}{
map[string]interface{}{
"fields-to-discriminateBy": map[string]interface{}{
"basic": "Basic",
"gang": "Gang",
},
},
},
},
},
},
Dependencies: []string{
schedulingv1alpha1.BasicSchedulingPolicy{}.OpenAPIModelName(), schedulingv1alpha1.GangSchedulingPolicy{}.OpenAPIModelName()},

View file

@ -63,6 +63,7 @@ message PodGroup {
}
// PodGroupPolicy defines the scheduling configuration for a PodGroup.
// +union
message PodGroupPolicy {
// Basic specifies that the pods in this group should be scheduled using
// standard Kubernetes scheduling behavior.

View file

@ -181,6 +181,7 @@ type PodGroup struct {
}
// PodGroupPolicy defines the scheduling configuration for a PodGroup.
// +union
type PodGroupPolicy struct {
// Basic specifies that the pods in this group should be scheduled using
// standard Kubernetes scheduling behavior.

View file

@ -14363,6 +14363,12 @@ var schemaYAML = typed.YAMLObject(`types:
- name: gang
type:
namedType: io.k8s.api.scheduling.v1alpha1.GangSchedulingPolicy
unions:
- fields:
- fieldName: basic
discriminatorValue: Basic
- fieldName: gang
discriminatorValue: Gang
- name: io.k8s.api.scheduling.v1alpha1.PriorityClass
map:
fields: