sigs.k8s.io/cluster-api-provider-azure@v1.14.3/api/v1beta1/azuremanagedcluster_types.go (about) 1 /* 2 Copyright 2023 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1beta1 18 19 import ( 20 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" 22 ) 23 24 // AzureManagedClusterSpec defines the desired state of AzureManagedCluster. 25 type AzureManagedClusterSpec struct { 26 // ControlPlaneEndpoint represents the endpoint used to communicate with the control plane. 27 // Immutable, populated by the AKS API at create. 28 // +optional 29 ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"` 30 } 31 32 // AzureManagedClusterStatus defines the observed state of AzureManagedCluster. 33 type AzureManagedClusterStatus struct { 34 // Ready is true when the provider resource is ready. 35 // +optional 36 Ready bool `json:"ready,omitempty"` 37 } 38 39 // +kubebuilder:object:root=true 40 // +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".metadata.labels.cluster\\.x-k8s\\.io/cluster-name",description="Cluster to which this AzureManagedCluster belongs" 41 // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.ready" 42 // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of this AzureManagedCluster" 43 // +kubebuilder:resource:path=azuremanagedclusters,scope=Namespaced,categories=cluster-api,shortName=amc 44 // +kubebuilder:storageversion 45 // +kubebuilder:subresource:status 46 47 // AzureManagedCluster is the Schema for the azuremanagedclusters API. 48 type AzureManagedCluster struct { 49 metav1.TypeMeta `json:",inline"` 50 metav1.ObjectMeta `json:"metadata,omitempty"` 51 52 Spec AzureManagedClusterSpec `json:"spec,omitempty"` 53 Status AzureManagedClusterStatus `json:"status,omitempty"` 54 } 55 56 // +kubebuilder:object:root=true 57 58 // AzureManagedClusterList contains a list of AzureManagedClusters. 59 type AzureManagedClusterList struct { 60 metav1.TypeMeta `json:",inline"` 61 metav1.ListMeta `json:"metadata,omitempty"` 62 Items []AzureManagedCluster `json:"items"` 63 } 64 65 func init() { 66 SchemeBuilder.Register(&AzureManagedCluster{}, &AzureManagedClusterList{}) 67 }