github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/apis/extensions/v1alpha1/type.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 v1alpha1 18 19 // AddonType defines the addon types. 20 // +enum 21 // +kubebuilder:validation:Enum={Helm} 22 type AddonType string 23 24 const ( 25 HelmType AddonType = "Helm" 26 ) 27 28 // LineSelectorOperator defines line selector operators. 29 // +enum 30 // +kubebuilder:validation:Enum={Contains,DoesNotContain,MatchRegex,DoesNotMatchRegex} 31 type LineSelectorOperator string 32 33 const ( 34 Contains LineSelectorOperator = "Contains" 35 DoesNotContain LineSelectorOperator = "DoesNotContain" 36 MatchRegex LineSelectorOperator = "MatchRegex" 37 DoesNotMatchRegex LineSelectorOperator = "DoesNotMatchRegex" 38 ) 39 40 // AddonPhase defines addon phases. 41 // +enum 42 type AddonPhase string 43 44 const ( 45 AddonDisabled AddonPhase = "Disabled" 46 AddonEnabled AddonPhase = "Enabled" 47 AddonFailed AddonPhase = "Failed" 48 AddonEnabling AddonPhase = "Enabling" 49 AddonDisabling AddonPhase = "Disabling" 50 ) 51 52 // AddonSelectorKey are selector requirement key types. 53 // +enum 54 // +kubebuilder:validation:Enum={KubeGitVersion,KubeVersion,KubeProvider} 55 type AddonSelectorKey string 56 57 const ( 58 KubeGitVersion AddonSelectorKey = "KubeGitVersion" 59 KubeVersion AddonSelectorKey = "KubeVersion" 60 KubeProvider AddonSelectorKey = "KubeProvider" 61 ) 62 63 const ( 64 // condition types 65 ConditionTypeProgressing = "Progressing" 66 ConditionTypeChecked = "InstallableChecked" 67 ConditionTypeSucceed = "Succeed" 68 ConditionTypeFailed = "Failed" 69 )