apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: placementdecisions.cluster.open-cluster-management.io
spec:
  group: cluster.open-cluster-management.io
  names:
    kind: PlacementDecision
    listKind: PlacementDecisionList
    plural: placementdecisions
    singular: placementdecision
  scope: Namespaced
  preserveUnknownFields: false
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: "PlacementDecision indicates a decision from a placement PlacementDecision
          should has a label cluster.open-cluster-management.io/placement={placement
          name} to reference a certain placement. \n If a placement has spec.numberOfClusters
          specified, the total number of decisions contained in status.decisions of
          PlacementDecisions should always be NumberOfClusters; otherwise, the total
          number of decisions should be the number of ManagedClusters which match
          the placement requirements. \n Some of the decisions might be empty when
          there are no enough ManagedClusters meet the placement requirements."
        type: object
        properties:
          apiVersion:
            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'
            type: string
          kind:
            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'
            type: string
          metadata:
            type: object
          status:
            description: Status represents the current status of the PlacementDecision
            type: object
            required:
            - decisions
            properties:
              decisions:
                description: Decisions is a slice of decisions according to a placement
                  The number of decisions should not be larger than 100
                type: array
                items:
                  description: ClusterDecision represents a decision from a placement
                    An empty ClusterDecision indicates it is not scheduled yet.
                  type: object
                  required:
                  - clusterName
                  - reason
                  properties:
                    clusterName:
                      description: ClusterName is the name of the ManagedCluster.
                        If it is not empty, its value should be unique cross all placement
                        decisions for the Placement.
                      type: string
                    reason:
                      description: Reason represents the reason why the ManagedCluster
                        is selected.
                      type: string
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
