github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/externalapis/preflight/v1beta2/preflight_types.go (about) 1 /* 2 Copyright (C) 2022-2023 ApeCloud Co., Ltd 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 v1beta2 18 19 import ( 20 troubleshoot "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" 21 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 22 ) 23 24 // PreflightSpec defines the desired state of Preflight 25 type PreflightSpec struct { 26 // preflightSpec is defined by troubleshoot.sh and inherited by ApeCloud. 27 troubleshoot.PreflightSpec `json:",inline"` 28 // extendCollectors extends user defined collectors by ApeCloud. 29 // +optional 30 ExtendCollectors []*ExtendCollect `json:"extendCollectors,omitempty"` 31 // extendAnalyzers extends user defined analyzers by ApeCloud. 32 // +optional 33 ExtendAnalyzers []*ExtendAnalyze `json:"extendAnalyzers,omitempty"` 34 } 35 36 // PreflightStatus defines the observed state of Preflight 37 type PreflightStatus struct { 38 // preflightStatus is defined by troubleshoot.sh and inherited by ApeCloud. 39 troubleshoot.PreflightStatus `json:",inline"` 40 } 41 42 // +kubebuilder:object:root=true 43 // +kubebuilder:subresource:status 44 // +kubebuilder:storageversion 45 46 // Preflight is the Schema for the preflights API 47 type Preflight struct { 48 metav1.TypeMeta `json:",inline"` 49 metav1.ObjectMeta `json:"metadata,omitempty"` 50 51 Spec PreflightSpec `json:"spec,omitempty"` 52 Status PreflightStatus `json:"status,omitempty"` 53 } 54 55 // +kubebuilder:object:root=true 56 57 // PreflightList contains a list of Preflight 58 type PreflightList struct { 59 metav1.TypeMeta `json:",inline"` 60 metav1.ListMeta `json:"metadata,omitempty"` 61 Items []Preflight `json:"items"` 62 } 63 64 func init() { 65 SchemeBuilder.Register(&Preflight{}, &PreflightList{}) 66 }