github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/crds/core.oam.dev_traitdefinitions.yaml (about) 1 --- 2 apiVersion: apiextensions.k8s.io/v1 3 kind: CustomResourceDefinition 4 metadata: 5 annotations: 6 controller-gen.kubebuilder.io/version: v0.11.4 7 name: traitdefinitions.core.oam.dev 8 spec: 9 group: core.oam.dev 10 names: 11 categories: 12 - oam 13 kind: TraitDefinition 14 listKind: TraitDefinitionList 15 plural: traitdefinitions 16 shortNames: 17 - trait 18 singular: traitdefinition 19 scope: Namespaced 20 versions: 21 - additionalPrinterColumns: 22 - jsonPath: .spec.appliesToWorkloads 23 name: APPLIES-TO 24 type: string 25 - jsonPath: .metadata.annotations.definition\.oam\.dev/description 26 name: DESCRIPTION 27 type: string 28 name: v1beta1 29 schema: 30 openAPIV3Schema: 31 description: A TraitDefinition registers a kind of Kubernetes custom resource 32 as a valid OAM trait kind by referencing its CustomResourceDefinition. The 33 CRD is used to validate the schema of the trait when it is embedded in an 34 OAM ApplicationConfiguration. 35 properties: 36 apiVersion: 37 description: 'APIVersion defines the versioned schema of this representation 38 of an object. Servers should convert recognized schemas to the latest 39 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 40 type: string 41 kind: 42 description: 'Kind is a string value representing the REST resource this 43 object represents. Servers may infer this from the endpoint the client 44 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 45 type: string 46 metadata: 47 type: object 48 spec: 49 description: A TraitDefinitionSpec defines the desired state of a TraitDefinition. 50 properties: 51 appliesToWorkloads: 52 description: AppliesToWorkloads specifies the list of workload kinds 53 this trait applies to. Workload kinds are specified in resource.group/version 54 format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this 55 field apply to all workload kinds. 56 items: 57 type: string 58 type: array 59 conflictsWith: 60 description: 'ConflictsWith specifies the list of traits(CRD name, 61 Definition name, CRD group) which could not apply to the same workloads 62 with this trait. Traits that omit this field can work with any other 63 traits. Example rules: "service" # Trait definition name "services.k8s.io" 64 # API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar" 65 # label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse' 66 items: 67 type: string 68 type: array 69 controlPlaneOnly: 70 description: ControlPlaneOnly defines which cluster is dispatched 71 to 72 type: boolean 73 definitionRef: 74 description: Reference to the CustomResourceDefinition that defines 75 this trait kind. 76 properties: 77 name: 78 description: Name of the referenced CustomResourceDefinition. 79 type: string 80 version: 81 description: Version indicate which version should be used if 82 CRD has multiple versions by default it will use the first one 83 if not specified 84 type: string 85 required: 86 - name 87 type: object 88 extension: 89 description: Extension is used for extension needs by OAM platform 90 builders 91 type: object 92 x-kubernetes-preserve-unknown-fields: true 93 manageWorkload: 94 description: ManageWorkload defines the trait would be responsible 95 for creating the workload 96 type: boolean 97 podDisruptive: 98 description: PodDisruptive specifies whether using the trait will 99 cause the pod to restart or not. 100 type: boolean 101 revisionEnabled: 102 description: Revision indicates whether a trait is aware of component 103 revision 104 type: boolean 105 schematic: 106 description: Schematic defines the data format and template of the 107 encapsulation of the trait. Only CUE and Kube schematic are supported 108 for now. 109 properties: 110 cue: 111 description: CUE defines the encapsulation in CUE format 112 properties: 113 template: 114 description: Template defines the abstraction template data 115 of the capability, it will replace the old CUE template 116 in extension field. Template is a required field if CUE 117 is defined in Capability Definition. 118 type: string 119 required: 120 - template 121 type: object 122 terraform: 123 description: Terraform is the struct to describe cloud resources 124 managed by Hashicorp Terraform 125 properties: 126 configuration: 127 description: Configuration is Terraform Configuration 128 type: string 129 customRegion: 130 description: Region is cloud provider's region. It will override 131 the region in the region field of ProviderReference 132 type: string 133 deleteResource: 134 default: true 135 description: DeleteResource will determine whether provisioned 136 cloud resources will be deleted when CR is deleted 137 type: boolean 138 gitCredentialsSecretReference: 139 description: GitCredentialsSecretReference specifies the reference 140 to the secret containing the git credentials 141 properties: 142 name: 143 description: name is unique within a namespace to reference 144 a secret resource. 145 type: string 146 namespace: 147 description: namespace defines the space within which 148 the secret name must be unique. 149 type: string 150 type: object 151 x-kubernetes-map-type: atomic 152 path: 153 description: Path is the sub-directory of remote git repository. 154 It's valid when remote is set 155 type: string 156 providerRef: 157 description: ProviderReference specifies the reference to 158 Provider 159 properties: 160 name: 161 description: Name of the referenced object. 162 type: string 163 namespace: 164 default: default 165 description: Namespace of the referenced object. 166 type: string 167 required: 168 - name 169 type: object 170 type: 171 default: hcl 172 description: Type specifies which Terraform configuration 173 it is, HCL or JSON syntax 174 enum: 175 - hcl 176 - json 177 - remote 178 type: string 179 writeConnectionSecretToRef: 180 description: WriteConnectionSecretToReference specifies the 181 namespace and name of a Secret to which any connection details 182 for this managed resource should be written. Connection 183 details frequently include the endpoint, username, and password 184 required to connect to the managed resource. 185 properties: 186 name: 187 description: Name of the secret. 188 type: string 189 namespace: 190 description: Namespace of the secret. 191 type: string 192 required: 193 - name 194 type: object 195 required: 196 - configuration 197 type: object 198 type: object 199 stage: 200 description: Stage defines the stage information to which this trait 201 resource processing belongs. Currently, PreDispatch and PostDispatch 202 are provided, which are used to control resource pre-process and 203 post-process respectively. 204 type: string 205 status: 206 description: Status defines the custom health policy and status message 207 for trait 208 properties: 209 customStatus: 210 description: CustomStatus defines the custom status message that 211 could display to user 212 type: string 213 healthPolicy: 214 description: HealthPolicy defines the health check policy for 215 the abstraction 216 type: string 217 type: object 218 workloadRefPath: 219 description: WorkloadRefPath indicates where/if a trait accepts a 220 workloadRef object 221 type: string 222 type: object 223 status: 224 description: TraitDefinitionStatus is the status of TraitDefinition 225 properties: 226 conditions: 227 description: Conditions of the resource. 228 items: 229 description: A Condition that may apply to a resource. 230 properties: 231 lastTransitionTime: 232 description: LastTransitionTime is the last time this condition 233 transitioned from one status to another. 234 format: date-time 235 type: string 236 message: 237 description: A Message containing details about this condition's 238 last transition from one status to another, if any. 239 type: string 240 reason: 241 description: A Reason for this condition's last transition from 242 one status to another. 243 type: string 244 status: 245 description: Status of this condition; is it currently True, 246 False, or Unknown? 247 type: string 248 type: 249 description: Type of this condition. At most one of each condition 250 type may apply to a resource at any point in time. 251 type: string 252 required: 253 - lastTransitionTime 254 - reason 255 - status 256 - type 257 type: object 258 type: array 259 configMapRef: 260 description: ConfigMapRef refer to a ConfigMap which contains OpenAPI 261 V3 JSON schema of Component parameters. 262 type: string 263 latestRevision: 264 description: LatestRevision of the component definition 265 properties: 266 name: 267 type: string 268 revision: 269 format: int64 270 type: integer 271 revisionHash: 272 description: RevisionHash record the hash value of the spec of 273 ApplicationRevision object. 274 type: string 275 required: 276 - name 277 - revision 278 type: object 279 type: object 280 type: object 281 served: true 282 storage: true 283 subresources: 284 status: {}