open-cluster-management.io/governance-policy-propagator@v0.13.0/test/crds/cluster.open-cluster-management.io_placements_crd.yaml (about) 1 apiVersion: apiextensions.k8s.io/v1 2 kind: CustomResourceDefinition 3 metadata: 4 name: placements.cluster.open-cluster-management.io 5 spec: 6 group: cluster.open-cluster-management.io 7 names: 8 kind: Placement 9 listKind: PlacementList 10 plural: placements 11 singular: placement 12 scope: Namespaced 13 preserveUnknownFields: false 14 versions: 15 - name: v1alpha1 16 schema: 17 openAPIV3Schema: 18 description: "Placement defines a rule to select a set of ManagedClusters 19 from the ManagedClusterSets bound to the placement namespace. \n Here is 20 how the placement policy combines with other selection methods to determine 21 a matching list of ManagedClusters: 1) Kubernetes clusters are registered 22 with hub as cluster-scoped ManagedClusters; 2) ManagedClusters are organized 23 into cluster-scoped ManagedClusterSets; 3) ManagedClusterSets are bound 24 to workload namespaces; 4) Namespace-scoped Placements specify a slice of 25 ManagedClusterSets which select a working set of potential ManagedClusters; 26 5) Then Placements subselect from that working set using label/claim selection. 27 \n No ManagedCluster will be selected if no ManagedClusterSet is bound to 28 the placement namespace. User is able to bind a ManagedClusterSet to a namespace 29 by creating a ManagedClusterSetBinding in that namespace if they have a 30 RBAC rule to CREATE on the virtual subresource of `managedclustersets/bind`. 31 \n A slice of PlacementDecisions with label cluster.open-cluster-management.io/placement={placement 32 name} will be created to represent the ManagedClusters selected by this 33 placement. \n If a ManagedCluster is selected and added into the PlacementDecisions, 34 other components may apply workload on it; once it is removed from the PlacementDecisions, 35 the workload applied on this ManagedCluster should be evicted accordingly." 36 type: object 37 required: 38 - spec 39 properties: 40 apiVersion: 41 description: 'APIVersion defines the versioned schema of this representation 42 of an object. Servers should convert recognized schemas to the latest 43 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 44 type: string 45 kind: 46 description: 'Kind is a string value representing the REST resource this 47 object represents. Servers may infer this from the endpoint the client 48 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 49 type: string 50 metadata: 51 type: object 52 spec: 53 description: Spec defines the attributes of Placement. 54 type: object 55 properties: 56 clusterSets: 57 description: ClusterSets represent the ManagedClusterSets from which 58 the ManagedClusters are selected. If the slice is empty, ManagedClusters 59 will be selected from the ManagedClusterSets bound to the placement 60 namespace, otherwise ManagedClusters will be selected from the intersection 61 of this slice and the ManagedClusterSets bound to the placement 62 namespace. 63 type: array 64 items: 65 type: string 66 numberOfClusters: 67 description: NumberOfClusters represents the desired number of ManagedClusters 68 to be selected which meet the placement requirements. 1) If not 69 specified, all ManagedClusters which meet the placement requirements 70 (including ClusterSets, and Predicates) will be selected; 2) 71 Otherwise if the nubmer of ManagedClusters meet the placement requirements 72 is larger than NumberOfClusters, a random subset with desired 73 number of ManagedClusters will be selected; 3) If the nubmer of 74 ManagedClusters meet the placement requirements is equal to NumberOfClusters, all 75 of them will be selected; 4) If the nubmer of ManagedClusters meet 76 the placement requirements is less than NumberOfClusters, all 77 of them will be selected, and the status of condition `PlacementConditionSatisfied` 78 will be set to false; 79 type: integer 80 format: int32 81 predicates: 82 description: Predicates represent a slice of predicates to select 83 ManagedClusters. The predicates are ORed. 84 type: array 85 items: 86 description: ClusterPredicate represents a predicate to select ManagedClusters. 87 type: object 88 properties: 89 requiredClusterSelector: 90 description: RequiredClusterSelector represents a selector of 91 ManagedClusters by label and claim. If specified, 1) Any ManagedCluster, 92 which does not match the selector, should not be selected 93 by this ClusterPredicate; 2) If a selected ManagedCluster 94 (of this ClusterPredicate) ceases to match the selector (e.g. 95 due to an update) of any ClusterPredicate, it will be eventually 96 removed from the placement decisions; 3) If a ManagedCluster 97 (not selected previously) starts to match the selector, it 98 will either be selected or at least has a chance to be 99 selected (when NumberOfClusters is specified); 100 type: object 101 properties: 102 claimSelector: 103 description: ClaimSelector represents a selector of ManagedClusters 104 by clusterClaims in status 105 type: object 106 properties: 107 matchExpressions: 108 description: matchExpressions is a list of cluster claim 109 selector requirements. The requirements are ANDed. 110 type: array 111 items: 112 description: A label selector requirement is a selector 113 that contains values, a key, and an operator that 114 relates the key and values. 115 type: object 116 required: 117 - key 118 - operator 119 properties: 120 key: 121 description: key is the label key that the selector 122 applies to. 123 type: string 124 operator: 125 description: operator represents a key's relationship 126 to a set of values. Valid operators are In, 127 NotIn, Exists and DoesNotExist. 128 type: string 129 values: 130 description: values is an array of string values. 131 If the operator is In or NotIn, the values array 132 must be non-empty. If the operator is Exists 133 or DoesNotExist, the values array must be empty. 134 This array is replaced during a strategic merge 135 patch. 136 type: array 137 items: 138 type: string 139 labelSelector: 140 description: LabelSelector represents a selector of ManagedClusters 141 by label 142 type: object 143 properties: 144 matchExpressions: 145 description: matchExpressions is a list of label selector 146 requirements. The requirements are ANDed. 147 type: array 148 items: 149 description: A label selector requirement is a selector 150 that contains values, a key, and an operator that 151 relates the key and values. 152 type: object 153 required: 154 - key 155 - operator 156 properties: 157 key: 158 description: key is the label key that the selector 159 applies to. 160 type: string 161 operator: 162 description: operator represents a key's relationship 163 to a set of values. Valid operators are In, 164 NotIn, Exists and DoesNotExist. 165 type: string 166 values: 167 description: values is an array of string values. 168 If the operator is In or NotIn, the values array 169 must be non-empty. If the operator is Exists 170 or DoesNotExist, the values array must be empty. 171 This array is replaced during a strategic merge 172 patch. 173 type: array 174 items: 175 type: string 176 matchLabels: 177 description: matchLabels is a map of {key,value} pairs. 178 A single {key,value} in the matchLabels map is equivalent 179 to an element of matchExpressions, whose key field 180 is "key", the operator is "In", and the values array 181 contains only "value". The requirements are ANDed. 182 type: object 183 additionalProperties: 184 type: string 185 status: 186 description: Status represents the current status of the Placement 187 type: object 188 properties: 189 conditions: 190 description: Conditions contains the different condition statuses 191 for this Placement. 192 type: array 193 items: 194 description: "Condition contains details for one aspect of the current 195 state of this API Resource. --- This struct is intended for direct 196 use as an array at the field path .status.conditions. For example, 197 type FooStatus struct{ // Represents the observations of a 198 foo's current state. // Known .status.conditions.type are: 199 \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type 200 \ // +patchStrategy=merge // +listType=map // +listMapKey=type 201 \ Conditions []metav1.Condition `json:\"conditions,omitempty\" 202 patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` 203 \n // other fields }" 204 type: object 205 required: 206 - lastTransitionTime 207 - message 208 - reason 209 - status 210 - type 211 properties: 212 lastTransitionTime: 213 description: lastTransitionTime is the last time the condition 214 transitioned from one status to another. This should be when 215 the underlying condition changed. If that is not known, then 216 using the time when the API field changed is acceptable. 217 type: string 218 format: date-time 219 message: 220 description: message is a human readable message indicating 221 details about the transition. This may be an empty string. 222 type: string 223 maxLength: 32768 224 observedGeneration: 225 description: observedGeneration represents the .metadata.generation 226 that the condition was set based upon. For instance, if .metadata.generation 227 is currently 12, but the .status.conditions[x].observedGeneration 228 is 9, the condition is out of date with respect to the current 229 state of the instance. 230 type: integer 231 format: int64 232 minimum: 0 233 reason: 234 description: reason contains a programmatic identifier indicating 235 the reason for the condition's last transition. Producers 236 of specific condition types may define expected values and 237 meanings for this field, and whether the values are considered 238 a guaranteed API. The value should be a CamelCase string. 239 This field may not be empty. 240 type: string 241 maxLength: 1024 242 minLength: 1 243 pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ 244 status: 245 description: status of the condition, one of True, False, Unknown. 246 type: string 247 enum: 248 - "True" 249 - "False" 250 - Unknown 251 type: 252 description: type of condition in CamelCase or in foo.example.com/CamelCase. 253 --- Many .condition.type values are consistent across resources 254 like Available, but because arbitrary conditions can be useful 255 (see .node.status.conditions), the ability to deconflict is 256 important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) 257 type: string 258 maxLength: 316 259 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ 260 numberOfSelectedClusters: 261 description: NumberOfSelectedClusters represents the number of selected 262 ManagedClusters 263 type: integer 264 format: int32 265 served: true 266 storage: true 267 subresources: 268 status: {} 269 status: 270 acceptedNames: 271 kind: "" 272 plural: "" 273 conditions: [] 274 storedVersions: []