sigs.k8s.io/cluster-api-provider-azure@v1.17.0/api/v1alpha1/azureasomanagedmachinepooltemplate_types.go (about) 1 /* 2 Copyright 2024 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 v1alpha1 18 19 import ( 20 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 "k8s.io/apimachinery/pkg/runtime" 22 ) 23 24 // AzureASOManagedMachinePoolTemplateSpec defines the desired state of AzureASOManagedMachinePoolTemplate. 25 type AzureASOManagedMachinePoolTemplateSpec struct { 26 Template AzureASOManagedControlPlaneResource `json:"template"` 27 } 28 29 // AzureASOManagedMachinePoolResource defines the templated resource. 30 type AzureASOManagedMachinePoolResource struct { 31 Spec AzureASOManagedMachinePoolTemplateResourceSpec `json:"spec,omitempty"` 32 } 33 34 // AzureASOManagedMachinePoolTemplateResourceSpec defines the desired state of the templated resource. 35 type AzureASOManagedMachinePoolTemplateResourceSpec struct { 36 // ProviderIDList is the list of cloud provider IDs for the instances. It fulfills Cluster API's machine 37 // pool infrastructure provider contract. 38 ProviderIDList []string `json:"providerIDList,omitempty"` 39 40 // Resources are embedded ASO resources to be managed by this resource. 41 //+optional 42 Resources []runtime.RawExtension `json:"resources,omitempty"` 43 } 44 45 //+kubebuilder:object:root=true 46 47 // AzureASOManagedMachinePoolTemplate is the Schema for the azureasomanagedmachinepooltemplates API. 48 type AzureASOManagedMachinePoolTemplate struct { 49 metav1.TypeMeta `json:",inline"` 50 metav1.ObjectMeta `json:"metadata,omitempty"` 51 52 Spec AzureASOManagedMachinePoolTemplateSpec `json:"spec,omitempty"` 53 } 54 55 //+kubebuilder:object:root=true 56 57 // AzureASOManagedMachinePoolTemplateList contains a list of AzureASOManagedMachinePoolTemplate. 58 type AzureASOManagedMachinePoolTemplateList struct { 59 metav1.TypeMeta `json:",inline"` 60 metav1.ListMeta `json:"metadata,omitempty"` 61 Items []AzureASOManagedMachinePoolTemplate `json:"items"` 62 } 63 64 func init() { 65 SchemeBuilder.Register(&AzureASOManagedMachinePoolTemplate{}, &AzureASOManagedMachinePoolTemplateList{}) 66 }