sigs.k8s.io/cluster-api-provider-aws@v1.5.5/api/v1beta1/awsclustertemplate_types.go (about) 1 /* 2 Copyright 2021 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 22 clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" 23 ) 24 25 // AWSClusterTemplateSpec defines the desired state of AWSClusterTemplate. 26 type AWSClusterTemplateSpec struct { 27 Template AWSClusterTemplateResource `json:"template"` 28 } 29 30 // +kubebuilder:object:root=true 31 // +kubebuilder:resource:path=awsclustertemplates,scope=Namespaced,categories=cluster-api,shortName=awsct 32 // +kubebuilder:storageversion 33 // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of AWSClusterTemplate" 34 // +k8s:defaulter-gen=true 35 36 // AWSClusterTemplate is the schema for Amazon EC2 based Kubernetes Cluster Templates. 37 type AWSClusterTemplate struct { 38 metav1.TypeMeta `json:",inline"` 39 metav1.ObjectMeta `json:"metadata,omitempty"` 40 41 Spec AWSClusterTemplateSpec `json:"spec,omitempty"` 42 } 43 44 //+kubebuilder:object:root=true 45 46 // AWSClusterTemplateList contains a list of AWSClusterTemplate. 47 type AWSClusterTemplateList struct { 48 metav1.TypeMeta `json:",inline"` 49 metav1.ListMeta `json:"metadata,omitempty"` 50 Items []AWSClusterTemplate `json:"items"` 51 } 52 53 func init() { 54 SchemeBuilder.Register(&AWSClusterTemplate{}, &AWSClusterTemplateList{}) 55 } 56 57 type AWSClusterTemplateResource struct { 58 // Standard object's metadata. 59 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 60 // +optional 61 ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` 62 Spec AWSClusterSpec `json:"spec"` 63 }