
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.6.2
  name: components.core.oam.dev
spec:
  group: core.oam.dev
  names:
    categories:
    - oam
    kind: Component
    listKind: ComponentList
    plural: components
    singular: component
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.workload.kind
      name: WORKLOAD-KIND
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: age
      type: date
    name: v1alpha2
    schema:
      openAPIV3Schema:
        description: A Component describes how an OAM workload kind may be instantiated.
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: A ComponentSpec defines the desired state of a Component.
            properties:
              helm:
                description: HelmRelease records a Helm release used by a Helm module
                  workload.
                properties:
                  release:
                    description: Release records a Helm release used by a Helm module
                      workload.
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  repository:
                    description: HelmRelease records a Helm repository used by a Helm
                      module workload.
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                required:
                - release
                - repository
                type: object
              parameters:
                description: Parameters exposed by this component. ApplicationConfigurations
                  that reference this component may specify values for these parameters,
                  which will in turn be injected into the embedded workload.
                items:
                  description: A ComponentParameter defines a configurable parameter
                    of a component.
                  properties:
                    description:
                      description: Description of this parameter.
                      type: string
                    fieldPaths:
                      description: FieldPaths specifies an array of fields within
                        this Component's workload that will be overwritten by the
                        value of this parameter. The type of the parameter (e.g. int,
                        string) is inferred from the type of these fields; All fields
                        must be of the same type. Fields are specified as JSON field
                        paths without a leading dot, for example 'spec.replicas'.
                      items:
                        type: string
                      type: array
                    name:
                      description: Name of this parameter. OAM ApplicationConfigurations
                        will specify parameter values using this name.
                      type: string
                    required:
                      default: false
                      description: Required specifies whether or not a value for this
                        parameter must be supplied when authoring an ApplicationConfiguration.
                      type: boolean
                  required:
                  - fieldPaths
                  - name
                  type: object
                type: array
              workload:
                description: A Workload that will be created for each ApplicationConfiguration
                  that includes this Component. Workload is an instance of a workloadDefinition.
                  We either use the GVK info or a special "type" field in the workload
                  to associate the content of the workload with its workloadDefinition
                type: object
                x-kubernetes-embedded-resource: true
                x-kubernetes-preserve-unknown-fields: true
            required:
            - workload
            type: object
          status:
            description: A ComponentStatus represents the observed state of a Component.
            properties:
              conditions:
                description: Conditions of the resource.
                items:
                  description: A Condition that may apply to a resource.
                  properties:
                    lastTransitionTime:
                      description: LastTransitionTime is the last time this condition
                        transitioned from one status to another.
                      format: date-time
                      type: string
                    message:
                      description: A Message containing details about this condition's
                        last transition from one status to another, if any.
                      type: string
                    reason:
                      description: A Reason for this condition's last transition from
                        one status to another.
                      type: string
                    status:
                      description: Status of this condition; is it currently True,
                        False, or Unknown?
                      type: string
                    type:
                      description: Type of this condition. At most one of each condition
                        type may apply to a resource at any point in time.
                      type: string
                  required:
                  - lastTransitionTime
                  - reason
                  - status
                  - type
                  type: object
                type: array
              latestRevision:
                description: LatestRevision of component
                properties:
                  name:
                    type: string
                  revision:
                    format: int64
                    type: integer
                  revisionHash:
                    description: RevisionHash record the hash value of the spec of
                      ApplicationRevision object.
                    type: string
                required:
                - name
                - revision
                type: object
              observedGeneration:
                description: The generation observed by the component controller.
                format: int64
                type: integer
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
