---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.5
  name: freights.kargo.akuity.io
spec:
  group: kargo.akuity.io
  names:
    kind: Freight
    listKind: FreightList
    plural: freights
    singular: freight
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .metadata.labels.kargo\.akuity\.io/alias
      name: Alias
      type: string
    - jsonPath: .origin.kind
      name: Origin (Kind)
      type: string
    - jsonPath: .origin.name
      name: Origin (Name)
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Freight represents a collection of versioned artifacts.
        properties:
          alias:
            description: |-
              Alias is a human-friendly alias for a piece of Freight. This is an optional
              field. A defaulting webhook will sync this field with the value of the
              kargo.akuity.io/alias label. When the alias label is not present or differs
              from the value of this field, the defaulting webhook will set the label to
              the value of this field. If the alias label is present and this field is
              empty, the defaulting webhook will set the value of this field to the value
              of the alias label. If this field is empty and the alias label is not
              present, the defaulting webhook will choose an available alias and assign
              it to both the field and label.
            type: string
          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
          charts:
            description: Charts describes specific versions of specific Helm charts.
            items:
              description: Chart describes a specific version of a Helm chart.
              properties:
                name:
                  description: Name specifies the name of the chart.
                  type: string
                repoURL:
                  description: |-
                    RepoURL specifies the URL of a Helm chart repository. Classic chart
                    repositories (using HTTP/S) can contain differently named charts. When this
                    field points to such a repository, the Name field will specify the name of
                    the chart within the repository. In the case of a repository within an OCI
                    registry, the URL implicitly points to a specific chart and the Name field
                    will be empty.
                  type: string
                version:
                  description: Version specifies a particular version of the chart.
                  type: string
              type: object
            type: array
          commits:
            description: Commits describes specific Git repository commits.
            items:
              description: GitCommit describes a specific commit from a specific Git
                repository.
              properties:
                author:
                  description: Author is the author of the commit.
                  type: string
                branch:
                  description: Branch denotes the branch of the repository where this
                    commit was found.
                  type: string
                committer:
                  description: Committer is the person who committed the commit.
                  type: string
                id:
                  description: |-
                    ID is the ID of a specific commit in the Git repository specified by
                    RepoURL.
                  type: string
                message:
                  description: |-
                    Message is the message associated with the commit. At present, this only
                    contains the first line (subject) of the commit message.
                  type: string
                repoURL:
                  description: RepoURL is the URL of a Git repository.
                  type: string
                tag:
                  description: |-
                    Tag denotes a tag in the repository that matched selection criteria and
                    resolved to this commit.
                  type: string
              type: object
            type: array
          images:
            description: Images describes specific versions of specific container
              images.
            items:
              description: Image describes a specific version of a container image.
              properties:
                digest:
                  description: |-
                    Digest identifies a specific version of the image in the repository
                    specified by RepoURL. This is a more precise identifier than Tag.
                  type: string
                gitRepoURL:
                  description: |-
                    GitRepoURL specifies the URL of a Git repository that contains the source
                    code for the image repository referenced by the RepoURL field if Kargo was
                    able to infer it.
                  type: string
                repoURL:
                  description: RepoURL describes the repository in which the image
                    can be found.
                  type: string
                tag:
                  description: |-
                    Tag identifies a specific version of the image in the repository specified
                    by RepoURL.
                  type: string
              type: object
            type: array
          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
          origin:
            description: Origin describes a kind of Freight in terms of its origin.
            properties:
              kind:
                description: |-
                  Kind is the kind of resource from which Freight may have originated. At
                  present, this can only be "Warehouse".
                enum:
                - Warehouse
                type: string
              name:
                description: |-
                  Name is the name of the resource of the kind indicated by the Kind field
                  from which Freight may originated.
                type: string
            required:
            - kind
            - name
            type: object
          status:
            description: Status describes the current status of this Freight.
            properties:
              approvedFor:
                additionalProperties:
                  description: |-
                    ApprovedStage describes a Stage for which Freight has been (manually)
                    approved.
                  type: object
                description: |-
                  ApprovedFor describes the Stages for which this Freight has been approved
                  preemptively/manually by a user. This is useful for hotfixes, where one
                  might wish to promote a piece of Freight to a given Stage without
                  transiting the entire pipeline.
                type: object
              verifiedIn:
                additionalProperties:
                  description: VerifiedStage describes a Stage in which Freight has
                    been verified.
                  type: object
                description: |-
                  VerifiedIn describes the Stages in which this Freight has been verified
                  through promotion and subsequent health checks.
                type: object
            type: object
        required:
        - origin
        type: object
    served: true
    storage: true
    subresources:
      status: {}
