
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.2.4
  name: applicationrevisions.core.oam.dev
spec:
  group: core.oam.dev
  names:
    kind: ApplicationRevision
    listKind: ApplicationRevisionList
    plural: applicationrevisions
    singular: applicationrevision
  scope: Namespaced
  versions:
  - name: v1alpha2
    schema:
      openAPIV3Schema:
        description: ApplicationRevision is the Schema for the ApplicationRevision API
        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: ApplicationRevisionSpec is the spec of ApplicationRevision
            properties:
              application:
                description: Application records the snapshot of the created/modified Application
                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: ApplicationSpec is the spec of Application
                    properties:
                      components:
                        items:
                          description: ApplicationComponent describe the component of application
                          properties:
                            name:
                              type: string
                            scopes:
                              additionalProperties:
                                type: string
                              description: scopes in ApplicationComponent defines the component-level scopes the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance.
                              type: object
                              x-kubernetes-preserve-unknown-fields: true
                            settings:
                              type: object
                              x-kubernetes-preserve-unknown-fields: true
                            traits:
                              description: Traits define the trait of one component, the type must be array to keep the order.
                              items:
                                description: ApplicationTrait defines the trait of application
                                properties:
                                  name:
                                    type: string
                                  properties:
                                    type: object
                                    x-kubernetes-preserve-unknown-fields: true
                                required:
                                - name
                                type: object
                              type: array
                            type:
                              type: string
                          required:
                          - name
                          - type
                          type: object
                        type: array
                      rolloutPlan:
                        description: RolloutPlan is the details on how to rollout the resources The controller simply replace the old resources with the new one if there is no rollout plan involved
                        properties:
                          batchPartition:
                            description: All pods in the batches up to the batchPartition (included) will have the target resource specification while the rest still have the source resource This is designed for the operators to manually rollout Default is the the number of batches which will rollout all the batches
                            format: int32
                            type: integer
                          canaryMetric:
                            description: CanaryMetric provides a way for the rollout process to automatically check certain metrics before complete the process
                            items:
                              description: CanaryMetric holds the reference to metrics used for canary analysis
                              properties:
                                interval:
                                  description: Interval represents the windows size
                                  type: string
                                metricsRange:
                                  description: Range value accepted for this metric
                                  properties:
                                    max:
                                      anyOf:
                                      - type: integer
                                      - type: string
                                      description: Maximum value
                                      x-kubernetes-int-or-string: true
                                    min:
                                      anyOf:
                                      - type: integer
                                      - type: string
                                      description: Minimum value
                                      x-kubernetes-int-or-string: true
                                  type: object
                                name:
                                  description: Name of the metric
                                  type: string
                                templateRef:
                                  description: TemplateRef references a metric template object
                                  properties:
                                    apiVersion:
                                      description: APIVersion of the referenced object.
                                      type: string
                                    kind:
                                      description: Kind of the referenced object.
                                      type: string
                                    name:
                                      description: Name of the referenced object.
                                      type: string
                                    uid:
                                      description: UID of the referenced object.
                                      type: string
                                  required:
                                  - apiVersion
                                  - kind
                                  - name
                                  type: object
                              required:
                              - name
                              type: object
                            type: array
                          numBatches:
                            description: The number of batches, default = 1
                            format: int32
                            type: integer
                          paused:
                            description: Paused the rollout, default is false
                            type: boolean
                          rolloutBatches:
                            description: The exact distribution among batches. its size has to be exactly the same as the NumBatches (if set) The total number cannot exceed the targetSize or the size of the source resource We will IGNORE the last batch's replica field if it's a percentage since round errors can lead to inaccurate sum We highly recommend to leave the last batch's replica field empty
                            items:
                              description: RolloutBatch is used to describe how the each batch rollout should be
                              properties:
                                batchRolloutWebhooks:
                                  description: RolloutWebhooks provides a way for the batch rollout to interact with an external process
                                  items:
                                    description: RolloutWebhook holds the reference to external checks used for canary analysis
                                    properties:
                                      expectedStatus:
                                        description: ExpectedStatus contains all the expected http status code that we will accept as success
                                        items:
                                          type: integer
                                        type: array
                                      metadata:
                                        additionalProperties:
                                          type: string
                                        description: Metadata (key-value pairs) for this webhook
                                        type: object
                                      method:
                                        description: Method the HTTP call method, default is POST
                                        type: string
                                      name:
                                        description: Name of this webhook
                                        type: string
                                      type:
                                        description: Type of this webhook
                                        type: string
                                      url:
                                        description: URL address of this webhook
                                        type: string
                                    required:
                                    - name
                                    - type
                                    - url
                                    type: object
                                  type: array
                                canaryMetric:
                                  description: CanaryMetric provides a way for the batch rollout process to automatically check certain metrics before moving to the next batch
                                  items:
                                    description: CanaryMetric holds the reference to metrics used for canary analysis
                                    properties:
                                      interval:
                                        description: Interval represents the windows size
                                        type: string
                                      metricsRange:
                                        description: Range value accepted for this metric
                                        properties:
                                          max:
                                            anyOf:
                                            - type: integer
                                            - type: string
                                            description: Maximum value
                                            x-kubernetes-int-or-string: true
                                          min:
                                            anyOf:
                                            - type: integer
                                            - type: string
                                            description: Minimum value
                                            x-kubernetes-int-or-string: true
                                        type: object
                                      name:
                                        description: Name of the metric
                                        type: string
                                      templateRef:
                                        description: TemplateRef references a metric template object
                                        properties:
                                          apiVersion:
                                            description: APIVersion of the referenced object.
                                            type: string
                                          kind:
                                            description: Kind of the referenced object.
                                            type: string
                                          name:
                                            description: Name of the referenced object.
                                            type: string
                                          uid:
                                            description: UID of the referenced object.
                                            type: string
                                        required:
                                        - apiVersion
                                        - kind
                                        - name
                                        type: object
                                    required:
                                    - name
                                    type: object
                                  type: array
                                instanceInterval:
                                  description: The wait time, in seconds, between instances upgrades, default = 0
                                  format: int32
                                  type: integer
                                maxUnavailable:
                                  anyOf:
                                  - type: integer
                                  - type: string
                                  description: MaxUnavailable is the max allowed number of pods that is unavailable during the upgrade. We will mark the batch as ready as long as there are less or equal number of pods unavailable than this number. default = 0
                                  x-kubernetes-int-or-string: true
                                podList:
                                  description: The list of Pods to get upgraded it is mutually exclusive with the Replicas field
                                  items:
                                    type: string
                                  type: array
                                replicas:
                                  anyOf:
                                  - type: integer
                                  - type: string
                                  description: 'Replicas is the number of pods to upgrade in this batch it can be an absolute number (ex: 5) or a percentage of total pods we will ignore the percentage of the last batch to just fill the gap it is mutually exclusive with the PodList field'
                                  x-kubernetes-int-or-string: true
                              type: object
                            type: array
                          rolloutStrategy:
                            description: RolloutStrategy defines strategies for the rollout plan The default is IncreaseFirstRolloutStrategyType
                            type: string
                          rolloutWebhooks:
                            description: RolloutWebhooks provide a way for the rollout to interact with an external process
                            items:
                              description: RolloutWebhook holds the reference to external checks used for canary analysis
                              properties:
                                expectedStatus:
                                  description: ExpectedStatus contains all the expected http status code that we will accept as success
                                  items:
                                    type: integer
                                  type: array
                                metadata:
                                  additionalProperties:
                                    type: string
                                  description: Metadata (key-value pairs) for this webhook
                                  type: object
                                method:
                                  description: Method the HTTP call method, default is POST
                                  type: string
                                name:
                                  description: Name of this webhook
                                  type: string
                                type:
                                  description: Type of this webhook
                                  type: string
                                url:
                                  description: URL address of this webhook
                                  type: string
                              required:
                              - name
                              - type
                              - url
                              type: object
                            type: array
                          targetSize:
                            description: The size of the target resource. The default is the same as the size of the source resource.
                            format: int32
                            type: integer
                        type: object
                    required:
                    - components
                    type: object
                  status:
                    description: AppStatus defines the observed state of Application
                    properties:
                      batchRollingState:
                        description: BatchRollingState only meaningful when the Status is rolling
                        type: string
                      components:
                        description: Components record the related Components created by Application Controller
                        items:
                          description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known.
                          properties:
                            apiVersion:
                              description: APIVersion of the referenced object.
                              type: string
                            kind:
                              description: Kind of the referenced object.
                              type: string
                            name:
                              description: Name of the referenced object.
                              type: string
                            uid:
                              description: UID of the referenced object.
                              type: string
                          required:
                          - apiVersion
                          - kind
                          - name
                          type: object
                        type: array
                      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
                      currentBatch:
                        description: The current batch the rollout is working on/blocked it starts from 0
                        format: int32
                        type: integer
                      lastAppliedPodTemplateIdentifier:
                        description: lastAppliedPodTemplateIdentifier is a string that uniquely represent the last pod template each workload type could use different ways to identify that so we cannot compare between resources We update this field only after a successful rollout
                        type: string
                      latestRevision:
                        description: LatestRevision of the application configuration it generates
                        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
                      resourceTracker:
                        description: ResourceTracker record the status of the ResourceTracker
                        properties:
                          apiVersion:
                            description: APIVersion of the referenced object.
                            type: string
                          kind:
                            description: Kind of the referenced object.
                            type: string
                          name:
                            description: Name of the referenced object.
                            type: string
                          uid:
                            description: UID of the referenced object.
                            type: string
                        required:
                        - apiVersion
                        - kind
                        - name
                        type: object
                      rollingState:
                        description: RollingState is the Rollout State
                        type: string
                      rolloutTargetSize:
                        description: RolloutTargetTotalSize is the size of the target resources. This is determined once the initial spec verification and does not change until the rollout is restarted
                        format: int32
                        type: integer
                      services:
                        description: Services record the status of the application services
                        items:
                          description: ApplicationComponentStatus record the health status of App component
                          properties:
                            healthy:
                              type: boolean
                            message:
                              type: string
                            name:
                              type: string
                            traits:
                              items:
                                description: ApplicationTraitStatus records the trait health status
                                properties:
                                  healthy:
                                    type: boolean
                                  message:
                                    type: string
                                  type:
                                    type: string
                                required:
                                - healthy
                                - type
                                type: object
                              type: array
                          required:
                          - healthy
                          - name
                          type: object
                        type: array
                      status:
                        description: ApplicationPhase is a label for the condition of a application at the current time
                        type: string
                      targetGeneration:
                        description: NewPodTemplateIdentifier is a string that uniquely represent the new pod template each workload type could use different ways to identify that so we cannot compare between resources
                        type: string
                      upgradedReadyReplicas:
                        description: UpgradedReadyReplicas is the number of Pods upgraded by the rollout controller that have a Ready Condition.
                        format: int32
                        type: integer
                      upgradedReplicas:
                        description: UpgradedReplicas is the number of Pods upgraded by the rollout controller
                        format: int32
                        type: integer
                    required:
                    - currentBatch
                    - rollingState
                    - upgradedReadyReplicas
                    - upgradedReplicas
                    type: object
                type: object
              applicationConfiguration:
                description: ApplicationConfiguration records the rendered applicationConfiguration from Application, it will contains the whole K8s CR of trait and the reference component in it.
                type: object
                x-kubernetes-embedded-resource: true
                x-kubernetes-preserve-unknown-fields: true
              componentDefinitions:
                additionalProperties:
                  description: ComponentDefinition is the Schema for the componentdefinitions API
                  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: ComponentDefinitionSpec defines the desired state of ComponentDefinition
                      properties:
                        childResourceKinds:
                          description: ChildResourceKinds are the list of GVK of the child resources this workload generates
                          items:
                            description: A ChildResourceKind defines a child Kubernetes resource kind with a selector
                            properties:
                              apiVersion:
                                description: APIVersion of the child resource
                                type: string
                              kind:
                                description: Kind of the child resource
                                type: string
                              selector:
                                additionalProperties:
                                  type: string
                                description: Selector to select the child resources that the workload wants to expose to traits
                                type: object
                            required:
                            - apiVersion
                            - kind
                            type: object
                          type: array
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        podSpecPath:
                          description: PodSpecPath indicates where/if this workload has K8s podSpec field if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
                          type: string
                        revisionLabel:
                          description: RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload can be used by trait to create resource selectors(e.g. label selector for pods).
                          type: string
                        schematic:
                          description: Schematic defines the data format and template of the encapsulation of the workload
                          properties:
                            cue:
                              description: CUE defines the encapsulation in CUE format
                              properties:
                                template:
                                  description: Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field. Template is a required field if CUE is defined in Capability Definition.
                                  type: string
                              required:
                              - template
                              type: object
                            helm:
                              description: A Helm represents resources used by a Helm module
                              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
                            kube:
                              description: Kube defines the encapsulation in raw Kubernetes resource format
                              properties:
                                parameters:
                                  description: Parameters defines configurable parameters
                                  items:
                                    description: A KubeParameter 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 workload that will be overwritten by the value of this parameter. \tAll 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
                                        type: string
                                      required:
                                        default: false
                                        description: Required specifies whether or not a value for this parameter must be supplied when authoring an Application.
                                        type: boolean
                                      type:
                                        description: 'ValueType indicates the type of the parameter value, and only supports basic data types: string, number, boolean.'
                                        enum:
                                        - string
                                        - number
                                        - boolean
                                        type: string
                                    required:
                                    - fieldPaths
                                    - name
                                    - type
                                    type: object
                                  type: array
                                template:
                                  description: Template defines the raw Kubernetes resource
                                  type: object
                                  x-kubernetes-preserve-unknown-fields: true
                              required:
                              - template
                              type: object
                          type: object
                        status:
                          description: Status defines the custom health policy and status message for workload
                          properties:
                            customStatus:
                              description: CustomStatus defines the custom status message that could display to user
                              type: string
                            healthPolicy:
                              description: HealthPolicy defines the health check policy for the abstraction
                              type: string
                          type: object
                        workload:
                          description: Workload is a workload type descriptor
                          properties:
                            definition:
                              description: Definition mutually exclusive to workload.type, a embedded WorkloadDefinition
                              properties:
                                apiVersion:
                                  type: string
                                kind:
                                  type: string
                              required:
                              - apiVersion
                              - kind
                              type: object
                            type:
                              description: Type ref to a WorkloadDefinition via name
                              type: string
                          type: object
                      required:
                      - workload
                      type: object
                    status:
                      description: ComponentDefinitionStatus is the status of ComponentDefinition
                      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
                        configMapRef:
                          description: ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
                          type: string
                      type: object
                  type: object
                description: ComponentDefinitions records the snapshot of the componentDefinitions related with the created/modified Application
                type: object
              components:
                items:
                  description: RawComponent record raw component
                  properties:
                    raw:
                      type: object
                      x-kubernetes-embedded-resource: true
                      x-kubernetes-preserve-unknown-fields: true
                  required:
                  - raw
                  type: object
                type: array
              scopeDefinitions:
                additionalProperties:
                  description: A ScopeDefinition registers a kind of Kubernetes custom resource as a valid OAM scope kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the scope when it is embedded in an OAM ApplicationConfiguration.
                  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 ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
                      properties:
                        allowComponentOverlap:
                          description: AllowComponentOverlap specifies whether an OAM component may exist in multiple instances of this kind of scope.
                          type: boolean
                        definitionRef:
                          description: Reference to the CustomResourceDefinition that defines this scope kind.
                          properties:
                            name:
                              description: Name of the referenced CustomResourceDefinition.
                              type: string
                            version:
                              description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified
                              type: string
                          required:
                          - name
                          type: object
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        workloadRefsPath:
                          description: WorkloadRefsPath indicates if/where a scope accepts workloadRef objects
                          type: string
                      required:
                      - allowComponentOverlap
                      - definitionRef
                      type: object
                  type: object
                description: ScopeDefinitions records the snapshot of the scopeDefinitions related with the created/modified Application
                type: object
              traitDefinitions:
                additionalProperties:
                  description: A TraitDefinition registers a kind of Kubernetes custom resource as a valid OAM trait kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the trait when it is embedded in an OAM ApplicationConfiguration.
                  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 TraitDefinitionSpec defines the desired state of a TraitDefinition.
                      properties:
                        appliesToWorkloads:
                          description: AppliesToWorkloads specifies the list of workload kinds this trait applies to. Workload kinds are specified in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to all workload kinds.
                          items:
                            type: string
                          type: array
                        conflictsWith:
                          description: 'ConflictsWith specifies the list of traits(CRD name, Definition name, CRD group) which could not apply to the same workloads with this trait. Traits that omit this field can work with any other traits. Example rules: "service" # Trait definition name "services.k8s.io" # API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar" # label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
                          items:
                            type: string
                          type: array
                        definitionRef:
                          description: Reference to the CustomResourceDefinition that defines this trait kind.
                          properties:
                            name:
                              description: Name of the referenced CustomResourceDefinition.
                              type: string
                            version:
                              description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified
                              type: string
                          required:
                          - name
                          type: object
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        revisionEnabled:
                          description: Revision indicates whether a trait is aware of component revision
                          type: boolean
                        schematic:
                          description: Schematic defines the data format and template of the encapsulation of the trait
                          properties:
                            cue:
                              description: CUE defines the encapsulation in CUE format
                              properties:
                                template:
                                  description: Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field. Template is a required field if CUE is defined in Capability Definition.
                                  type: string
                              required:
                              - template
                              type: object
                            helm:
                              description: A Helm represents resources used by a Helm module
                              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
                            kube:
                              description: Kube defines the encapsulation in raw Kubernetes resource format
                              properties:
                                parameters:
                                  description: Parameters defines configurable parameters
                                  items:
                                    description: A KubeParameter 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 workload that will be overwritten by the value of this parameter. \tAll 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
                                        type: string
                                      required:
                                        default: false
                                        description: Required specifies whether or not a value for this parameter must be supplied when authoring an Application.
                                        type: boolean
                                      type:
                                        description: 'ValueType indicates the type of the parameter value, and only supports basic data types: string, number, boolean.'
                                        enum:
                                        - string
                                        - number
                                        - boolean
                                        type: string
                                    required:
                                    - fieldPaths
                                    - name
                                    - type
                                    type: object
                                  type: array
                                template:
                                  description: Template defines the raw Kubernetes resource
                                  type: object
                                  x-kubernetes-preserve-unknown-fields: true
                              required:
                              - template
                              type: object
                          type: object
                        status:
                          description: Status defines the custom health policy and status message for trait
                          properties:
                            customStatus:
                              description: CustomStatus defines the custom status message that could display to user
                              type: string
                            healthPolicy:
                              description: HealthPolicy defines the health check policy for the abstraction
                              type: string
                          type: object
                        workloadRefPath:
                          description: WorkloadRefPath indicates where/if a trait accepts a workloadRef object
                          type: string
                      type: object
                    status:
                      description: TraitDefinitionStatus is the status of TraitDefinition
                      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
                        configMapRef:
                          description: ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
                          type: string
                      type: object
                  type: object
                description: TraitDefinitions records the snapshot of the traitDefinitions related with the created/modified Application
                type: object
              workloadDefinitions:
                additionalProperties:
                  description: A WorkloadDefinition registers a kind of Kubernetes custom resource as a valid OAM workload kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the workload when it is embedded in an OAM Component.
                  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 WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
                      properties:
                        childResourceKinds:
                          description: ChildResourceKinds are the list of GVK of the child resources this workload generates
                          items:
                            description: A ChildResourceKind defines a child Kubernetes resource kind with a selector
                            properties:
                              apiVersion:
                                description: APIVersion of the child resource
                                type: string
                              kind:
                                description: Kind of the child resource
                                type: string
                              selector:
                                additionalProperties:
                                  type: string
                                description: Selector to select the child resources that the workload wants to expose to traits
                                type: object
                            required:
                            - apiVersion
                            - kind
                            type: object
                          type: array
                        definitionRef:
                          description: Reference to the CustomResourceDefinition that defines this workload kind.
                          properties:
                            name:
                              description: Name of the referenced CustomResourceDefinition.
                              type: string
                            version:
                              description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified
                              type: string
                          required:
                          - name
                          type: object
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        podSpecPath:
                          description: PodSpecPath indicates where/if this workload has K8s podSpec field if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
                          type: string
                        revisionLabel:
                          description: RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload can be used by trait to create resource selectors(e.g. label selector for pods).
                          type: string
                        schematic:
                          description: Schematic defines the data format and template of the encapsulation of the workload
                          properties:
                            cue:
                              description: CUE defines the encapsulation in CUE format
                              properties:
                                template:
                                  description: Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field. Template is a required field if CUE is defined in Capability Definition.
                                  type: string
                              required:
                              - template
                              type: object
                            helm:
                              description: A Helm represents resources used by a Helm module
                              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
                            kube:
                              description: Kube defines the encapsulation in raw Kubernetes resource format
                              properties:
                                parameters:
                                  description: Parameters defines configurable parameters
                                  items:
                                    description: A KubeParameter 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 workload that will be overwritten by the value of this parameter. \tAll 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
                                        type: string
                                      required:
                                        default: false
                                        description: Required specifies whether or not a value for this parameter must be supplied when authoring an Application.
                                        type: boolean
                                      type:
                                        description: 'ValueType indicates the type of the parameter value, and only supports basic data types: string, number, boolean.'
                                        enum:
                                        - string
                                        - number
                                        - boolean
                                        type: string
                                    required:
                                    - fieldPaths
                                    - name
                                    - type
                                    type: object
                                  type: array
                                template:
                                  description: Template defines the raw Kubernetes resource
                                  type: object
                                  x-kubernetes-preserve-unknown-fields: true
                              required:
                              - template
                              type: object
                          type: object
                        status:
                          description: Status defines the custom health policy and status message for workload
                          properties:
                            customStatus:
                              description: CustomStatus defines the custom status message that could display to user
                              type: string
                            healthPolicy:
                              description: HealthPolicy defines the health check policy for the abstraction
                              type: string
                          type: object
                      required:
                      - definitionRef
                      type: object
                    status:
                      description: WorkloadDefinitionStatus is the status of WorkloadDefinition
                      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
                      type: object
                  type: object
                description: WorkloadDefinitions records the snapshot of the workloadDefinitions related with the created/modified Application
                type: object
            required:
            - application
            - applicationConfiguration
            type: object
        type: object
    served: true
    storage: false
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: ApplicationRevision is the Schema for the ApplicationRevision API
        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: ApplicationRevisionSpec is the spec of ApplicationRevision
            properties:
              application:
                description: Application records the snapshot of the created/modified Application
                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: ApplicationSpec is the spec of Application
                    properties:
                      components:
                        items:
                          description: ApplicationComponent describe the component of application
                          properties:
                            name:
                              type: string
                            properties:
                              type: object
                              x-kubernetes-preserve-unknown-fields: true
                            scopes:
                              additionalProperties:
                                type: string
                              description: scopes in ApplicationComponent defines the component-level scopes the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance.
                              type: object
                              x-kubernetes-preserve-unknown-fields: true
                            traits:
                              description: Traits define the trait of one component, the type must be array to keep the order.
                              items:
                                description: ApplicationTrait defines the trait of application
                                properties:
                                  properties:
                                    type: object
                                    x-kubernetes-preserve-unknown-fields: true
                                  type:
                                    type: string
                                required:
                                - type
                                type: object
                              type: array
                            type:
                              type: string
                          required:
                          - name
                          - type
                          type: object
                        type: array
                      rolloutPlan:
                        description: RolloutPlan is the details on how to rollout the resources The controller simply replace the old resources with the new one if there is no rollout plan involved
                        properties:
                          batchPartition:
                            description: All pods in the batches up to the batchPartition (included) will have the target resource specification while the rest still have the source resource This is designed for the operators to manually rollout Default is the the number of batches which will rollout all the batches
                            format: int32
                            type: integer
                          canaryMetric:
                            description: CanaryMetric provides a way for the rollout process to automatically check certain metrics before complete the process
                            items:
                              description: CanaryMetric holds the reference to metrics used for canary analysis
                              properties:
                                interval:
                                  description: Interval represents the windows size
                                  type: string
                                metricsRange:
                                  description: Range value accepted for this metric
                                  properties:
                                    max:
                                      anyOf:
                                      - type: integer
                                      - type: string
                                      description: Maximum value
                                      x-kubernetes-int-or-string: true
                                    min:
                                      anyOf:
                                      - type: integer
                                      - type: string
                                      description: Minimum value
                                      x-kubernetes-int-or-string: true
                                  type: object
                                name:
                                  description: Name of the metric
                                  type: string
                                templateRef:
                                  description: TemplateRef references a metric template object
                                  properties:
                                    apiVersion:
                                      description: APIVersion of the referenced object.
                                      type: string
                                    kind:
                                      description: Kind of the referenced object.
                                      type: string
                                    name:
                                      description: Name of the referenced object.
                                      type: string
                                    uid:
                                      description: UID of the referenced object.
                                      type: string
                                  required:
                                  - apiVersion
                                  - kind
                                  - name
                                  type: object
                              required:
                              - name
                              type: object
                            type: array
                          numBatches:
                            description: The number of batches, default = 1
                            format: int32
                            type: integer
                          paused:
                            description: Paused the rollout, default is false
                            type: boolean
                          rolloutBatches:
                            description: The exact distribution among batches. its size has to be exactly the same as the NumBatches (if set) The total number cannot exceed the targetSize or the size of the source resource We will IGNORE the last batch's replica field if it's a percentage since round errors can lead to inaccurate sum We highly recommend to leave the last batch's replica field empty
                            items:
                              description: RolloutBatch is used to describe how the each batch rollout should be
                              properties:
                                batchRolloutWebhooks:
                                  description: RolloutWebhooks provides a way for the batch rollout to interact with an external process
                                  items:
                                    description: RolloutWebhook holds the reference to external checks used for canary analysis
                                    properties:
                                      expectedStatus:
                                        description: ExpectedStatus contains all the expected http status code that we will accept as success
                                        items:
                                          type: integer
                                        type: array
                                      metadata:
                                        additionalProperties:
                                          type: string
                                        description: Metadata (key-value pairs) for this webhook
                                        type: object
                                      method:
                                        description: Method the HTTP call method, default is POST
                                        type: string
                                      name:
                                        description: Name of this webhook
                                        type: string
                                      type:
                                        description: Type of this webhook
                                        type: string
                                      url:
                                        description: URL address of this webhook
                                        type: string
                                    required:
                                    - name
                                    - type
                                    - url
                                    type: object
                                  type: array
                                canaryMetric:
                                  description: CanaryMetric provides a way for the batch rollout process to automatically check certain metrics before moving to the next batch
                                  items:
                                    description: CanaryMetric holds the reference to metrics used for canary analysis
                                    properties:
                                      interval:
                                        description: Interval represents the windows size
                                        type: string
                                      metricsRange:
                                        description: Range value accepted for this metric
                                        properties:
                                          max:
                                            anyOf:
                                            - type: integer
                                            - type: string
                                            description: Maximum value
                                            x-kubernetes-int-or-string: true
                                          min:
                                            anyOf:
                                            - type: integer
                                            - type: string
                                            description: Minimum value
                                            x-kubernetes-int-or-string: true
                                        type: object
                                      name:
                                        description: Name of the metric
                                        type: string
                                      templateRef:
                                        description: TemplateRef references a metric template object
                                        properties:
                                          apiVersion:
                                            description: APIVersion of the referenced object.
                                            type: string
                                          kind:
                                            description: Kind of the referenced object.
                                            type: string
                                          name:
                                            description: Name of the referenced object.
                                            type: string
                                          uid:
                                            description: UID of the referenced object.
                                            type: string
                                        required:
                                        - apiVersion
                                        - kind
                                        - name
                                        type: object
                                    required:
                                    - name
                                    type: object
                                  type: array
                                instanceInterval:
                                  description: The wait time, in seconds, between instances upgrades, default = 0
                                  format: int32
                                  type: integer
                                maxUnavailable:
                                  anyOf:
                                  - type: integer
                                  - type: string
                                  description: MaxUnavailable is the max allowed number of pods that is unavailable during the upgrade. We will mark the batch as ready as long as there are less or equal number of pods unavailable than this number. default = 0
                                  x-kubernetes-int-or-string: true
                                podList:
                                  description: The list of Pods to get upgraded it is mutually exclusive with the Replicas field
                                  items:
                                    type: string
                                  type: array
                                replicas:
                                  anyOf:
                                  - type: integer
                                  - type: string
                                  description: 'Replicas is the number of pods to upgrade in this batch it can be an absolute number (ex: 5) or a percentage of total pods we will ignore the percentage of the last batch to just fill the gap it is mutually exclusive with the PodList field'
                                  x-kubernetes-int-or-string: true
                              type: object
                            type: array
                          rolloutStrategy:
                            description: RolloutStrategy defines strategies for the rollout plan The default is IncreaseFirstRolloutStrategyType
                            type: string
                          rolloutWebhooks:
                            description: RolloutWebhooks provide a way for the rollout to interact with an external process
                            items:
                              description: RolloutWebhook holds the reference to external checks used for canary analysis
                              properties:
                                expectedStatus:
                                  description: ExpectedStatus contains all the expected http status code that we will accept as success
                                  items:
                                    type: integer
                                  type: array
                                metadata:
                                  additionalProperties:
                                    type: string
                                  description: Metadata (key-value pairs) for this webhook
                                  type: object
                                method:
                                  description: Method the HTTP call method, default is POST
                                  type: string
                                name:
                                  description: Name of this webhook
                                  type: string
                                type:
                                  description: Type of this webhook
                                  type: string
                                url:
                                  description: URL address of this webhook
                                  type: string
                              required:
                              - name
                              - type
                              - url
                              type: object
                            type: array
                          targetSize:
                            description: The size of the target resource. The default is the same as the size of the source resource.
                            format: int32
                            type: integer
                        type: object
                    required:
                    - components
                    type: object
                  status:
                    description: AppStatus defines the observed state of Application
                    properties:
                      batchRollingState:
                        description: BatchRollingState only meaningful when the Status is rolling
                        type: string
                      components:
                        description: Components record the related Components created by Application Controller
                        items:
                          description: A TypedReference refers to an object by Name, Kind, and APIVersion. It is commonly used to reference cluster-scoped objects or objects where the namespace is already known.
                          properties:
                            apiVersion:
                              description: APIVersion of the referenced object.
                              type: string
                            kind:
                              description: Kind of the referenced object.
                              type: string
                            name:
                              description: Name of the referenced object.
                              type: string
                            uid:
                              description: UID of the referenced object.
                              type: string
                          required:
                          - apiVersion
                          - kind
                          - name
                          type: object
                        type: array
                      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
                      currentBatch:
                        description: The current batch the rollout is working on/blocked it starts from 0
                        format: int32
                        type: integer
                      lastAppliedPodTemplateIdentifier:
                        description: lastAppliedPodTemplateIdentifier is a string that uniquely represent the last pod template each workload type could use different ways to identify that so we cannot compare between resources We update this field only after a successful rollout
                        type: string
                      latestRevision:
                        description: LatestRevision of the application configuration it generates
                        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
                      resourceTracker:
                        description: ResourceTracker record the status of the ResourceTracker
                        properties:
                          apiVersion:
                            description: APIVersion of the referenced object.
                            type: string
                          kind:
                            description: Kind of the referenced object.
                            type: string
                          name:
                            description: Name of the referenced object.
                            type: string
                          uid:
                            description: UID of the referenced object.
                            type: string
                        required:
                        - apiVersion
                        - kind
                        - name
                        type: object
                      rollingState:
                        description: RollingState is the Rollout State
                        type: string
                      rolloutTargetSize:
                        description: RolloutTargetTotalSize is the size of the target resources. This is determined once the initial spec verification and does not change until the rollout is restarted
                        format: int32
                        type: integer
                      services:
                        description: Services record the status of the application services
                        items:
                          description: ApplicationComponentStatus record the health status of App component
                          properties:
                            healthy:
                              type: boolean
                            message:
                              type: string
                            name:
                              type: string
                            traits:
                              items:
                                description: ApplicationTraitStatus records the trait health status
                                properties:
                                  healthy:
                                    type: boolean
                                  message:
                                    type: string
                                  type:
                                    type: string
                                required:
                                - healthy
                                - type
                                type: object
                              type: array
                          required:
                          - healthy
                          - name
                          type: object
                        type: array
                      status:
                        description: ApplicationPhase is a label for the condition of a application at the current time
                        type: string
                      targetGeneration:
                        description: NewPodTemplateIdentifier is a string that uniquely represent the new pod template each workload type could use different ways to identify that so we cannot compare between resources
                        type: string
                      upgradedReadyReplicas:
                        description: UpgradedReadyReplicas is the number of Pods upgraded by the rollout controller that have a Ready Condition.
                        format: int32
                        type: integer
                      upgradedReplicas:
                        description: UpgradedReplicas is the number of Pods upgraded by the rollout controller
                        format: int32
                        type: integer
                    required:
                    - currentBatch
                    - rollingState
                    - upgradedReadyReplicas
                    - upgradedReplicas
                    type: object
                type: object
              applicationConfiguration:
                description: ApplicationConfiguration records the rendered applicationConfiguration from Application, it will contains the whole K8s CR of trait and the reference component in it.
                type: object
                x-kubernetes-embedded-resource: true
                x-kubernetes-preserve-unknown-fields: true
              componentDefinitions:
                additionalProperties:
                  description: ComponentDefinition is the Schema for the componentdefinitions API
                  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: ComponentDefinitionSpec defines the desired state of ComponentDefinition
                      properties:
                        childResourceKinds:
                          description: ChildResourceKinds are the list of GVK of the child resources this workload generates
                          items:
                            description: A ChildResourceKind defines a child Kubernetes resource kind with a selector
                            properties:
                              apiVersion:
                                description: APIVersion of the child resource
                                type: string
                              kind:
                                description: Kind of the child resource
                                type: string
                              selector:
                                additionalProperties:
                                  type: string
                                description: Selector to select the child resources that the workload wants to expose to traits
                                type: object
                            required:
                            - apiVersion
                            - kind
                            type: object
                          type: array
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        podSpecPath:
                          description: PodSpecPath indicates where/if this workload has K8s podSpec field if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
                          type: string
                        revisionLabel:
                          description: RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload can be used by trait to create resource selectors(e.g. label selector for pods).
                          type: string
                        schematic:
                          description: Schematic defines the data format and template of the encapsulation of the workload
                          properties:
                            cue:
                              description: CUE defines the encapsulation in CUE format
                              properties:
                                template:
                                  description: Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field. Template is a required field if CUE is defined in Capability Definition.
                                  type: string
                              required:
                              - template
                              type: object
                            helm:
                              description: A Helm represents resources used by a Helm module
                              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
                            kube:
                              description: Kube defines the encapsulation in raw Kubernetes resource format
                              properties:
                                parameters:
                                  description: Parameters defines configurable parameters
                                  items:
                                    description: A KubeParameter 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 workload that will be overwritten by the value of this parameter. \tAll 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
                                        type: string
                                      required:
                                        default: false
                                        description: Required specifies whether or not a value for this parameter must be supplied when authoring an Application.
                                        type: boolean
                                      type:
                                        description: 'ValueType indicates the type of the parameter value, and only supports basic data types: string, number, boolean.'
                                        enum:
                                        - string
                                        - number
                                        - boolean
                                        type: string
                                    required:
                                    - fieldPaths
                                    - name
                                    - type
                                    type: object
                                  type: array
                                template:
                                  description: Template defines the raw Kubernetes resource
                                  type: object
                                  x-kubernetes-preserve-unknown-fields: true
                              required:
                              - template
                              type: object
                          type: object
                        status:
                          description: Status defines the custom health policy and status message for workload
                          properties:
                            customStatus:
                              description: CustomStatus defines the custom status message that could display to user
                              type: string
                            healthPolicy:
                              description: HealthPolicy defines the health check policy for the abstraction
                              type: string
                          type: object
                        workload:
                          description: Workload is a workload type descriptor
                          properties:
                            definition:
                              description: Definition mutually exclusive to workload.type, a embedded WorkloadDefinition
                              properties:
                                apiVersion:
                                  type: string
                                kind:
                                  type: string
                              required:
                              - apiVersion
                              - kind
                              type: object
                            type:
                              description: Type ref to a WorkloadDefinition via name
                              type: string
                          type: object
                      required:
                      - workload
                      type: object
                    status:
                      description: ComponentDefinitionStatus is the status of ComponentDefinition
                      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
                        configMapRef:
                          description: ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
                          type: string
                      type: object
                  type: object
                description: ComponentDefinitions records the snapshot of the componentDefinitions related with the created/modified Application
                type: object
              components:
                description: Components records the rendered components from Application, it will contains the whole K8s CR of workload in it.
                items:
                  description: RawComponent record raw component
                  properties:
                    raw:
                      type: object
                      x-kubernetes-embedded-resource: true
                      x-kubernetes-preserve-unknown-fields: true
                  required:
                  - raw
                  type: object
                type: array
              scopeDefinitions:
                additionalProperties:
                  description: A ScopeDefinition registers a kind of Kubernetes custom resource as a valid OAM scope kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the scope when it is embedded in an OAM ApplicationConfiguration.
                  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 ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
                      properties:
                        allowComponentOverlap:
                          description: AllowComponentOverlap specifies whether an OAM component may exist in multiple instances of this kind of scope.
                          type: boolean
                        definitionRef:
                          description: Reference to the CustomResourceDefinition that defines this scope kind.
                          properties:
                            name:
                              description: Name of the referenced CustomResourceDefinition.
                              type: string
                            version:
                              description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified
                              type: string
                          required:
                          - name
                          type: object
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        workloadRefsPath:
                          description: WorkloadRefsPath indicates if/where a scope accepts workloadRef objects
                          type: string
                      required:
                      - allowComponentOverlap
                      - definitionRef
                      type: object
                  type: object
                description: ScopeDefinitions records the snapshot of the scopeDefinitions related with the created/modified Application
                type: object
              traitDefinitions:
                additionalProperties:
                  description: A TraitDefinition registers a kind of Kubernetes custom resource as a valid OAM trait kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the trait when it is embedded in an OAM ApplicationConfiguration.
                  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 TraitDefinitionSpec defines the desired state of a TraitDefinition.
                      properties:
                        appliesToWorkloads:
                          description: AppliesToWorkloads specifies the list of workload kinds this trait applies to. Workload kinds are specified in kind.group/version format, e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to all workload kinds.
                          items:
                            type: string
                          type: array
                        conflictsWith:
                          description: 'ConflictsWith specifies the list of traits(CRD name, Definition name, CRD group) which could not apply to the same workloads with this trait. Traits that omit this field can work with any other traits. Example rules: "service" # Trait definition name "services.k8s.io" # API resource/crd name "*.networking.k8s.io" # API group "labelSelector:foo=bar" # label selector labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse'
                          items:
                            type: string
                          type: array
                        definitionRef:
                          description: Reference to the CustomResourceDefinition that defines this trait kind.
                          properties:
                            name:
                              description: Name of the referenced CustomResourceDefinition.
                              type: string
                            version:
                              description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified
                              type: string
                          required:
                          - name
                          type: object
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        revisionEnabled:
                          description: Revision indicates whether a trait is aware of component revision
                          type: boolean
                        schematic:
                          description: Schematic defines the data format and template of the encapsulation of the trait
                          properties:
                            cue:
                              description: CUE defines the encapsulation in CUE format
                              properties:
                                template:
                                  description: Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field. Template is a required field if CUE is defined in Capability Definition.
                                  type: string
                              required:
                              - template
                              type: object
                            helm:
                              description: A Helm represents resources used by a Helm module
                              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
                            kube:
                              description: Kube defines the encapsulation in raw Kubernetes resource format
                              properties:
                                parameters:
                                  description: Parameters defines configurable parameters
                                  items:
                                    description: A KubeParameter 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 workload that will be overwritten by the value of this parameter. \tAll 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
                                        type: string
                                      required:
                                        default: false
                                        description: Required specifies whether or not a value for this parameter must be supplied when authoring an Application.
                                        type: boolean
                                      type:
                                        description: 'ValueType indicates the type of the parameter value, and only supports basic data types: string, number, boolean.'
                                        enum:
                                        - string
                                        - number
                                        - boolean
                                        type: string
                                    required:
                                    - fieldPaths
                                    - name
                                    - type
                                    type: object
                                  type: array
                                template:
                                  description: Template defines the raw Kubernetes resource
                                  type: object
                                  x-kubernetes-preserve-unknown-fields: true
                              required:
                              - template
                              type: object
                          type: object
                        status:
                          description: Status defines the custom health policy and status message for trait
                          properties:
                            customStatus:
                              description: CustomStatus defines the custom status message that could display to user
                              type: string
                            healthPolicy:
                              description: HealthPolicy defines the health check policy for the abstraction
                              type: string
                          type: object
                        workloadRefPath:
                          description: WorkloadRefPath indicates where/if a trait accepts a workloadRef object
                          type: string
                      type: object
                    status:
                      description: TraitDefinitionStatus is the status of TraitDefinition
                      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
                        configMapRef:
                          description: ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
                          type: string
                      type: object
                  type: object
                description: TraitDefinitions records the snapshot of the traitDefinitions related with the created/modified Application
                type: object
              workloadDefinitions:
                additionalProperties:
                  description: A WorkloadDefinition registers a kind of Kubernetes custom resource as a valid OAM workload kind by referencing its CustomResourceDefinition. The CRD is used to validate the schema of the workload when it is embedded in an OAM Component.
                  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 WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
                      properties:
                        childResourceKinds:
                          description: ChildResourceKinds are the list of GVK of the child resources this workload generates
                          items:
                            description: A ChildResourceKind defines a child Kubernetes resource kind with a selector
                            properties:
                              apiVersion:
                                description: APIVersion of the child resource
                                type: string
                              kind:
                                description: Kind of the child resource
                                type: string
                              selector:
                                additionalProperties:
                                  type: string
                                description: Selector to select the child resources that the workload wants to expose to traits
                                type: object
                            required:
                            - apiVersion
                            - kind
                            type: object
                          type: array
                        definitionRef:
                          description: Reference to the CustomResourceDefinition that defines this workload kind.
                          properties:
                            name:
                              description: Name of the referenced CustomResourceDefinition.
                              type: string
                            version:
                              description: Version indicate which version should be used if CRD has multiple versions by default it will use the first one if not specified
                              type: string
                          required:
                          - name
                          type: object
                        extension:
                          description: Extension is used for extension needs by OAM platform builders
                          type: object
                          x-kubernetes-preserve-unknown-fields: true
                        podSpecPath:
                          description: PodSpecPath indicates where/if this workload has K8s podSpec field if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
                          type: string
                        revisionLabel:
                          description: RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload can be used by trait to create resource selectors(e.g. label selector for pods).
                          type: string
                        schematic:
                          description: Schematic defines the data format and template of the encapsulation of the workload
                          properties:
                            cue:
                              description: CUE defines the encapsulation in CUE format
                              properties:
                                template:
                                  description: Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field. Template is a required field if CUE is defined in Capability Definition.
                                  type: string
                              required:
                              - template
                              type: object
                            helm:
                              description: A Helm represents resources used by a Helm module
                              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
                            kube:
                              description: Kube defines the encapsulation in raw Kubernetes resource format
                              properties:
                                parameters:
                                  description: Parameters defines configurable parameters
                                  items:
                                    description: A KubeParameter 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 workload that will be overwritten by the value of this parameter. \tAll 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
                                        type: string
                                      required:
                                        default: false
                                        description: Required specifies whether or not a value for this parameter must be supplied when authoring an Application.
                                        type: boolean
                                      type:
                                        description: 'ValueType indicates the type of the parameter value, and only supports basic data types: string, number, boolean.'
                                        enum:
                                        - string
                                        - number
                                        - boolean
                                        type: string
                                    required:
                                    - fieldPaths
                                    - name
                                    - type
                                    type: object
                                  type: array
                                template:
                                  description: Template defines the raw Kubernetes resource
                                  type: object
                                  x-kubernetes-preserve-unknown-fields: true
                              required:
                              - template
                              type: object
                          type: object
                        status:
                          description: Status defines the custom health policy and status message for workload
                          properties:
                            customStatus:
                              description: CustomStatus defines the custom status message that could display to user
                              type: string
                            healthPolicy:
                              description: HealthPolicy defines the health check policy for the abstraction
                              type: string
                          type: object
                      required:
                      - definitionRef
                      type: object
                    status:
                      description: WorkloadDefinitionStatus is the status of WorkloadDefinition
                      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
                      type: object
                  type: object
                description: WorkloadDefinitions records the snapshot of the workloadDefinitions related with the created/modified Application
                type: object
            required:
            - application
            - applicationConfiguration
            type: object
        type: object
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
