{
  "description": "ClusterGroup is a re-usable selector to target a group of clusters.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "selector": {
          "description": "Selector is a label selector, used to select clusters for this group.",
          "nullable": true,
          "properties": {
            "matchExpressions": {
              "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
              "items": {
                "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                "properties": {
                  "key": {
                    "description": "key is the label key that the selector applies to.",
                    "type": "string"
                  },
                  "operator": {
                    "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                    "type": "string"
                  },
                  "values": {
                    "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "required": [
                  "key",
                  "operator"
                ],
                "type": "object"
              },
              "type": "array",
              "x-kubernetes-list-type": "atomic"
            },
            "matchLabels": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
              "type": "object"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic"
        }
      },
      "type": "object"
    },
    "status": {
      "properties": {
        "clusterCount": {
          "description": "ClusterCount is the number of clusters in the cluster group.",
          "type": "integer"
        },
        "conditions": {
          "description": "Conditions is a list of conditions and their statuses for the cluster group.",
          "items": {
            "properties": {
              "lastTransitionTime": {
                "description": "Last time the condition transitioned from one status to another.",
                "type": "string"
              },
              "lastUpdateTime": {
                "description": "The last time this condition was updated.",
                "type": "string"
              },
              "message": {
                "description": "Human-readable message indicating details about last transition",
                "type": "string"
              },
              "reason": {
                "description": "The reason for the condition's last transition.",
                "type": "string"
              },
              "status": {
                "description": "Status of the condition, one of True, False, Unknown.",
                "type": "string"
              },
              "type": {
                "description": "Type of cluster condition.",
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "display": {
          "description": "Display contains the number of ready, desiredready clusters and a\nsummary state for the bundle's resources.",
          "properties": {
            "readyBundles": {
              "description": "ReadyBundles is a string in the form \"%d/%d\", that describes the\nnumber of bundles that are ready vs. the number of bundles desired\nto be ready.",
              "nullable": true,
              "type": "string"
            },
            "readyClusters": {
              "description": "ReadyClusters is a string in the form \"%d/%d\", that describes the\nnumber of clusters that are ready vs. the number of clusters desired\nto be ready.",
              "nullable": true,
              "type": "string"
            },
            "state": {
              "description": "State is a summary state for the cluster group, showing \"NotReady\" if\nthere are non-ready resources.",
              "nullable": true,
              "type": "string"
            }
          },
          "type": "object"
        },
        "nonReadyClusterCount": {
          "description": "NonReadyClusterCount is the number of clusters that are not ready.",
          "type": "integer"
        },
        "nonReadyClusters": {
          "description": "NonReadyClusters is a list of cluster names that are not ready.",
          "items": {
            "type": "string"
          },
          "nullable": true,
          "type": "array"
        },
        "resourceCounts": {
          "description": "ResourceCounts contains the number of resources in each state over\nall bundles in the cluster group.",
          "properties": {
            "desiredReady": {
              "description": "DesiredReady is the number of resources that should be ready.",
              "type": "integer"
            },
            "missing": {
              "description": "Missing is the number of missing resources.",
              "type": "integer"
            },
            "modified": {
              "description": "Modified is the number of resources that have been modified.",
              "type": "integer"
            },
            "notReady": {
              "description": "NotReady is the number of not ready resources. Resources are not\nready if they do not match any other state.",
              "type": "integer"
            },
            "orphaned": {
              "description": "Orphaned is the number of orphaned resources.",
              "type": "integer"
            },
            "ready": {
              "description": "Ready is the number of ready resources.",
              "type": "integer"
            },
            "unknown": {
              "description": "Unknown is the number of resources in an unknown state.",
              "type": "integer"
            },
            "waitApplied": {
              "description": "WaitApplied is the number of resources that are waiting to be applied.",
              "type": "integer"
            }
          },
          "type": "object"
        },
        "summary": {
          "description": "Summary is a summary of the bundle deployments and their resources\nin the cluster group.",
          "properties": {
            "desiredReady": {
              "description": "DesiredReady is the number of bundle deployments that should be\nready.",
              "type": "integer"
            },
            "errApplied": {
              "description": "ErrApplied is the number of bundle deployments that have been synced\nfrom the Fleet controller and the downstream cluster, but with some\nerrors when deploying the bundle.",
              "type": "integer"
            },
            "modified": {
              "description": "Modified is the number of bundle deployments that have been deployed\nand for which all resources are ready, but where some changes from the\nGit repository have not yet been synced.",
              "type": "integer"
            },
            "nonReadyResources": {
              "description": "NonReadyClusters is a list of states, which is filled for a bundle\nthat is not ready.",
              "items": {
                "description": "NonReadyResource contains information about a bundle that is not ready for a\ngiven state like \"ErrApplied\". It contains a list of non-ready or modified\nresources and their states.",
                "properties": {
                  "bundleState": {
                    "description": "State is the state of the resource, like e.g. \"NotReady\" or \"ErrApplied\".",
                    "nullable": true,
                    "type": "string"
                  },
                  "message": {
                    "description": "Message contains information why the bundle is not ready.",
                    "nullable": true,
                    "type": "string"
                  },
                  "modifiedStatus": {
                    "description": "ModifiedStatus lists the state for each modified resource.",
                    "items": {
                      "description": "ModifiedStatus is used to report the status of a resource that is modified.\nIt indicates if the modification was a create, a delete or a patch.",
                      "properties": {
                        "apiVersion": {
                          "nullable": true,
                          "type": "string"
                        },
                        "delete": {
                          "type": "boolean"
                        },
                        "exist": {
                          "description": "Exist is true if the resource exists but is not owned by us. This can happen if a resource was adopted by another bundle whereas the first bundle still exists and due to that reports that it does not own it.",
                          "type": "boolean"
                        },
                        "kind": {
                          "nullable": true,
                          "type": "string"
                        },
                        "missing": {
                          "type": "boolean"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "namespace": {
                          "nullable": true,
                          "type": "string"
                        },
                        "patch": {
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  },
                  "name": {
                    "description": "Name is the name of the resource.",
                    "nullable": true,
                    "type": "string"
                  },
                  "nonReadyStatus": {
                    "description": "NonReadyStatus lists the state for each non-ready resource.",
                    "items": {
                      "description": "NonReadyStatus is used to report the status of a resource that is not ready. It includes a summary.",
                      "properties": {
                        "apiVersion": {
                          "nullable": true,
                          "type": "string"
                        },
                        "kind": {
                          "nullable": true,
                          "type": "string"
                        },
                        "name": {
                          "nullable": true,
                          "type": "string"
                        },
                        "namespace": {
                          "nullable": true,
                          "type": "string"
                        },
                        "summary": {
                          "properties": {
                            "error": {
                              "type": "boolean"
                            },
                            "message": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "state": {
                              "type": "string"
                            },
                            "transitioning": {
                              "type": "boolean"
                            }
                          },
                          "type": "object"
                        },
                        "uid": {
                          "description": "UID is a type that holds unique ID values, including UUIDs.  Because we\ndon't ONLY use UUIDs, this is an alias to string.  Being a type captures\nintent and helps make sure that UIDs and names do not get conflated.",
                          "nullable": true,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "type": "object"
              },
              "nullable": true,
              "type": "array"
            },
            "notReady": {
              "description": "NotReady is the number of bundle deployments that have been deployed\nwhere some resources are not ready.",
              "type": "integer"
            },
            "outOfSync": {
              "description": "OutOfSync is the number of bundle deployments that have been synced\nfrom Fleet controller, but not yet by the downstream agent.",
              "type": "integer"
            },
            "pending": {
              "description": "Pending is the number of bundle deployments that are being processed\nby Fleet controller.",
              "type": "integer"
            },
            "ready": {
              "description": "Ready is the number of bundle deployments that have been deployed\nwhere all resources are ready.",
              "type": "integer"
            },
            "waitApplied": {
              "description": "WaitApplied is the number of bundle deployments that have been\nsynced from Fleet controller and downstream cluster, but are waiting\nto be deployed.",
              "type": "integer"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    }
  },
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "ClusterGroup v1alpha1"
}