github.com/kubeflow/training-operator@v1.7.0/pkg/apis/kubeflow.org/v1/openapi_generated.go (about) 1 //go:build !ignore_autogenerated 2 // +build !ignore_autogenerated 3 4 // Copyright 2023 The Kubeflow Authors 5 // 6 // Licensed under the Apache License, Version 2.0 (the "License"); 7 // you may not use this file except in compliance with the License. 8 // You may obtain a copy of the License at 9 // 10 // http://www.apache.org/licenses/LICENSE-2.0 11 // 12 // Unless required by applicable law or agreed to in writing, software 13 // distributed under the License is distributed on an "AS IS" BASIS, 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 // See the License for the specific language governing permissions and 16 // limitations under the License. 17 18 // Code generated by openapi-gen. DO NOT EDIT. 19 20 // This file was autogenerated by openapi-gen. Do not edit it manually! 21 22 package v1 23 24 import ( 25 common "k8s.io/kube-openapi/pkg/common" 26 spec "k8s.io/kube-openapi/pkg/validation/spec" 27 ) 28 29 func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { 30 return map[string]common.OpenAPIDefinition{ 31 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ElasticPolicy": schema_pkg_apis_kubefloworg_v1_ElasticPolicy(ref), 32 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobCondition": schema_pkg_apis_kubefloworg_v1_JobCondition(ref), 33 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus": schema_pkg_apis_kubefloworg_v1_JobStatus(ref), 34 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJob": schema_pkg_apis_kubefloworg_v1_MPIJob(ref), 35 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJobList": schema_pkg_apis_kubefloworg_v1_MPIJobList(ref), 36 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJobSpec": schema_pkg_apis_kubefloworg_v1_MPIJobSpec(ref), 37 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJob": schema_pkg_apis_kubefloworg_v1_MXJob(ref), 38 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobList": schema_pkg_apis_kubefloworg_v1_MXJobList(ref), 39 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobSpec": schema_pkg_apis_kubefloworg_v1_MXJobSpec(ref), 40 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobStatus": schema_pkg_apis_kubefloworg_v1_MXJobStatus(ref), 41 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleElasticPolicy": schema_pkg_apis_kubefloworg_v1_PaddleElasticPolicy(ref), 42 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJob": schema_pkg_apis_kubefloworg_v1_PaddleJob(ref), 43 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJobList": schema_pkg_apis_kubefloworg_v1_PaddleJobList(ref), 44 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJobSpec": schema_pkg_apis_kubefloworg_v1_PaddleJobSpec(ref), 45 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PyTorchJob": schema_pkg_apis_kubefloworg_v1_PyTorchJob(ref), 46 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PyTorchJobList": schema_pkg_apis_kubefloworg_v1_PyTorchJobList(ref), 47 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PyTorchJobSpec": schema_pkg_apis_kubefloworg_v1_PyTorchJobSpec(ref), 48 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RDZVConf": schema_pkg_apis_kubefloworg_v1_RDZVConf(ref), 49 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec": schema_pkg_apis_kubefloworg_v1_ReplicaSpec(ref), 50 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaStatus": schema_pkg_apis_kubefloworg_v1_ReplicaStatus(ref), 51 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy": schema_pkg_apis_kubefloworg_v1_RunPolicy(ref), 52 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.SchedulingPolicy": schema_pkg_apis_kubefloworg_v1_SchedulingPolicy(ref), 53 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.TFJob": schema_pkg_apis_kubefloworg_v1_TFJob(ref), 54 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.TFJobList": schema_pkg_apis_kubefloworg_v1_TFJobList(ref), 55 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.TFJobSpec": schema_pkg_apis_kubefloworg_v1_TFJobSpec(ref), 56 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.XGBoostJob": schema_pkg_apis_kubefloworg_v1_XGBoostJob(ref), 57 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.XGBoostJobList": schema_pkg_apis_kubefloworg_v1_XGBoostJobList(ref), 58 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.XGBoostJobSpec": schema_pkg_apis_kubefloworg_v1_XGBoostJobSpec(ref), 59 } 60 } 61 62 func schema_pkg_apis_kubefloworg_v1_ElasticPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { 63 return common.OpenAPIDefinition{ 64 Schema: spec.Schema{ 65 SchemaProps: spec.SchemaProps{ 66 Type: []string{"object"}, 67 Properties: map[string]spec.Schema{ 68 "minReplicas": { 69 SchemaProps: spec.SchemaProps{ 70 Description: "minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null.", 71 Type: []string{"integer"}, 72 Format: "int32", 73 }, 74 }, 75 "maxReplicas": { 76 SchemaProps: spec.SchemaProps{ 77 Description: "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null.", 78 Type: []string{"integer"}, 79 Format: "int32", 80 }, 81 }, 82 "rdzvBackend": { 83 SchemaProps: spec.SchemaProps{ 84 Type: []string{"string"}, 85 Format: "", 86 }, 87 }, 88 "rdzvPort": { 89 SchemaProps: spec.SchemaProps{ 90 Type: []string{"integer"}, 91 Format: "int32", 92 }, 93 }, 94 "rdzvHost": { 95 SchemaProps: spec.SchemaProps{ 96 Type: []string{"string"}, 97 Format: "", 98 }, 99 }, 100 "rdzvId": { 101 SchemaProps: spec.SchemaProps{ 102 Type: []string{"string"}, 103 Format: "", 104 }, 105 }, 106 "rdzvConf": { 107 SchemaProps: spec.SchemaProps{ 108 Description: "RDZVConf contains additional rendezvous configuration (<key1>=<value1>,<key2>=<value2>,...).", 109 Type: []string{"array"}, 110 Items: &spec.SchemaOrArray{ 111 Schema: &spec.Schema{ 112 SchemaProps: spec.SchemaProps{ 113 Default: map[string]interface{}{}, 114 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RDZVConf"), 115 }, 116 }, 117 }, 118 }, 119 }, 120 "standalone": { 121 SchemaProps: spec.SchemaProps{ 122 Description: "Start a local standalone rendezvous backend that is represented by a C10d TCP store on port 29400. Useful when launching single-node, multi-worker job. If specified --rdzv_backend, --rdzv_endpoint, --rdzv_id are auto-assigned; any explicitly set values are ignored.", 123 Type: []string{"boolean"}, 124 Format: "", 125 }, 126 }, 127 "nProcPerNode": { 128 SchemaProps: spec.SchemaProps{ 129 Description: "Number of workers per node; supported values: [auto, cpu, gpu, int]. Deprecated: This API is deprecated in v1.7+ Use .spec.nprocPerNode instead.", 130 Type: []string{"integer"}, 131 Format: "int32", 132 }, 133 }, 134 "maxRestarts": { 135 SchemaProps: spec.SchemaProps{ 136 Type: []string{"integer"}, 137 Format: "int32", 138 }, 139 }, 140 "metrics": { 141 SchemaProps: spec.SchemaProps{ 142 Description: "Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created.", 143 Type: []string{"array"}, 144 Items: &spec.SchemaOrArray{ 145 Schema: &spec.Schema{ 146 SchemaProps: spec.SchemaProps{ 147 Default: map[string]interface{}{}, 148 Ref: ref("k8s.io/api/autoscaling/v2.MetricSpec"), 149 }, 150 }, 151 }, 152 }, 153 }, 154 }, 155 }, 156 }, 157 Dependencies: []string{ 158 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RDZVConf", "k8s.io/api/autoscaling/v2.MetricSpec"}, 159 } 160 } 161 162 func schema_pkg_apis_kubefloworg_v1_JobCondition(ref common.ReferenceCallback) common.OpenAPIDefinition { 163 return common.OpenAPIDefinition{ 164 Schema: spec.Schema{ 165 SchemaProps: spec.SchemaProps{ 166 Description: "JobCondition describes the state of the job at a certain point.", 167 Type: []string{"object"}, 168 Properties: map[string]spec.Schema{ 169 "type": { 170 SchemaProps: spec.SchemaProps{ 171 Description: "Type of job condition.", 172 Default: "", 173 Type: []string{"string"}, 174 Format: "", 175 }, 176 }, 177 "status": { 178 SchemaProps: spec.SchemaProps{ 179 Description: "Status of the condition, one of True, False, Unknown.", 180 Default: "", 181 Type: []string{"string"}, 182 Format: "", 183 }, 184 }, 185 "reason": { 186 SchemaProps: spec.SchemaProps{ 187 Description: "The reason for the condition's last transition.", 188 Type: []string{"string"}, 189 Format: "", 190 }, 191 }, 192 "message": { 193 SchemaProps: spec.SchemaProps{ 194 Description: "A human readable message indicating details about the transition.", 195 Type: []string{"string"}, 196 Format: "", 197 }, 198 }, 199 "lastUpdateTime": { 200 SchemaProps: spec.SchemaProps{ 201 Description: "The last time this condition was updated.", 202 Default: map[string]interface{}{}, 203 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), 204 }, 205 }, 206 "lastTransitionTime": { 207 SchemaProps: spec.SchemaProps{ 208 Description: "Last time the condition transitioned from one status to another.", 209 Default: map[string]interface{}{}, 210 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), 211 }, 212 }, 213 }, 214 Required: []string{"type", "status"}, 215 }, 216 }, 217 Dependencies: []string{ 218 "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, 219 } 220 } 221 222 func schema_pkg_apis_kubefloworg_v1_JobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { 223 return common.OpenAPIDefinition{ 224 Schema: spec.Schema{ 225 SchemaProps: spec.SchemaProps{ 226 Description: "JobStatus represents the current observed state of the training Job.", 227 Type: []string{"object"}, 228 Properties: map[string]spec.Schema{ 229 "conditions": { 230 SchemaProps: spec.SchemaProps{ 231 Description: "Conditions is an array of current observed job conditions.", 232 Type: []string{"array"}, 233 Items: &spec.SchemaOrArray{ 234 Schema: &spec.Schema{ 235 SchemaProps: spec.SchemaProps{ 236 Default: map[string]interface{}{}, 237 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobCondition"), 238 }, 239 }, 240 }, 241 }, 242 }, 243 "replicaStatuses": { 244 SchemaProps: spec.SchemaProps{ 245 Description: "ReplicaStatuses is map of ReplicaType and ReplicaStatus, specifies the status of each replica.", 246 Type: []string{"object"}, 247 AdditionalProperties: &spec.SchemaOrBool{ 248 Allows: true, 249 Schema: &spec.Schema{ 250 SchemaProps: spec.SchemaProps{ 251 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaStatus"), 252 }, 253 }, 254 }, 255 }, 256 }, 257 "startTime": { 258 SchemaProps: spec.SchemaProps{ 259 Description: "Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", 260 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), 261 }, 262 }, 263 "completionTime": { 264 SchemaProps: spec.SchemaProps{ 265 Description: "Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", 266 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), 267 }, 268 }, 269 "lastReconcileTime": { 270 SchemaProps: spec.SchemaProps{ 271 Description: "Represents last time when the job was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", 272 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), 273 }, 274 }, 275 }, 276 }, 277 }, 278 Dependencies: []string{ 279 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobCondition", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, 280 } 281 } 282 283 func schema_pkg_apis_kubefloworg_v1_MPIJob(ref common.ReferenceCallback) common.OpenAPIDefinition { 284 return common.OpenAPIDefinition{ 285 Schema: spec.Schema{ 286 SchemaProps: spec.SchemaProps{ 287 Type: []string{"object"}, 288 Properties: map[string]spec.Schema{ 289 "kind": { 290 SchemaProps: spec.SchemaProps{ 291 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", 292 Type: []string{"string"}, 293 Format: "", 294 }, 295 }, 296 "apiVersion": { 297 SchemaProps: spec.SchemaProps{ 298 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", 299 Type: []string{"string"}, 300 Format: "", 301 }, 302 }, 303 "metadata": { 304 SchemaProps: spec.SchemaProps{ 305 Default: map[string]interface{}{}, 306 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), 307 }, 308 }, 309 "spec": { 310 SchemaProps: spec.SchemaProps{ 311 Default: map[string]interface{}{}, 312 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJobSpec"), 313 }, 314 }, 315 "status": { 316 SchemaProps: spec.SchemaProps{ 317 Default: map[string]interface{}{}, 318 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus"), 319 }, 320 }, 321 }, 322 }, 323 }, 324 Dependencies: []string{ 325 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, 326 } 327 } 328 329 func schema_pkg_apis_kubefloworg_v1_MPIJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { 330 return common.OpenAPIDefinition{ 331 Schema: spec.Schema{ 332 SchemaProps: spec.SchemaProps{ 333 Type: []string{"object"}, 334 Properties: map[string]spec.Schema{ 335 "kind": { 336 SchemaProps: spec.SchemaProps{ 337 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", 338 Type: []string{"string"}, 339 Format: "", 340 }, 341 }, 342 "apiVersion": { 343 SchemaProps: spec.SchemaProps{ 344 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", 345 Type: []string{"string"}, 346 Format: "", 347 }, 348 }, 349 "metadata": { 350 SchemaProps: spec.SchemaProps{ 351 Default: map[string]interface{}{}, 352 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), 353 }, 354 }, 355 "items": { 356 SchemaProps: spec.SchemaProps{ 357 Type: []string{"array"}, 358 Items: &spec.SchemaOrArray{ 359 Schema: &spec.Schema{ 360 SchemaProps: spec.SchemaProps{ 361 Default: map[string]interface{}{}, 362 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJob"), 363 }, 364 }, 365 }, 366 }, 367 }, 368 }, 369 Required: []string{"items"}, 370 }, 371 }, 372 Dependencies: []string{ 373 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MPIJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, 374 } 375 } 376 377 func schema_pkg_apis_kubefloworg_v1_MPIJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { 378 return common.OpenAPIDefinition{ 379 Schema: spec.Schema{ 380 SchemaProps: spec.SchemaProps{ 381 Type: []string{"object"}, 382 Properties: map[string]spec.Schema{ 383 "slotsPerWorker": { 384 SchemaProps: spec.SchemaProps{ 385 Description: "Specifies the number of slots per worker used in hostfile. Defaults to 1.", 386 Type: []string{"integer"}, 387 Format: "int32", 388 }, 389 }, 390 "cleanPodPolicy": { 391 SchemaProps: spec.SchemaProps{ 392 Description: "CleanPodPolicy defines the policy that whether to kill pods after the job completes. Defaults to None.", 393 Type: []string{"string"}, 394 Format: "", 395 }, 396 }, 397 "mpiReplicaSpecs": { 398 SchemaProps: spec.SchemaProps{ 399 Description: "`MPIReplicaSpecs` contains maps from `MPIReplicaType` to `ReplicaSpec` that specify the MPI replicas to run.", 400 Type: []string{"object"}, 401 AdditionalProperties: &spec.SchemaOrBool{ 402 Allows: true, 403 Schema: &spec.Schema{ 404 SchemaProps: spec.SchemaProps{ 405 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec"), 406 }, 407 }, 408 }, 409 }, 410 }, 411 "mainContainer": { 412 SchemaProps: spec.SchemaProps{ 413 Description: "MainContainer specifies name of the main container which executes the MPI code.", 414 Type: []string{"string"}, 415 Format: "", 416 }, 417 }, 418 "runPolicy": { 419 SchemaProps: spec.SchemaProps{ 420 Description: "`RunPolicy` encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", 421 Default: map[string]interface{}{}, 422 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"), 423 }, 424 }, 425 }, 426 Required: []string{"mpiReplicaSpecs"}, 427 }, 428 }, 429 Dependencies: []string{ 430 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"}, 431 } 432 } 433 434 func schema_pkg_apis_kubefloworg_v1_MXJob(ref common.ReferenceCallback) common.OpenAPIDefinition { 435 return common.OpenAPIDefinition{ 436 Schema: spec.Schema{ 437 SchemaProps: spec.SchemaProps{ 438 Description: "MXJob is the Schema for the mxjobs API", 439 Type: []string{"object"}, 440 Properties: map[string]spec.Schema{ 441 "kind": { 442 SchemaProps: spec.SchemaProps{ 443 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", 444 Type: []string{"string"}, 445 Format: "", 446 }, 447 }, 448 "apiVersion": { 449 SchemaProps: spec.SchemaProps{ 450 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", 451 Type: []string{"string"}, 452 Format: "", 453 }, 454 }, 455 "metadata": { 456 SchemaProps: spec.SchemaProps{ 457 Default: map[string]interface{}{}, 458 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), 459 }, 460 }, 461 "spec": { 462 SchemaProps: spec.SchemaProps{ 463 Default: map[string]interface{}{}, 464 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobSpec"), 465 }, 466 }, 467 "status": { 468 SchemaProps: spec.SchemaProps{ 469 Default: map[string]interface{}{}, 470 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus"), 471 }, 472 }, 473 }, 474 }, 475 }, 476 Dependencies: []string{ 477 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, 478 } 479 } 480 481 func schema_pkg_apis_kubefloworg_v1_MXJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { 482 return common.OpenAPIDefinition{ 483 Schema: spec.Schema{ 484 SchemaProps: spec.SchemaProps{ 485 Description: "MXJobList contains a list of MXJob", 486 Type: []string{"object"}, 487 Properties: map[string]spec.Schema{ 488 "kind": { 489 SchemaProps: spec.SchemaProps{ 490 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", 491 Type: []string{"string"}, 492 Format: "", 493 }, 494 }, 495 "apiVersion": { 496 SchemaProps: spec.SchemaProps{ 497 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", 498 Type: []string{"string"}, 499 Format: "", 500 }, 501 }, 502 "metadata": { 503 SchemaProps: spec.SchemaProps{ 504 Default: map[string]interface{}{}, 505 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), 506 }, 507 }, 508 "items": { 509 SchemaProps: spec.SchemaProps{ 510 Type: []string{"array"}, 511 Items: &spec.SchemaOrArray{ 512 Schema: &spec.Schema{ 513 SchemaProps: spec.SchemaProps{ 514 Default: map[string]interface{}{}, 515 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJob"), 516 }, 517 }, 518 }, 519 }, 520 }, 521 }, 522 Required: []string{"items"}, 523 }, 524 }, 525 Dependencies: []string{ 526 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.MXJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, 527 } 528 } 529 530 func schema_pkg_apis_kubefloworg_v1_MXJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { 531 return common.OpenAPIDefinition{ 532 Schema: spec.Schema{ 533 SchemaProps: spec.SchemaProps{ 534 Description: "MXJobSpec defines the desired state of MXJob", 535 Type: []string{"object"}, 536 Properties: map[string]spec.Schema{ 537 "runPolicy": { 538 SchemaProps: spec.SchemaProps{ 539 Description: "RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", 540 Default: map[string]interface{}{}, 541 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"), 542 }, 543 }, 544 "jobMode": { 545 SchemaProps: spec.SchemaProps{ 546 Description: "JobMode specify the kind of MXjob to do. Different mode may have different MXReplicaSpecs request", 547 Default: "", 548 Type: []string{"string"}, 549 Format: "", 550 }, 551 }, 552 "mxReplicaSpecs": { 553 SchemaProps: spec.SchemaProps{ 554 Description: "MXReplicaSpecs is map of ReplicaType and ReplicaSpec specifies the MX replicas to run. For example,\n {\n \"Scheduler\": ReplicaSpec,\n \"Server\": ReplicaSpec,\n \"Worker\": ReplicaSpec,\n }", 555 Type: []string{"object"}, 556 AdditionalProperties: &spec.SchemaOrBool{ 557 Allows: true, 558 Schema: &spec.Schema{ 559 SchemaProps: spec.SchemaProps{ 560 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec"), 561 }, 562 }, 563 }, 564 }, 565 }, 566 }, 567 Required: []string{"runPolicy", "jobMode", "mxReplicaSpecs"}, 568 }, 569 }, 570 Dependencies: []string{ 571 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"}, 572 } 573 } 574 575 func schema_pkg_apis_kubefloworg_v1_MXJobStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { 576 return common.OpenAPIDefinition{ 577 Schema: spec.Schema{ 578 SchemaProps: spec.SchemaProps{ 579 Description: "MXJobStatus defines the observed state of MXJob", 580 Type: []string{"object"}, 581 }, 582 }, 583 } 584 } 585 586 func schema_pkg_apis_kubefloworg_v1_PaddleElasticPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { 587 return common.OpenAPIDefinition{ 588 Schema: spec.Schema{ 589 SchemaProps: spec.SchemaProps{ 590 Type: []string{"object"}, 591 Properties: map[string]spec.Schema{ 592 "minReplicas": { 593 SchemaProps: spec.SchemaProps{ 594 Description: "minReplicas is the lower limit for the number of replicas to which the training job can scale down. It defaults to null.", 595 Type: []string{"integer"}, 596 Format: "int32", 597 }, 598 }, 599 "maxReplicas": { 600 SchemaProps: spec.SchemaProps{ 601 Description: "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas, defaults to null.", 602 Type: []string{"integer"}, 603 Format: "int32", 604 }, 605 }, 606 "maxRestarts": { 607 SchemaProps: spec.SchemaProps{ 608 Description: "MaxRestarts is the limit for restart times of pods in elastic mode.", 609 Type: []string{"integer"}, 610 Format: "int32", 611 }, 612 }, 613 "metrics": { 614 SchemaProps: spec.SchemaProps{ 615 Description: "Metrics contains the specifications which are used to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated with multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the HPA will not be created.", 616 Type: []string{"array"}, 617 Items: &spec.SchemaOrArray{ 618 Schema: &spec.Schema{ 619 SchemaProps: spec.SchemaProps{ 620 Default: map[string]interface{}{}, 621 Ref: ref("k8s.io/api/autoscaling/v2.MetricSpec"), 622 }, 623 }, 624 }, 625 }, 626 }, 627 }, 628 }, 629 }, 630 Dependencies: []string{ 631 "k8s.io/api/autoscaling/v2.MetricSpec"}, 632 } 633 } 634 635 func schema_pkg_apis_kubefloworg_v1_PaddleJob(ref common.ReferenceCallback) common.OpenAPIDefinition { 636 return common.OpenAPIDefinition{ 637 Schema: spec.Schema{ 638 SchemaProps: spec.SchemaProps{ 639 Description: "PaddleJob Represents a PaddleJob resource.", 640 Type: []string{"object"}, 641 Properties: map[string]spec.Schema{ 642 "kind": { 643 SchemaProps: spec.SchemaProps{ 644 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", 645 Type: []string{"string"}, 646 Format: "", 647 }, 648 }, 649 "apiVersion": { 650 SchemaProps: spec.SchemaProps{ 651 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", 652 Type: []string{"string"}, 653 Format: "", 654 }, 655 }, 656 "metadata": { 657 SchemaProps: spec.SchemaProps{ 658 Default: map[string]interface{}{}, 659 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), 660 }, 661 }, 662 "spec": { 663 SchemaProps: spec.SchemaProps{ 664 Description: "Specification of the desired state of the PaddleJob.", 665 Default: map[string]interface{}{}, 666 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJobSpec"), 667 }, 668 }, 669 "status": { 670 SchemaProps: spec.SchemaProps{ 671 Description: "Most recently observed status of the PaddleJob. Read-only (modified by the system).", 672 Default: map[string]interface{}{}, 673 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus"), 674 }, 675 }, 676 }, 677 }, 678 }, 679 Dependencies: []string{ 680 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, 681 } 682 } 683 684 func schema_pkg_apis_kubefloworg_v1_PaddleJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { 685 return common.OpenAPIDefinition{ 686 Schema: spec.Schema{ 687 SchemaProps: spec.SchemaProps{ 688 Description: "PaddleJobList is a list of PaddleJobs.", 689 Type: []string{"object"}, 690 Properties: map[string]spec.Schema{ 691 "kind": { 692 SchemaProps: spec.SchemaProps{ 693 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", 694 Type: []string{"string"}, 695 Format: "", 696 }, 697 }, 698 "apiVersion": { 699 SchemaProps: spec.SchemaProps{ 700 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", 701 Type: []string{"string"}, 702 Format: "", 703 }, 704 }, 705 "metadata": { 706 SchemaProps: spec.SchemaProps{ 707 Description: "Standard list metadata.", 708 Default: map[string]interface{}{}, 709 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), 710 }, 711 }, 712 "items": { 713 SchemaProps: spec.SchemaProps{ 714 Description: "List of PaddleJobs.", 715 Type: []string{"array"}, 716 Items: &spec.SchemaOrArray{ 717 Schema: &spec.Schema{ 718 SchemaProps: spec.SchemaProps{ 719 Default: map[string]interface{}{}, 720 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJob"), 721 }, 722 }, 723 }, 724 }, 725 }, 726 }, 727 Required: []string{"items"}, 728 }, 729 }, 730 Dependencies: []string{ 731 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, 732 } 733 } 734 735 func schema_pkg_apis_kubefloworg_v1_PaddleJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { 736 return common.OpenAPIDefinition{ 737 Schema: spec.Schema{ 738 SchemaProps: spec.SchemaProps{ 739 Description: "PaddleJobSpec is a desired state description of the PaddleJob.", 740 Type: []string{"object"}, 741 Properties: map[string]spec.Schema{ 742 "runPolicy": { 743 SchemaProps: spec.SchemaProps{ 744 Description: "RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", 745 Default: map[string]interface{}{}, 746 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"), 747 }, 748 }, 749 "elasticPolicy": { 750 SchemaProps: spec.SchemaProps{ 751 Description: "ElasticPolicy holds the elastic policy for paddle job.", 752 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleElasticPolicy"), 753 }, 754 }, 755 "paddleReplicaSpecs": { 756 SchemaProps: spec.SchemaProps{ 757 Description: "A map of PaddleReplicaType (type) to ReplicaSpec (value). Specifies the Paddle cluster configuration. For example,\n {\n \"Master\": PaddleReplicaSpec,\n \"Worker\": PaddleReplicaSpec,\n }", 758 Type: []string{"object"}, 759 AdditionalProperties: &spec.SchemaOrBool{ 760 Allows: true, 761 Schema: &spec.Schema{ 762 SchemaProps: spec.SchemaProps{ 763 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec"), 764 }, 765 }, 766 }, 767 }, 768 }, 769 }, 770 Required: []string{"runPolicy", "paddleReplicaSpecs"}, 771 }, 772 }, 773 Dependencies: []string{ 774 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PaddleElasticPolicy", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"}, 775 } 776 } 777 778 func schema_pkg_apis_kubefloworg_v1_PyTorchJob(ref common.ReferenceCallback) common.OpenAPIDefinition { 779 return common.OpenAPIDefinition{ 780 Schema: spec.Schema{ 781 SchemaProps: spec.SchemaProps{ 782 Description: "PyTorchJob Represents a PyTorchJob resource.", 783 Type: []string{"object"}, 784 Properties: map[string]spec.Schema{ 785 "kind": { 786 SchemaProps: spec.SchemaProps{ 787 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", 788 Type: []string{"string"}, 789 Format: "", 790 }, 791 }, 792 "apiVersion": { 793 SchemaProps: spec.SchemaProps{ 794 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", 795 Type: []string{"string"}, 796 Format: "", 797 }, 798 }, 799 "metadata": { 800 SchemaProps: spec.SchemaProps{ 801 Default: map[string]interface{}{}, 802 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), 803 }, 804 }, 805 "spec": { 806 SchemaProps: spec.SchemaProps{ 807 Description: "Specification of the desired state of the PyTorchJob.", 808 Default: map[string]interface{}{}, 809 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PyTorchJobSpec"), 810 }, 811 }, 812 "status": { 813 SchemaProps: spec.SchemaProps{ 814 Description: "Most recently observed status of the PyTorchJob. Read-only (modified by the system).", 815 Default: map[string]interface{}{}, 816 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus"), 817 }, 818 }, 819 }, 820 }, 821 }, 822 Dependencies: []string{ 823 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PyTorchJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, 824 } 825 } 826 827 func schema_pkg_apis_kubefloworg_v1_PyTorchJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { 828 return common.OpenAPIDefinition{ 829 Schema: spec.Schema{ 830 SchemaProps: spec.SchemaProps{ 831 Description: "PyTorchJobList is a list of PyTorchJobs.", 832 Type: []string{"object"}, 833 Properties: map[string]spec.Schema{ 834 "kind": { 835 SchemaProps: spec.SchemaProps{ 836 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", 837 Type: []string{"string"}, 838 Format: "", 839 }, 840 }, 841 "apiVersion": { 842 SchemaProps: spec.SchemaProps{ 843 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", 844 Type: []string{"string"}, 845 Format: "", 846 }, 847 }, 848 "metadata": { 849 SchemaProps: spec.SchemaProps{ 850 Description: "Standard list metadata.", 851 Default: map[string]interface{}{}, 852 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), 853 }, 854 }, 855 "items": { 856 SchemaProps: spec.SchemaProps{ 857 Description: "List of PyTorchJobs.", 858 Type: []string{"array"}, 859 Items: &spec.SchemaOrArray{ 860 Schema: &spec.Schema{ 861 SchemaProps: spec.SchemaProps{ 862 Default: map[string]interface{}{}, 863 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PyTorchJob"), 864 }, 865 }, 866 }, 867 }, 868 }, 869 }, 870 Required: []string{"items"}, 871 }, 872 }, 873 Dependencies: []string{ 874 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.PyTorchJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, 875 } 876 } 877 878 func schema_pkg_apis_kubefloworg_v1_PyTorchJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { 879 return common.OpenAPIDefinition{ 880 Schema: spec.Schema{ 881 SchemaProps: spec.SchemaProps{ 882 Description: "PyTorchJobSpec is a desired state description of the PyTorchJob.", 883 Type: []string{"object"}, 884 Properties: map[string]spec.Schema{ 885 "runPolicy": { 886 SchemaProps: spec.SchemaProps{ 887 Description: "RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", 888 Default: map[string]interface{}{}, 889 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"), 890 }, 891 }, 892 "elasticPolicy": { 893 SchemaProps: spec.SchemaProps{ 894 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ElasticPolicy"), 895 }, 896 }, 897 "pytorchReplicaSpecs": { 898 SchemaProps: spec.SchemaProps{ 899 Description: "A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. For example,\n {\n \"Master\": PyTorchReplicaSpec,\n \"Worker\": PyTorchReplicaSpec,\n }", 900 Type: []string{"object"}, 901 AdditionalProperties: &spec.SchemaOrBool{ 902 Allows: true, 903 Schema: &spec.Schema{ 904 SchemaProps: spec.SchemaProps{ 905 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec"), 906 }, 907 }, 908 }, 909 }, 910 }, 911 "nprocPerNode": { 912 SchemaProps: spec.SchemaProps{ 913 Description: "Number of workers per node; supported values: [auto, cpu, gpu, int]. For more, https://github.com/pytorch/pytorch/blob/26f7f470df64d90e092081e39507e4ac751f55d6/torch/distributed/run.py#L629-L658. Defaults to auto.", 914 Type: []string{"string"}, 915 Format: "", 916 }, 917 }, 918 }, 919 Required: []string{"runPolicy", "pytorchReplicaSpecs"}, 920 }, 921 }, 922 Dependencies: []string{ 923 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ElasticPolicy", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"}, 924 } 925 } 926 927 func schema_pkg_apis_kubefloworg_v1_RDZVConf(ref common.ReferenceCallback) common.OpenAPIDefinition { 928 return common.OpenAPIDefinition{ 929 Schema: spec.Schema{ 930 SchemaProps: spec.SchemaProps{ 931 Type: []string{"object"}, 932 Properties: map[string]spec.Schema{ 933 "key": { 934 SchemaProps: spec.SchemaProps{ 935 Type: []string{"string"}, 936 Format: "", 937 }, 938 }, 939 "value": { 940 SchemaProps: spec.SchemaProps{ 941 Type: []string{"string"}, 942 Format: "", 943 }, 944 }, 945 }, 946 }, 947 }, 948 } 949 } 950 951 func schema_pkg_apis_kubefloworg_v1_ReplicaSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { 952 return common.OpenAPIDefinition{ 953 Schema: spec.Schema{ 954 SchemaProps: spec.SchemaProps{ 955 Description: "ReplicaSpec is a description of the replica", 956 Type: []string{"object"}, 957 Properties: map[string]spec.Schema{ 958 "replicas": { 959 SchemaProps: spec.SchemaProps{ 960 Description: "Replicas is the desired number of replicas of the given template. If unspecified, defaults to 1.", 961 Type: []string{"integer"}, 962 Format: "int32", 963 }, 964 }, 965 "template": { 966 SchemaProps: spec.SchemaProps{ 967 Description: "Template is the object that describes the pod that will be created for this replica. RestartPolicy in PodTemplateSpec will be overide by RestartPolicy in ReplicaSpec", 968 Default: map[string]interface{}{}, 969 Ref: ref("k8s.io/api/core/v1.PodTemplateSpec"), 970 }, 971 }, 972 "restartPolicy": { 973 SchemaProps: spec.SchemaProps{ 974 Description: "Restart policy for all replicas within the job. One of Always, OnFailure, Never and ExitCode. Default to Never.", 975 Type: []string{"string"}, 976 Format: "", 977 }, 978 }, 979 }, 980 }, 981 }, 982 Dependencies: []string{ 983 "k8s.io/api/core/v1.PodTemplateSpec"}, 984 } 985 } 986 987 func schema_pkg_apis_kubefloworg_v1_ReplicaStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { 988 return common.OpenAPIDefinition{ 989 Schema: spec.Schema{ 990 SchemaProps: spec.SchemaProps{ 991 Description: "ReplicaStatus represents the current observed state of the replica.", 992 Type: []string{"object"}, 993 Properties: map[string]spec.Schema{ 994 "active": { 995 SchemaProps: spec.SchemaProps{ 996 Description: "The number of actively running pods.", 997 Type: []string{"integer"}, 998 Format: "int32", 999 }, 1000 }, 1001 "succeeded": { 1002 SchemaProps: spec.SchemaProps{ 1003 Description: "The number of pods which reached phase Succeeded.", 1004 Type: []string{"integer"}, 1005 Format: "int32", 1006 }, 1007 }, 1008 "failed": { 1009 SchemaProps: spec.SchemaProps{ 1010 Description: "The number of pods which reached phase Failed.", 1011 Type: []string{"integer"}, 1012 Format: "int32", 1013 }, 1014 }, 1015 "labelSelector": { 1016 SchemaProps: spec.SchemaProps{ 1017 Description: "Deprecated: Use Selector instead", 1018 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"), 1019 }, 1020 }, 1021 "selector": { 1022 SchemaProps: spec.SchemaProps{ 1023 Description: "A Selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty Selector matches all objects. A null Selector matches no objects.", 1024 Type: []string{"string"}, 1025 Format: "", 1026 }, 1027 }, 1028 }, 1029 }, 1030 }, 1031 Dependencies: []string{ 1032 "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector"}, 1033 } 1034 } 1035 1036 func schema_pkg_apis_kubefloworg_v1_RunPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { 1037 return common.OpenAPIDefinition{ 1038 Schema: spec.Schema{ 1039 SchemaProps: spec.SchemaProps{ 1040 Description: "RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", 1041 Type: []string{"object"}, 1042 Properties: map[string]spec.Schema{ 1043 "cleanPodPolicy": { 1044 SchemaProps: spec.SchemaProps{ 1045 Description: "CleanPodPolicy defines the policy to kill pods after the job completes. Default to None.", 1046 Type: []string{"string"}, 1047 Format: "", 1048 }, 1049 }, 1050 "ttlSecondsAfterFinished": { 1051 SchemaProps: spec.SchemaProps{ 1052 Description: "TTLSecondsAfterFinished is the TTL to clean up jobs. It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Default to infinite.", 1053 Type: []string{"integer"}, 1054 Format: "int32", 1055 }, 1056 }, 1057 "activeDeadlineSeconds": { 1058 SchemaProps: spec.SchemaProps{ 1059 Description: "Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer.", 1060 Type: []string{"integer"}, 1061 Format: "int64", 1062 }, 1063 }, 1064 "backoffLimit": { 1065 SchemaProps: spec.SchemaProps{ 1066 Description: "Optional number of retries before marking this job failed.", 1067 Type: []string{"integer"}, 1068 Format: "int32", 1069 }, 1070 }, 1071 "schedulingPolicy": { 1072 SchemaProps: spec.SchemaProps{ 1073 Description: "SchedulingPolicy defines the policy related to scheduling, e.g. gang-scheduling", 1074 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.SchedulingPolicy"), 1075 }, 1076 }, 1077 "suspend": { 1078 SchemaProps: spec.SchemaProps{ 1079 Description: "suspend specifies whether the Job controller should create Pods or not. If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods and PodGroups associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job.\n\nDefaults to false.", 1080 Type: []string{"boolean"}, 1081 Format: "", 1082 }, 1083 }, 1084 }, 1085 }, 1086 }, 1087 Dependencies: []string{ 1088 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.SchedulingPolicy"}, 1089 } 1090 } 1091 1092 func schema_pkg_apis_kubefloworg_v1_SchedulingPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition { 1093 return common.OpenAPIDefinition{ 1094 Schema: spec.Schema{ 1095 SchemaProps: spec.SchemaProps{ 1096 Description: "SchedulingPolicy encapsulates various scheduling policies of the distributed training job, for example `minAvailable` for gang-scheduling.", 1097 Type: []string{"object"}, 1098 Properties: map[string]spec.Schema{ 1099 "minAvailable": { 1100 SchemaProps: spec.SchemaProps{ 1101 Type: []string{"integer"}, 1102 Format: "int32", 1103 }, 1104 }, 1105 "queue": { 1106 SchemaProps: spec.SchemaProps{ 1107 Type: []string{"string"}, 1108 Format: "", 1109 }, 1110 }, 1111 "minResources": { 1112 SchemaProps: spec.SchemaProps{ 1113 Type: []string{"object"}, 1114 AdditionalProperties: &spec.SchemaOrBool{ 1115 Allows: true, 1116 Schema: &spec.Schema{ 1117 SchemaProps: spec.SchemaProps{ 1118 Default: map[string]interface{}{}, 1119 Ref: ref("k8s.io/apimachinery/pkg/api/resource.Quantity"), 1120 }, 1121 }, 1122 }, 1123 }, 1124 }, 1125 "priorityClass": { 1126 SchemaProps: spec.SchemaProps{ 1127 Type: []string{"string"}, 1128 Format: "", 1129 }, 1130 }, 1131 "scheduleTimeoutSeconds": { 1132 SchemaProps: spec.SchemaProps{ 1133 Type: []string{"integer"}, 1134 Format: "int32", 1135 }, 1136 }, 1137 }, 1138 }, 1139 }, 1140 Dependencies: []string{ 1141 "k8s.io/apimachinery/pkg/api/resource.Quantity"}, 1142 } 1143 } 1144 1145 func schema_pkg_apis_kubefloworg_v1_TFJob(ref common.ReferenceCallback) common.OpenAPIDefinition { 1146 return common.OpenAPIDefinition{ 1147 Schema: spec.Schema{ 1148 SchemaProps: spec.SchemaProps{ 1149 Description: "TFJob represents a TFJob resource.", 1150 Type: []string{"object"}, 1151 Properties: map[string]spec.Schema{ 1152 "kind": { 1153 SchemaProps: spec.SchemaProps{ 1154 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", 1155 Type: []string{"string"}, 1156 Format: "", 1157 }, 1158 }, 1159 "apiVersion": { 1160 SchemaProps: spec.SchemaProps{ 1161 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", 1162 Type: []string{"string"}, 1163 Format: "", 1164 }, 1165 }, 1166 "metadata": { 1167 SchemaProps: spec.SchemaProps{ 1168 Default: map[string]interface{}{}, 1169 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), 1170 }, 1171 }, 1172 "spec": { 1173 SchemaProps: spec.SchemaProps{ 1174 Description: "Specification of the desired state of the TFJob.", 1175 Default: map[string]interface{}{}, 1176 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.TFJobSpec"), 1177 }, 1178 }, 1179 "status": { 1180 SchemaProps: spec.SchemaProps{ 1181 Description: "Most recently observed status of the TFJob. Populated by the system. Read-only.", 1182 Default: map[string]interface{}{}, 1183 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus"), 1184 }, 1185 }, 1186 }, 1187 }, 1188 }, 1189 Dependencies: []string{ 1190 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.TFJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, 1191 } 1192 } 1193 1194 func schema_pkg_apis_kubefloworg_v1_TFJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { 1195 return common.OpenAPIDefinition{ 1196 Schema: spec.Schema{ 1197 SchemaProps: spec.SchemaProps{ 1198 Description: "TFJobList is a list of TFJobs.", 1199 Type: []string{"object"}, 1200 Properties: map[string]spec.Schema{ 1201 "kind": { 1202 SchemaProps: spec.SchemaProps{ 1203 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", 1204 Type: []string{"string"}, 1205 Format: "", 1206 }, 1207 }, 1208 "apiVersion": { 1209 SchemaProps: spec.SchemaProps{ 1210 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", 1211 Type: []string{"string"}, 1212 Format: "", 1213 }, 1214 }, 1215 "metadata": { 1216 SchemaProps: spec.SchemaProps{ 1217 Description: "Standard list metadata.", 1218 Default: map[string]interface{}{}, 1219 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), 1220 }, 1221 }, 1222 "items": { 1223 SchemaProps: spec.SchemaProps{ 1224 Description: "List of TFJobs.", 1225 Type: []string{"array"}, 1226 Items: &spec.SchemaOrArray{ 1227 Schema: &spec.Schema{ 1228 SchemaProps: spec.SchemaProps{ 1229 Default: map[string]interface{}{}, 1230 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.TFJob"), 1231 }, 1232 }, 1233 }, 1234 }, 1235 }, 1236 }, 1237 Required: []string{"items"}, 1238 }, 1239 }, 1240 Dependencies: []string{ 1241 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.TFJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, 1242 } 1243 } 1244 1245 func schema_pkg_apis_kubefloworg_v1_TFJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { 1246 return common.OpenAPIDefinition{ 1247 Schema: spec.Schema{ 1248 SchemaProps: spec.SchemaProps{ 1249 Description: "TFJobSpec is a desired state description of the TFJob.", 1250 Type: []string{"object"}, 1251 Properties: map[string]spec.Schema{ 1252 "runPolicy": { 1253 SchemaProps: spec.SchemaProps{ 1254 Description: "RunPolicy encapsulates various runtime policies of the distributed training job, for example how to clean up resources and how long the job can stay active.", 1255 Default: map[string]interface{}{}, 1256 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"), 1257 }, 1258 }, 1259 "successPolicy": { 1260 SchemaProps: spec.SchemaProps{ 1261 Description: "SuccessPolicy defines the policy to mark the TFJob as succeeded. Default to \"\", using the default rules.", 1262 Type: []string{"string"}, 1263 Format: "", 1264 }, 1265 }, 1266 "tfReplicaSpecs": { 1267 SchemaProps: spec.SchemaProps{ 1268 Description: "A map of TFReplicaType (type) to ReplicaSpec (value). Specifies the TF cluster configuration. For example,\n {\n \"PS\": ReplicaSpec,\n \"Worker\": ReplicaSpec,\n }", 1269 Type: []string{"object"}, 1270 AdditionalProperties: &spec.SchemaOrBool{ 1271 Allows: true, 1272 Schema: &spec.Schema{ 1273 SchemaProps: spec.SchemaProps{ 1274 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec"), 1275 }, 1276 }, 1277 }, 1278 }, 1279 }, 1280 "enableDynamicWorker": { 1281 SchemaProps: spec.SchemaProps{ 1282 Description: "A switch to enable dynamic worker", 1283 Type: []string{"boolean"}, 1284 Format: "", 1285 }, 1286 }, 1287 }, 1288 Required: []string{"runPolicy", "tfReplicaSpecs"}, 1289 }, 1290 }, 1291 Dependencies: []string{ 1292 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"}, 1293 } 1294 } 1295 1296 func schema_pkg_apis_kubefloworg_v1_XGBoostJob(ref common.ReferenceCallback) common.OpenAPIDefinition { 1297 return common.OpenAPIDefinition{ 1298 Schema: spec.Schema{ 1299 SchemaProps: spec.SchemaProps{ 1300 Description: "XGBoostJob is the Schema for the xgboostjobs API", 1301 Type: []string{"object"}, 1302 Properties: map[string]spec.Schema{ 1303 "kind": { 1304 SchemaProps: spec.SchemaProps{ 1305 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", 1306 Type: []string{"string"}, 1307 Format: "", 1308 }, 1309 }, 1310 "apiVersion": { 1311 SchemaProps: spec.SchemaProps{ 1312 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", 1313 Type: []string{"string"}, 1314 Format: "", 1315 }, 1316 }, 1317 "metadata": { 1318 SchemaProps: spec.SchemaProps{ 1319 Default: map[string]interface{}{}, 1320 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), 1321 }, 1322 }, 1323 "spec": { 1324 SchemaProps: spec.SchemaProps{ 1325 Default: map[string]interface{}{}, 1326 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.XGBoostJobSpec"), 1327 }, 1328 }, 1329 "status": { 1330 SchemaProps: spec.SchemaProps{ 1331 Default: map[string]interface{}{}, 1332 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus"), 1333 }, 1334 }, 1335 }, 1336 }, 1337 }, 1338 Dependencies: []string{ 1339 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.JobStatus", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.XGBoostJobSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, 1340 } 1341 } 1342 1343 func schema_pkg_apis_kubefloworg_v1_XGBoostJobList(ref common.ReferenceCallback) common.OpenAPIDefinition { 1344 return common.OpenAPIDefinition{ 1345 Schema: spec.Schema{ 1346 SchemaProps: spec.SchemaProps{ 1347 Description: "XGBoostJobList contains a list of XGBoostJob", 1348 Type: []string{"object"}, 1349 Properties: map[string]spec.Schema{ 1350 "kind": { 1351 SchemaProps: spec.SchemaProps{ 1352 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", 1353 Type: []string{"string"}, 1354 Format: "", 1355 }, 1356 }, 1357 "apiVersion": { 1358 SchemaProps: spec.SchemaProps{ 1359 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", 1360 Type: []string{"string"}, 1361 Format: "", 1362 }, 1363 }, 1364 "metadata": { 1365 SchemaProps: spec.SchemaProps{ 1366 Default: map[string]interface{}{}, 1367 Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), 1368 }, 1369 }, 1370 "items": { 1371 SchemaProps: spec.SchemaProps{ 1372 Type: []string{"array"}, 1373 Items: &spec.SchemaOrArray{ 1374 Schema: &spec.Schema{ 1375 SchemaProps: spec.SchemaProps{ 1376 Default: map[string]interface{}{}, 1377 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.XGBoostJob"), 1378 }, 1379 }, 1380 }, 1381 }, 1382 }, 1383 }, 1384 Required: []string{"items"}, 1385 }, 1386 }, 1387 Dependencies: []string{ 1388 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.XGBoostJob", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, 1389 } 1390 } 1391 1392 func schema_pkg_apis_kubefloworg_v1_XGBoostJobSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { 1393 return common.OpenAPIDefinition{ 1394 Schema: spec.Schema{ 1395 SchemaProps: spec.SchemaProps{ 1396 Description: "XGBoostJobSpec defines the desired state of XGBoostJob", 1397 Type: []string{"object"}, 1398 Properties: map[string]spec.Schema{ 1399 "runPolicy": { 1400 SchemaProps: spec.SchemaProps{ 1401 Description: "INSERT ADDITIONAL SPEC FIELDS - desired state of cluster Important: Run \"make\" to regenerate code after modifying this file", 1402 Default: map[string]interface{}{}, 1403 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"), 1404 }, 1405 }, 1406 "xgbReplicaSpecs": { 1407 SchemaProps: spec.SchemaProps{ 1408 Type: []string{"object"}, 1409 AdditionalProperties: &spec.SchemaOrBool{ 1410 Allows: true, 1411 Schema: &spec.Schema{ 1412 SchemaProps: spec.SchemaProps{ 1413 Ref: ref("github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec"), 1414 }, 1415 }, 1416 }, 1417 }, 1418 }, 1419 }, 1420 Required: []string{"runPolicy", "xgbReplicaSpecs"}, 1421 }, 1422 }, 1423 Dependencies: []string{ 1424 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.ReplicaSpec", "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1.RunPolicy"}, 1425 } 1426 }