github.com/oam-dev/cluster-gateway@v1.9.0/hack/crd/registration/managedcluster.yaml (about) 1 apiVersion: apiextensions.k8s.io/v1 2 kind: CustomResourceDefinition 3 metadata: 4 name: managedclusters.cluster.open-cluster-management.io 5 spec: 6 group: cluster.open-cluster-management.io 7 names: 8 kind: ManagedCluster 9 listKind: ManagedClusterList 10 plural: managedclusters 11 shortNames: 12 - mcl 13 - mcls 14 singular: managedcluster 15 scope: Cluster 16 preserveUnknownFields: false 17 versions: 18 - additionalPrinterColumns: 19 - jsonPath: .spec.hubAcceptsClient 20 name: Hub Accepted 21 type: boolean 22 - jsonPath: .spec.managedClusterClientConfigs[*].url 23 name: Managed Cluster URLs 24 type: string 25 - jsonPath: .status.conditions[?(@.type=="ManagedClusterJoined")].status 26 name: Joined 27 type: string 28 - jsonPath: .status.conditions[?(@.type=="ManagedClusterConditionAvailable")].status 29 name: Available 30 type: string 31 - jsonPath: .metadata.creationTimestamp 32 name: Age 33 type: date 34 name: v1 35 schema: 36 openAPIV3Schema: 37 description: "ManagedCluster represents the desired state and current status 38 of managed cluster. ManagedCluster is a cluster scoped resource. The name 39 is the cluster UID. \n The cluster join process follows a double opt-in 40 process: \n 1. Agent on managed cluster creates CSR on hub with cluster 41 UID and agent name. 2. Agent on managed cluster creates ManagedCluster on 42 hub. 3. Cluster admin on hub approves the CSR for UID and agent name of 43 the ManagedCluster. 4. Cluster admin sets spec.acceptClient of ManagedCluster 44 to true. 5. Cluster admin on managed cluster creates credential of kubeconfig 45 to hub. \n Once the hub creates the cluster namespace, the Klusterlet agent 46 on the ManagedCluster pushes the credential to the hub to use against the 47 kube-apiserver of the ManagedCluster." 48 type: object 49 properties: 50 apiVersion: 51 description: 'APIVersion defines the versioned schema of this representation 52 of an object. Servers should convert recognized schemas to the latest 53 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 54 type: string 55 kind: 56 description: 'Kind is a string value representing the REST resource this 57 object represents. Servers may infer this from the endpoint the client 58 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 59 type: string 60 metadata: 61 type: object 62 spec: 63 description: Spec represents a desired configuration for the agent on 64 the managed cluster. 65 type: object 66 properties: 67 hubAcceptsClient: 68 description: hubAcceptsClient represents that hub accepts the joining 69 of Klusterlet agent on the managed cluster with the hub. The default 70 value is false, and can only be set true when the user on hub has 71 an RBAC rule to UPDATE on the virtual subresource of managedclusters/accept. 72 When the value is set true, a namespace whose name is the same as 73 the name of ManagedCluster is created on the hub. This namespace 74 represents the managed cluster, also role/rolebinding is created 75 on the namespace to grant the permision of access from the agent 76 on the managed cluster. When the value is set to false, the namespace 77 representing the managed cluster is deleted. 78 type: boolean 79 leaseDurationSeconds: 80 description: LeaseDurationSeconds is used to coordinate the lease 81 update time of Klusterlet agents on the managed cluster. If its 82 value is zero, the Klusterlet agent will update its lease every 83 60 seconds by default 84 type: integer 85 format: int32 86 managedClusterClientConfigs: 87 description: ManagedClusterClientConfigs represents a list of the 88 apiserver address of the managed cluster. If it is empty, the managed 89 cluster has no accessible address for the hub to connect with it. 90 type: array 91 items: 92 description: ClientConfig represents the apiserver address of the 93 managed cluster. TODO include credential to connect to managed 94 cluster kube-apiserver 95 type: object 96 properties: 97 caBundle: 98 description: CABundle is the ca bundle to connect to apiserver 99 of the managed cluster. System certs are used if it is not 100 set. 101 type: string 102 format: byte 103 url: 104 description: URL is the URL of apiserver endpoint of the managed 105 cluster. 106 type: string 107 status: 108 description: Status represents the current status of joined managed cluster 109 type: object 110 properties: 111 allocatable: 112 description: Allocatable represents the total allocatable resources 113 on the managed cluster. 114 type: object 115 additionalProperties: 116 pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ 117 anyOf: 118 - type: integer 119 - type: string 120 x-kubernetes-int-or-string: true 121 capacity: 122 description: Capacity represents the total resource capacity from 123 all nodeStatuses on the managed cluster. 124 type: object 125 additionalProperties: 126 pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ 127 anyOf: 128 - type: integer 129 - type: string 130 x-kubernetes-int-or-string: true 131 clusterClaims: 132 description: ClusterClaims represents cluster information that a managed 133 cluster claims, for example a unique cluster identifier (id.k8s.io) 134 and kubernetes version (kubeversion.open-cluster-management.io). 135 They are written from the managed cluster. The set of claims is 136 not uniform across a fleet, some claims can be vendor or version 137 specific and may not be included from all managed clusters. 138 type: array 139 items: 140 description: ManagedClusterClaim represents a ClusterClaim collected 141 from a managed cluster. 142 type: object 143 properties: 144 name: 145 description: Name is the name of a ClusterClaim resource on 146 managed cluster. It's a well known or customized name to identify 147 the claim. 148 type: string 149 maxLength: 253 150 minLength: 1 151 value: 152 description: Value is a claim-dependent string 153 type: string 154 maxLength: 1024 155 minLength: 1 156 conditions: 157 description: Conditions contains the different condition statuses 158 for this managed cluster. 159 type: array 160 items: 161 description: "Condition contains details for one aspect of the current 162 state of this API Resource. --- This struct is intended for direct 163 use as an array at the field path .status.conditions. For example, 164 type FooStatus struct{ // Represents the observations of a 165 foo's current state. // Known .status.conditions.type are: 166 \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type 167 \ // +patchStrategy=merge // +listType=map // +listMapKey=type 168 \ Conditions []metav1.Condition `json:\"conditions,omitempty\" 169 patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` 170 \n // other fields }" 171 type: object 172 required: 173 - lastTransitionTime 174 - message 175 - reason 176 - status 177 - type 178 properties: 179 lastTransitionTime: 180 description: lastTransitionTime is the last time the condition 181 transitioned from one status to another. This should be when 182 the underlying condition changed. If that is not known, then 183 using the time when the API field changed is acceptable. 184 type: string 185 format: date-time 186 message: 187 description: message is a human readable message indicating 188 details about the transition. This may be an empty string. 189 type: string 190 maxLength: 32768 191 observedGeneration: 192 description: observedGeneration represents the .metadata.generation 193 that the condition was set based upon. For instance, if .metadata.generation 194 is currently 12, but the .status.conditions[x].observedGeneration 195 is 9, the condition is out of date with respect to the current 196 state of the instance. 197 type: integer 198 format: int64 199 minimum: 0 200 reason: 201 description: reason contains a programmatic identifier indicating 202 the reason for the condition's last transition. Producers 203 of specific condition types may define expected values and 204 meanings for this field, and whether the values are considered 205 a guaranteed API. The value should be a CamelCase string. 206 This field may not be empty. 207 type: string 208 maxLength: 1024 209 minLength: 1 210 pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ 211 status: 212 description: status of the condition, one of True, False, Unknown. 213 type: string 214 enum: 215 - "True" 216 - "False" 217 - Unknown 218 type: 219 description: type of condition in CamelCase or in foo.example.com/CamelCase. 220 --- Many .condition.type values are consistent across resources 221 like Available, but because arbitrary conditions can be useful 222 (see .node.status.conditions), the ability to deconflict is 223 important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) 224 type: string 225 maxLength: 316 226 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])$ 227 version: 228 description: Version represents the kubernetes version of the managed 229 cluster. 230 type: object 231 properties: 232 kubernetes: 233 description: Kubernetes is the kubernetes version of managed cluster. 234 type: string 235 served: true 236 storage: true 237 subresources: 238 status: {} 239 status: 240 acceptedNames: 241 kind: "" 242 plural: "" 243 conditions: [] 244 storedVersions: []