sigs.k8s.io/cluster-api@v1.7.1/bootstrap/kubeadm/api/v1beta1/kubeadmconfigtemplate_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 // KubeadmConfigTemplateSpec defines the desired state of KubeadmConfigTemplate. 26 type KubeadmConfigTemplateSpec struct { 27 Template KubeadmConfigTemplateResource `json:"template"` 28 } 29 30 // KubeadmConfigTemplateResource defines the Template structure. 31 type KubeadmConfigTemplateResource struct { 32 // Standard object's metadata. 33 // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 34 // +optional 35 ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` 36 37 Spec KubeadmConfigSpec `json:"spec,omitempty"` 38 } 39 40 // +kubebuilder:object:root=true 41 // +kubebuilder:resource:path=kubeadmconfigtemplates,scope=Namespaced,categories=cluster-api 42 // +kubebuilder:storageversion 43 // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Time duration since creation of KubeadmConfigTemplate" 44 45 // KubeadmConfigTemplate is the Schema for the kubeadmconfigtemplates API. 46 type KubeadmConfigTemplate struct { 47 metav1.TypeMeta `json:",inline"` 48 metav1.ObjectMeta `json:"metadata,omitempty"` 49 50 Spec KubeadmConfigTemplateSpec `json:"spec,omitempty"` 51 } 52 53 // +kubebuilder:object:root=true 54 55 // KubeadmConfigTemplateList contains a list of KubeadmConfigTemplate. 56 type KubeadmConfigTemplateList struct { 57 metav1.TypeMeta `json:",inline"` 58 metav1.ListMeta `json:"metadata,omitempty"` 59 Items []KubeadmConfigTemplate `json:"items"` 60 } 61 62 func init() { 63 objectTypes = append(objectTypes, &KubeadmConfigTemplate{}, &KubeadmConfigTemplateList{}) 64 }