mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-03 20:40:26 -05:00
Merge pull request #136424 from JoelSpeed/podgroup-union
Mark PodGroupPolicy up with openapi union member tags
This commit is contained in:
commit
8f4c197169
6 changed files with 38 additions and 2 deletions
10
api/openapi-spec/swagger.json
generated
10
api/openapi-spec/swagger.json
generated
|
|
@ -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.",
|
||||
|
|
|
|||
|
|
@ -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.",
|
||||
|
|
|
|||
12
pkg/generated/openapi/zz_generated.openapi.go
generated
12
pkg/generated/openapi/zz_generated.openapi.go
generated
|
|
@ -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()},
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue