sigs.k8s.io/cluster-api-provider-azure@v1.17.0/api/v1alpha1/azureasomanagedcontrolplanetemplate_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 // AzureASOManagedControlPlaneTemplateSpec defines the desired state of AzureASOManagedControlPlane. 25 type AzureASOManagedControlPlaneTemplateSpec struct { 26 Template AzureASOManagedControlPlaneResource `json:"template"` 27 } 28 29 // AzureASOManagedControlPlaneResource defines the templated resource. 30 type AzureASOManagedControlPlaneResource struct { 31 Spec AzureASOManagedControlPlaneTemplateResourceSpec `json:"spec,omitempty"` 32 } 33 34 // AzureASOManagedControlPlaneTemplateResourceSpec defines the desired state of the templated resource. 35 type AzureASOManagedControlPlaneTemplateResourceSpec struct { 36 // Version is the Kubernetes version of the control plane. It fulfills Cluster API's control plane 37 // provider contract. 38 //+optional 39 Version string `json:"version,omitempty"` 40 41 // Resources are embedded ASO resources to be managed by this resource. 42 //+optional 43 Resources []runtime.RawExtension `json:"resources,omitempty"` 44 } 45 46 //+kubebuilder:object:root=true 47 48 // AzureASOManagedControlPlaneTemplate is the Schema for the azureasomanagedcontrolplanetemplates API. 49 type AzureASOManagedControlPlaneTemplate struct { 50 metav1.TypeMeta `json:",inline"` 51 metav1.ObjectMeta `json:"metadata,omitempty"` 52 53 Spec AzureASOManagedControlPlaneTemplateSpec `json:"spec,omitempty"` 54 } 55 56 //+kubebuilder:object:root=true 57 58 // AzureASOManagedControlPlaneTemplateList contains a list of AzureASOManagedControlPlaneTemplate. 59 type AzureASOManagedControlPlaneTemplateList struct { 60 metav1.TypeMeta `json:",inline"` 61 metav1.ListMeta `json:"metadata,omitempty"` 62 Items []AzureASOManagedControlPlaneTemplate `json:"items"` 63 } 64 65 func init() { 66 SchemeBuilder.Register(&AzureASOManagedControlPlaneTemplate{}, &AzureASOManagedControlPlaneTemplateList{}) 67 }