{
  "description": "CompositePodGroupSpec defines the desired state of CompositePodGroup.",
  "properties": {
    "disruptionMode": {
      "description": "CompositeDisruptionMode defines how individual entities within a composite pod group can be disrupted. Exactly one mode must be set.",
      "properties": {
        "all": {
          "description": "AllCompositeDisruptionMode means that children of a CompositePodGroup can only be disrupted or preempted together.",
          "type": [
            "object",
            "null"
          ]
        },
        "single": {
          "description": "SingleCompositeDisruptionMode means that individual children of a CompositePodGroup can be disrupted or preempted independently.",
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ],
      "x-kubernetes-unions": [
        {
          "fields-to-discriminateBy": {
            "all": "All",
            "single": "Single"
          }
        }
      ]
    },
    "parentCompositePodGroupName": {
      "description": "parentCompositePodGroupName contains the name of the parent composite pod group within the same namespace as this composite pod group. It must be a DNS name. If it's nil, then this composite pod group is a root of a workload's hierarchy. This field is immutable.",
      "type": [
        "string",
        "null"
      ]
    },
    "preemptionPolicy": {
      "description": "preemptionPolicy is the Policy for preempting pods/podgroups with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. When Priority Admission Controller is enabled, it populates this field from PriorityClassName, and defaults to PreemptLowerPriority if value is unset in PriorityClass. This field is immutable. This field is available only when the PodGroupPreemptionPolicy feature gate is enabled.",
      "type": [
        "string",
        "null"
      ]
    },
    "priority": {
      "description": "priority is the value of priority of this composite pod group. Various system components use this field to find the priority of the composite pod group. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. This field is immutable.",
      "format": "int32",
      "type": [
        "integer",
        "null"
      ]
    },
    "priorityClassName": {
      "description": "priorityClassName defines the priority that should be considered when scheduling this CompositePodGroup. Controllers are expected to fill this field by copying it from a CompositePodGroupTemplate. If left unspecified, it is validated and resolved similarly to the PriorityClassName field in Pods (i.e. if no priority class is specified, admission control can set this to the global default priority class if it exists. Otherwise, the composite pod group's priority will be zero). This field is immutable.",
      "type": [
        "string",
        "null"
      ]
    },
    "schedulingConstraints": {
      "description": "CompositePodGroupSchedulingConstraints defines scheduling constraints (e.g. topology) for a CompositePodGroup.",
      "properties": {
        "topology": {
          "description": "topology defines the topology constraints for the composite pod group. Currently only a single topology constraint can be specified. This may change in the future.",
          "items": {
            "description": "TopologyConstraint defines a topology constraint for a PodGroup.",
            "properties": {
              "key": {
                "description": "key specifies the key of the node label representing the topology domain. All pods within the PodGroup must be colocated within the same domain instance. Different PodGroups can land on different domain instances even if they derive from the same PodGroupTemplate. Examples: \"topology.kubernetes.io/rack\"",
                "type": "string"
              }
            },
            "required": [
              "key"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "atomic"
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "schedulingPolicy": {
      "description": "CompositePodGroupSchedulingPolicy defines the scheduling configuration for a CompositePodGroup. Exactly one policy must be set.",
      "properties": {
        "basic": {
          "description": "CompositeBasicSchedulingPolicy indicates that the groups belonging to the composite group should be scheduled independently.",
          "type": [
            "object",
            "null"
          ]
        },
        "gang": {
          "description": "CompositeGangSchedulingPolicy indicates that the groups belonging to the composite group should be scheduled using all-or-nothing semantics.",
          "properties": {
            "minGroupCount": {
              "description": "minGroupCount is the minimum number of child groups that must be schedulable or scheduled at the same time for the scheduler to admit the entire group. It must be a positive integer.",
              "format": "int32",
              "type": "integer"
            }
          },
          "required": [
            "minGroupCount"
          ],
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ],
      "x-kubernetes-unions": [
        {
          "fields-to-discriminateBy": {
            "basic": "Basic",
            "gang": "Gang"
          }
        }
      ]
    },
    "workloadRef": {
      "description": "WorkloadReference references the Workload object together with the template that was used to create a particular PodGroup.",
      "properties": {
        "templateName": {
          "description": "templateName is the name of a template within the Workload object that was used to create a pod group. It must be a DNS label. This field is required.",
          "type": "string"
        },
        "workloadName": {
          "description": "workloadName is the name of the Workload object that contains a template that was used when creating a pod group. It must be a DNS name. This field is required.",
          "type": "string"
        }
      },
      "required": [
        "workloadName",
        "templateName"
      ],
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "workloadRef",
    "schedulingPolicy"
  ],
  "type": "object",
  "$schema": "http://json-schema.org/schema#"
}