github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/crds/core.oam.dev_workloaddefinitions.yaml (about)

     1  ---
     2  apiVersion: apiextensions.k8s.io/v1
     3  kind: CustomResourceDefinition
     4  metadata:
     5    annotations:
     6      controller-gen.kubebuilder.io/version: v0.11.3
     7    name: workloaddefinitions.core.oam.dev
     8  spec:
     9    group: core.oam.dev
    10    names:
    11      categories:
    12      - oam
    13      kind: WorkloadDefinition
    14      listKind: WorkloadDefinitionList
    15      plural: workloaddefinitions
    16      shortNames:
    17      - workload
    18      singular: workloaddefinition
    19    scope: Namespaced
    20    versions:
    21    - additionalPrinterColumns:
    22      - jsonPath: .spec.definitionRef.name
    23        name: DEFINITION-NAME
    24        type: string
    25      name: v1alpha2
    26      schema:
    27        openAPIV3Schema:
    28          description: A WorkloadDefinition registers a kind of Kubernetes custom resource
    29            as a valid OAM workload kind by referencing its CustomResourceDefinition.
    30            The CRD is used to validate the schema of the workload when it is embedded
    31            in an OAM Component.
    32          properties:
    33            apiVersion:
    34              description: 'APIVersion defines the versioned schema of this representation
    35                of an object. Servers should convert recognized schemas to the latest
    36                internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
    37              type: string
    38            kind:
    39              description: 'Kind is a string value representing the REST resource this
    40                object represents. Servers may infer this from the endpoint the client
    41                submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
    42              type: string
    43            metadata:
    44              type: object
    45            spec:
    46              description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
    47              properties:
    48                childResourceKinds:
    49                  description: ChildResourceKinds are the list of GVK of the child resources
    50                    this workload generates
    51                  items:
    52                    description: A ChildResourceKind defines a child Kubernetes resource
    53                      kind with a selector
    54                    properties:
    55                      apiVersion:
    56                        description: APIVersion of the child resource
    57                        type: string
    58                      kind:
    59                        description: Kind of the child resource
    60                        type: string
    61                      selector:
    62                        additionalProperties:
    63                          type: string
    64                        description: Selector to select the child resources that the
    65                          workload wants to expose to traits
    66                        type: object
    67                    required:
    68                    - apiVersion
    69                    - kind
    70                    type: object
    71                  type: array
    72                definitionRef:
    73                  description: Reference to the CustomResourceDefinition that defines
    74                    this workload kind.
    75                  properties:
    76                    name:
    77                      description: Name of the referenced CustomResourceDefinition.
    78                      type: string
    79                    version:
    80                      description: Version indicate which version should be used if
    81                        CRD has multiple versions by default it will use the first one
    82                        if not specified
    83                      type: string
    84                  required:
    85                  - name
    86                  type: object
    87                extension:
    88                  description: Extension is used for extension needs by OAM platform
    89                    builders
    90                  type: object
    91                  x-kubernetes-preserve-unknown-fields: true
    92                podSpecPath:
    93                  description: PodSpecPath indicates where/if this workload has K8s
    94                    podSpec field if one workload has podSpec, trait can do lot's of
    95                    assumption such as port, env, volume fields.
    96                  type: string
    97                revisionLabel:
    98                  description: RevisionLabel indicates which label for underlying resources(e.g.
    99                    pods) of this workload can be used by trait to create resource selectors(e.g.
   100                    label selector for pods).
   101                  type: string
   102                schematic:
   103                  description: Schematic defines the data format and template of the
   104                    encapsulation of the workload
   105                  properties:
   106                    cue:
   107                      description: CUE defines the encapsulation in CUE format
   108                      properties:
   109                        template:
   110                          description: Template defines the abstraction template data
   111                            of the capability, it will replace the old CUE template
   112                            in extension field. Template is a required field if CUE
   113                            is defined in Capability Definition.
   114                          type: string
   115                      required:
   116                      - template
   117                      type: object
   118                    helm:
   119                      description: A Helm represents resources used by a Helm module
   120                      properties:
   121                        release:
   122                          description: Release records a Helm release used by a Helm
   123                            module workload.
   124                          type: object
   125                          x-kubernetes-preserve-unknown-fields: true
   126                        repository:
   127                          description: HelmRelease records a Helm repository used by
   128                            a Helm module workload.
   129                          type: object
   130                          x-kubernetes-preserve-unknown-fields: true
   131                      required:
   132                      - release
   133                      - repository
   134                      type: object
   135                    kube:
   136                      description: Kube defines the encapsulation in raw Kubernetes
   137                        resource format
   138                      properties:
   139                        parameters:
   140                          description: Parameters defines configurable parameters
   141                          items:
   142                            description: A KubeParameter defines a configurable parameter
   143                              of a component.
   144                            properties:
   145                              description:
   146                                description: Description of this parameter.
   147                                type: string
   148                              fieldPaths:
   149                                description: "FieldPaths specifies an array of fields
   150                                  within this workload that will be overwritten by the
   151                                  value of this parameter. \tAll fields must be of the
   152                                  same type. Fields are specified as JSON field paths
   153                                  without a leading dot, for example 'spec.replicas'."
   154                                items:
   155                                  type: string
   156                                type: array
   157                              name:
   158                                description: Name of this parameter
   159                                type: string
   160                              required:
   161                                default: false
   162                                description: Required specifies whether or not a value
   163                                  for this parameter must be supplied when authoring
   164                                  an Application.
   165                                type: boolean
   166                              type:
   167                                description: 'ValueType indicates the type of the parameter
   168                                  value, and only supports basic data types: string,
   169                                  number, boolean.'
   170                                enum:
   171                                - string
   172                                - number
   173                                - boolean
   174                                type: string
   175                            required:
   176                            - fieldPaths
   177                            - name
   178                            - type
   179                            type: object
   180                          type: array
   181                        template:
   182                          description: Template defines the raw Kubernetes resource
   183                          type: object
   184                          x-kubernetes-preserve-unknown-fields: true
   185                      required:
   186                      - template
   187                      type: object
   188                    terraform:
   189                      description: Terraform is the struct to describe cloud resources
   190                        managed by Hashicorp Terraform
   191                      properties:
   192                        configuration:
   193                          description: Configuration is Terraform Configuration
   194                          type: string
   195                        customRegion:
   196                          description: Region is cloud provider's region. It will override
   197                            the region in the region field of ProviderReference
   198                          type: string
   199                        deleteResource:
   200                          default: true
   201                          description: DeleteResource will determine whether provisioned
   202                            cloud resources will be deleted when CR is deleted
   203                          type: boolean
   204                        gitCredentialsSecretReference:
   205                          description: GitCredentialsSecretReference specifies the reference
   206                            to the secret containing the git credentials
   207                          properties:
   208                            name:
   209                              description: name is unique within a namespace to reference
   210                                a secret resource.
   211                              type: string
   212                            namespace:
   213                              description: namespace defines the space within which
   214                                the secret name must be unique.
   215                              type: string
   216                          type: object
   217                          x-kubernetes-map-type: atomic
   218                        path:
   219                          description: Path is the sub-directory of remote git repository.
   220                            It's valid when remote is set
   221                          type: string
   222                        providerRef:
   223                          description: ProviderReference specifies the reference to
   224                            Provider
   225                          properties:
   226                            name:
   227                              description: Name of the referenced object.
   228                              type: string
   229                            namespace:
   230                              default: default
   231                              description: Namespace of the referenced object.
   232                              type: string
   233                          required:
   234                          - name
   235                          type: object
   236                        type:
   237                          default: hcl
   238                          description: Type specifies which Terraform configuration
   239                            it is, HCL or JSON syntax
   240                          enum:
   241                          - hcl
   242                          - json
   243                          - remote
   244                          type: string
   245                        writeConnectionSecretToRef:
   246                          description: WriteConnectionSecretToReference specifies the
   247                            namespace and name of a Secret to which any connection details
   248                            for this managed resource should be written. Connection
   249                            details frequently include the endpoint, username, and password
   250                            required to connect to the managed resource.
   251                          properties:
   252                            name:
   253                              description: Name of the secret.
   254                              type: string
   255                            namespace:
   256                              description: Namespace of the secret.
   257                              type: string
   258                          required:
   259                          - name
   260                          type: object
   261                      required:
   262                      - configuration
   263                      type: object
   264                  type: object
   265                status:
   266                  description: Status defines the custom health policy and status message
   267                    for workload
   268                  properties:
   269                    customStatus:
   270                      description: CustomStatus defines the custom status message that
   271                        could display to user
   272                      type: string
   273                    healthPolicy:
   274                      description: HealthPolicy defines the health check policy for
   275                        the abstraction
   276                      type: string
   277                  type: object
   278              required:
   279              - definitionRef
   280              type: object
   281            status:
   282              description: WorkloadDefinitionStatus is the status of WorkloadDefinition
   283              properties:
   284                conditions:
   285                  description: Conditions of the resource.
   286                  items:
   287                    description: A Condition that may apply to a resource.
   288                    properties:
   289                      lastTransitionTime:
   290                        description: LastTransitionTime is the last time this condition
   291                          transitioned from one status to another.
   292                        format: date-time
   293                        type: string
   294                      message:
   295                        description: A Message containing details about this condition's
   296                          last transition from one status to another, if any.
   297                        type: string
   298                      reason:
   299                        description: A Reason for this condition's last transition from
   300                          one status to another.
   301                        type: string
   302                      status:
   303                        description: Status of this condition; is it currently True,
   304                          False, or Unknown?
   305                        type: string
   306                      type:
   307                        description: Type of this condition. At most one of each condition
   308                          type may apply to a resource at any point in time.
   309                        type: string
   310                    required:
   311                    - lastTransitionTime
   312                    - reason
   313                    - status
   314                    - type
   315                    type: object
   316                  type: array
   317              type: object
   318          type: object
   319      served: true
   320      storage: false
   321      subresources: {}
   322    - additionalPrinterColumns:
   323      - jsonPath: .spec.definitionRef.name
   324        name: DEFINITION-NAME
   325        type: string
   326      - jsonPath: .metadata.annotations.definition\.oam\.dev/description
   327        name: DESCRIPTION
   328        type: string
   329      name: v1beta1
   330      schema:
   331        openAPIV3Schema:
   332          description: A WorkloadDefinition registers a kind of Kubernetes custom resource
   333            as a valid OAM workload kind by referencing its CustomResourceDefinition.
   334            The CRD is used to validate the schema of the workload when it is embedded
   335            in an OAM Component.
   336          properties:
   337            apiVersion:
   338              description: 'APIVersion defines the versioned schema of this representation
   339                of an object. Servers should convert recognized schemas to the latest
   340                internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
   341              type: string
   342            kind:
   343              description: 'Kind is a string value representing the REST resource this
   344                object represents. Servers may infer this from the endpoint the client
   345                submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
   346              type: string
   347            metadata:
   348              type: object
   349            spec:
   350              description: A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
   351              properties:
   352                childResourceKinds:
   353                  description: ChildResourceKinds are the list of GVK of the child resources
   354                    this workload generates
   355                  items:
   356                    description: A ChildResourceKind defines a child Kubernetes resource
   357                      kind with a selector
   358                    properties:
   359                      apiVersion:
   360                        description: APIVersion of the child resource
   361                        type: string
   362                      kind:
   363                        description: Kind of the child resource
   364                        type: string
   365                      selector:
   366                        additionalProperties:
   367                          type: string
   368                        description: Selector to select the child resources that the
   369                          workload wants to expose to traits
   370                        type: object
   371                    required:
   372                    - apiVersion
   373                    - kind
   374                    type: object
   375                  type: array
   376                definitionRef:
   377                  description: Reference to the CustomResourceDefinition that defines
   378                    this workload kind.
   379                  properties:
   380                    name:
   381                      description: Name of the referenced CustomResourceDefinition.
   382                      type: string
   383                    version:
   384                      description: Version indicate which version should be used if
   385                        CRD has multiple versions by default it will use the first one
   386                        if not specified
   387                      type: string
   388                  required:
   389                  - name
   390                  type: object
   391                extension:
   392                  description: Extension is used for extension needs by OAM platform
   393                    builders
   394                  type: object
   395                  x-kubernetes-preserve-unknown-fields: true
   396                podSpecPath:
   397                  description: PodSpecPath indicates where/if this workload has K8s
   398                    podSpec field if one workload has podSpec, trait can do lot's of
   399                    assumption such as port, env, volume fields.
   400                  type: string
   401                revisionLabel:
   402                  description: RevisionLabel indicates which label for underlying resources(e.g.
   403                    pods) of this workload can be used by trait to create resource selectors(e.g.
   404                    label selector for pods).
   405                  type: string
   406                schematic:
   407                  description: Schematic defines the data format and template of the
   408                    encapsulation of the workload
   409                  properties:
   410                    cue:
   411                      description: CUE defines the encapsulation in CUE format
   412                      properties:
   413                        template:
   414                          description: Template defines the abstraction template data
   415                            of the capability, it will replace the old CUE template
   416                            in extension field. Template is a required field if CUE
   417                            is defined in Capability Definition.
   418                          type: string
   419                      required:
   420                      - template
   421                      type: object
   422                    helm:
   423                      description: A Helm represents resources used by a Helm module
   424                      properties:
   425                        release:
   426                          description: Release records a Helm release used by a Helm
   427                            module workload.
   428                          type: object
   429                          x-kubernetes-preserve-unknown-fields: true
   430                        repository:
   431                          description: HelmRelease records a Helm repository used by
   432                            a Helm module workload.
   433                          type: object
   434                          x-kubernetes-preserve-unknown-fields: true
   435                      required:
   436                      - release
   437                      - repository
   438                      type: object
   439                    kube:
   440                      description: Kube defines the encapsulation in raw Kubernetes
   441                        resource format
   442                      properties:
   443                        parameters:
   444                          description: Parameters defines configurable parameters
   445                          items:
   446                            description: A KubeParameter defines a configurable parameter
   447                              of a component.
   448                            properties:
   449                              description:
   450                                description: Description of this parameter.
   451                                type: string
   452                              fieldPaths:
   453                                description: "FieldPaths specifies an array of fields
   454                                  within this workload that will be overwritten by the
   455                                  value of this parameter. \tAll fields must be of the
   456                                  same type. Fields are specified as JSON field paths
   457                                  without a leading dot, for example 'spec.replicas'."
   458                                items:
   459                                  type: string
   460                                type: array
   461                              name:
   462                                description: Name of this parameter
   463                                type: string
   464                              required:
   465                                default: false
   466                                description: Required specifies whether or not a value
   467                                  for this parameter must be supplied when authoring
   468                                  an Application.
   469                                type: boolean
   470                              type:
   471                                description: 'ValueType indicates the type of the parameter
   472                                  value, and only supports basic data types: string,
   473                                  number, boolean.'
   474                                enum:
   475                                - string
   476                                - number
   477                                - boolean
   478                                type: string
   479                            required:
   480                            - fieldPaths
   481                            - name
   482                            - type
   483                            type: object
   484                          type: array
   485                        template:
   486                          description: Template defines the raw Kubernetes resource
   487                          type: object
   488                          x-kubernetes-preserve-unknown-fields: true
   489                      required:
   490                      - template
   491                      type: object
   492                    terraform:
   493                      description: Terraform is the struct to describe cloud resources
   494                        managed by Hashicorp Terraform
   495                      properties:
   496                        configuration:
   497                          description: Configuration is Terraform Configuration
   498                          type: string
   499                        customRegion:
   500                          description: Region is cloud provider's region. It will override
   501                            the region in the region field of ProviderReference
   502                          type: string
   503                        deleteResource:
   504                          default: true
   505                          description: DeleteResource will determine whether provisioned
   506                            cloud resources will be deleted when CR is deleted
   507                          type: boolean
   508                        gitCredentialsSecretReference:
   509                          description: GitCredentialsSecretReference specifies the reference
   510                            to the secret containing the git credentials
   511                          properties:
   512                            name:
   513                              description: name is unique within a namespace to reference
   514                                a secret resource.
   515                              type: string
   516                            namespace:
   517                              description: namespace defines the space within which
   518                                the secret name must be unique.
   519                              type: string
   520                          type: object
   521                          x-kubernetes-map-type: atomic
   522                        path:
   523                          description: Path is the sub-directory of remote git repository.
   524                            It's valid when remote is set
   525                          type: string
   526                        providerRef:
   527                          description: ProviderReference specifies the reference to
   528                            Provider
   529                          properties:
   530                            name:
   531                              description: Name of the referenced object.
   532                              type: string
   533                            namespace:
   534                              default: default
   535                              description: Namespace of the referenced object.
   536                              type: string
   537                          required:
   538                          - name
   539                          type: object
   540                        type:
   541                          default: hcl
   542                          description: Type specifies which Terraform configuration
   543                            it is, HCL or JSON syntax
   544                          enum:
   545                          - hcl
   546                          - json
   547                          - remote
   548                          type: string
   549                        writeConnectionSecretToRef:
   550                          description: WriteConnectionSecretToReference specifies the
   551                            namespace and name of a Secret to which any connection details
   552                            for this managed resource should be written. Connection
   553                            details frequently include the endpoint, username, and password
   554                            required to connect to the managed resource.
   555                          properties:
   556                            name:
   557                              description: Name of the secret.
   558                              type: string
   559                            namespace:
   560                              description: Namespace of the secret.
   561                              type: string
   562                          required:
   563                          - name
   564                          type: object
   565                      required:
   566                      - configuration
   567                      type: object
   568                  type: object
   569                status:
   570                  description: Status defines the custom health policy and status message
   571                    for workload
   572                  properties:
   573                    customStatus:
   574                      description: CustomStatus defines the custom status message that
   575                        could display to user
   576                      type: string
   577                    healthPolicy:
   578                      description: HealthPolicy defines the health check policy for
   579                        the abstraction
   580                      type: string
   581                  type: object
   582              required:
   583              - definitionRef
   584              type: object
   585            status:
   586              description: WorkloadDefinitionStatus is the status of WorkloadDefinition
   587              properties:
   588                conditions:
   589                  description: Conditions of the resource.
   590                  items:
   591                    description: A Condition that may apply to a resource.
   592                    properties:
   593                      lastTransitionTime:
   594                        description: LastTransitionTime is the last time this condition
   595                          transitioned from one status to another.
   596                        format: date-time
   597                        type: string
   598                      message:
   599                        description: A Message containing details about this condition's
   600                          last transition from one status to another, if any.
   601                        type: string
   602                      reason:
   603                        description: A Reason for this condition's last transition from
   604                          one status to another.
   605                        type: string
   606                      status:
   607                        description: Status of this condition; is it currently True,
   608                          False, or Unknown?
   609                        type: string
   610                      type:
   611                        description: Type of this condition. At most one of each condition
   612                          type may apply to a resource at any point in time.
   613                        type: string
   614                    required:
   615                    - lastTransitionTime
   616                    - reason
   617                    - status
   618                    - type
   619                    type: object
   620                  type: array
   621              type: object
   622          type: object
   623      served: true
   624      storage: true
   625      subresources: {}