{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Warehouse is a source of Freight.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "Spec describes sources of artifacts.",
      "properties": {
        "freightCreationPolicy": {
          "default": "Automatic",
          "description": "FreightCreationPolicy describes how Freight is created by this Warehouse.\nThis field is optional. When left unspecified, the field is implicitly\ntreated as if its value were \"Automatic\".\nAccepted values: Automatic, Manual",
          "enum": [
            "Automatic",
            "Manual"
          ],
          "type": "string"
        },
        "interval": {
          "default": "5m0s",
          "description": "Interval is the reconciliation interval for this Warehouse. On each\nreconciliation, the Warehouse will discover new artifacts and optionally\nproduce new Freight. This field is optional. When left unspecified, the\nfield is implicitly treated as if its value were \"5m0s\".",
          "pattern": "^([0-9]+(\\.[0-9]+)?(s|m|h))+$",
          "type": "string"
        },
        "shard": {
          "description": "Shard is the name of the shard that this Warehouse belongs to. This is an\noptional field. If not specified, the Warehouse will belong to the default\nshard. A defaulting webhook will sync this field with the value of the\nkargo.akuity.io/shard label. When the shard label is not present or differs\nfrom the value of this field, the defaulting webhook will set the label to\nthe value of this field. If the shard label is present and this field is\nempty, the defaulting webhook will set the value of this field to the value\nof the shard label.",
          "type": "string"
        },
        "subscriptions": {
          "description": "Subscriptions describes sources of artifacts to be included in Freight\nproduced by this Warehouse.",
          "items": {
            "description": "RepoSubscription describes a subscription to ONE OF a Git repository, a\ncontainer image repository, or a Helm chart repository.",
            "properties": {
              "chart": {
                "description": "Chart describes a subscription to a Helm chart repository.",
                "properties": {
                  "discoveryLimit": {
                    "default": 20,
                    "description": "DiscoveryLimit is an optional limit on the number of chart versions that\ncan be discovered for this subscription. The limit is applied after\nfiltering charts based on the SemverConstraint field.\nWhen left unspecified, the field is implicitly treated as if its value\nwere \"20\". The upper limit for this field is 100.",
                    "format": "int32",
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "name": {
                    "description": "Name specifies the name of a Helm chart to subscribe to within a classic\nchart repository specified by the RepoURL field. This field is required\nwhen the RepoURL field points to a classic chart repository and MUST\notherwise be empty.",
                    "type": "string"
                  },
                  "repoURL": {
                    "description": "RepoURL specifies the URL of a Helm chart repository. It may be a classic\nchart repository (using HTTP/S) OR a repository within an OCI registry.\nClassic chart repositories can contain differently named charts. When this\nfield points to such a repository, the Name field MUST also be used\nto specify the name of the desired chart within that repository. In the\ncase of a repository within an OCI registry, the URL implicitly points to\na specific chart and the Name field MUST NOT be used. The RepoURL field is\nrequired.",
                    "minLength": 1,
                    "pattern": "^(((https?)|(oci))://)([\\w\\d\\.\\-]+)(:[\\d]+)?(/.*)*$",
                    "type": "string"
                  },
                  "semverConstraint": {
                    "description": "SemverConstraint specifies constraints on what new chart versions are\npermissible. This field is optional. When left unspecified, there will be\nno constraints, which means the latest version of the chart will always be\nused. Care should be taken with leaving this field unspecified, as it can\nlead to the unanticipated rollout of breaking changes.\nMore info: https://github.com/masterminds/semver#checking-version-constraints",
                    "type": "string"
                  }
                },
                "required": [
                  "repoURL"
                ],
                "type": "object"
              },
              "git": {
                "description": "Git describes a subscriptions to a Git repository.",
                "properties": {
                  "allowTags": {
                    "description": "AllowTags is a regular expression that can optionally be used to limit the\ntags that are considered in determining the newest commit of interest. The\nvalue in this field only has any effect when the CommitSelectionStrategy is\nLexical, NewestTag, or SemVer. This field is optional.",
                    "type": "string"
                  },
                  "branch": {
                    "description": "Branch references a particular branch of the repository. The value in this\nfield only has any effect when the CommitSelectionStrategy is\nNewestFromBranch or left unspecified (which is implicitly the same as\nNewestFromBranch). This field is optional. When left unspecified, (and the\nCommitSelectionStrategy is NewestFromBranch or unspecified), the\nsubscription is implicitly to the repository's default branch.",
                    "minLength": 1,
                    "pattern": "^\\w+([-/]\\w+)*$",
                    "type": "string"
                  },
                  "commitSelectionStrategy": {
                    "default": "NewestFromBranch",
                    "description": "CommitSelectionStrategy specifies the rules for how to identify the newest\ncommit of interest in the repository specified by the RepoURL field. This\nfield is optional. When left unspecified, the field is implicitly treated\nas if its value were \"NewestFromBranch\".\nAccepted values: Lexical, NewestFromBranch, NewestTag, SemVer",
                    "enum": [
                      "Lexical",
                      "NewestFromBranch",
                      "NewestTag",
                      "SemVer"
                    ],
                    "type": "string"
                  },
                  "discoveryLimit": {
                    "default": 20,
                    "description": "DiscoveryLimit is an optional limit on the number of commits that can be\ndiscovered for this subscription. The limit is applied after filtering\ncommits based on the AllowTags and IgnoreTags fields.\nWhen left unspecified, the field is implicitly treated as if its value\nwere \"20\". The upper limit for this field is 100.",
                    "format": "int32",
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "excludePaths": {
                    "description": "ExcludePaths is a list of selectors that designate paths in the repository\nthat should NOT trigger the production of new Freight when changes are\ndetected therein. When specified, changes in the identified paths will not\ntrigger Freight production. When not specified, paths that should trigger\nFreight production will be defined solely by IncludePaths. Selectors may be\ndefined using:\n  1. Exact paths to files or directories (ex. \"charts/foo\")\n  2. Glob patterns (prefix the pattern with \"glob:\"; ex. \"glob:*.yaml\")\n  3. Regular expressions (prefix the pattern with \"regex:\" or \"regexp:\";\n     ex. \"regexp:^.*\\.yaml$\")\nPaths selected by IncludePaths may be unselected by ExcludePaths. This\nis a useful method for including a broad set of paths and then excluding a\nsubset of them.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "ignoreTags": {
                    "description": "IgnoreTags is a list of tags that must be ignored when determining the\nnewest commit of interest. No regular expressions or glob patterns are\nsupported yet. The value in this field only has any effect when the\nCommitSelectionStrategy is Lexical, NewestTag, or SemVer. This field is\noptional.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "includePaths": {
                    "description": "IncludePaths is a list of selectors that designate paths in the repository\nthat should trigger the production of new Freight when changes are detected\ntherein. When specified, only changes in the identified paths will trigger\nFreight production. When not specified, changes in any path will trigger\nFreight production. Selectors may be defined using:\n  1. Exact paths to files or directories (ex. \"charts/foo\")\n  2. Glob patterns (prefix the pattern with \"glob:\"; ex. \"glob:*.yaml\")\n  3. Regular expressions (prefix the pattern with \"regex:\" or \"regexp:\";\n     ex. \"regexp:^.*\\.yaml$\")\nPaths selected by IncludePaths may be unselected by ExcludePaths. This\nis a useful method for including a broad set of paths and then excluding a\nsubset of them.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "insecureSkipTLSVerify": {
                    "description": "InsecureSkipTLSVerify specifies whether certificate verification errors\nshould be ignored when connecting to the repository. This should be enabled\nonly with great caution.",
                    "type": "boolean"
                  },
                  "repoURL": {
                    "description": "URL is the repository's URL. This is a required field.",
                    "minLength": 1,
                    "pattern": "(?:^(https?)://(?:([\\w-]+):(.+)@)?([\\w-]+(?:\\.[\\w-]+)*)(?::(\\d{1,5}))?(/.*)$)|(?:^([\\w-]+)@([\\w+]+(?:\\.[\\w-]+)*):(/?.*))",
                    "type": "string"
                  },
                  "semverConstraint": {
                    "description": "SemverConstraint specifies constraints on what new tagged commits are\nconsidered in determining the newest commit of interest. The value in this\nfield only has any effect when the CommitSelectionStrategy is SemVer. This\nfield is optional. When left unspecified, there will be no constraints,\nwhich means the latest semantically tagged commit will always be used. Care\nshould be taken with leaving this field unspecified, as it can lead to the\nunanticipated rollout of breaking changes.",
                    "type": "string"
                  },
                  "strictSemvers": {
                    "default": true,
                    "description": "StrictSemvers specifies whether only \"strict\" semver tags should be\nconsidered. A \"strict\" semver tag is one containing ALL of major, minor,\nand patch version components. This is enabled by default, but only has any\neffect when the CommitSelectionStrategy is SemVer. This should be disabled\ncautiously, as it creates the potential for any tag containing numeric\ncharacters only to be mistaken for a semver string containing the major\nversion number only.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "repoURL",
                  "strictSemvers"
                ],
                "type": "object"
              },
              "image": {
                "description": "Image describes a subscription to container image repository.",
                "properties": {
                  "allowTags": {
                    "description": "AllowTags is a regular expression that can optionally be used to limit the\nimage tags that are considered in determining the newest version of an\nimage. This field is optional.",
                    "type": "string"
                  },
                  "discoveryLimit": {
                    "default": 20,
                    "description": "DiscoveryLimit is an optional limit on the number of image references\nthat can be discovered for this subscription. The limit is applied after\nfiltering images based on the AllowTags and IgnoreTags fields.\nWhen left unspecified, the field is implicitly treated as if its value\nwere \"20\". The upper limit for this field is 100.",
                    "format": "int32",
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "gitRepoURL": {
                    "description": "GitRepoURL optionally specifies the URL of a Git repository that contains\nthe source code for the image repository referenced by the RepoURL field.\nWhen this is specified, Kargo MAY be able to infer and link to the exact\nrevision of that source code that was used to build the image.",
                    "pattern": "^https?://(\\w+([\\.-]\\w+)*@)?\\w+([\\.-]\\w+)*(:[\\d]+)?(/.*)?$",
                    "type": "string"
                  },
                  "ignoreTags": {
                    "description": "IgnoreTags is a list of tags that must be ignored when determining the\nnewest version of an image. No regular expressions or glob patterns are\nsupported yet. This field is optional.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "imageSelectionStrategy": {
                    "default": "SemVer",
                    "description": "ImageSelectionStrategy specifies the rules for how to identify the newest version\nof the image specified by the RepoURL field. This field is optional. When\nleft unspecified, the field is implicitly treated as if its value were\n\"SemVer\".\nAccepted values: Digest, Lexical, NewestBuild, SemVer",
                    "enum": [
                      "Digest",
                      "Lexical",
                      "NewestBuild",
                      "SemVer"
                    ],
                    "type": "string"
                  },
                  "insecureSkipTLSVerify": {
                    "description": "InsecureSkipTLSVerify specifies whether certificate verification errors\nshould be ignored when connecting to the repository. This should be enabled\nonly with great caution.",
                    "type": "boolean"
                  },
                  "platform": {
                    "description": "Platform is a string of the form <os>/<arch> that limits the tags that can\nbe considered when searching for new versions of an image. This field is\noptional. When left unspecified, it is implicitly equivalent to the\nOS/architecture of the Kargo controller. Care should be taken to set this\nvalue correctly in cases where the image referenced by this\nImageRepositorySubscription will run on a Kubernetes node with a different\nOS/architecture than the Kargo controller. At present this is uncommon, but\nnot unheard of.",
                    "type": "string"
                  },
                  "repoURL": {
                    "description": "RepoURL specifies the URL of the image repository to subscribe to. The\nvalue in this field MUST NOT include an image tag. This field is required.",
                    "minLength": 1,
                    "pattern": "^(\\w+([\\.-]\\w+)*(:[\\d]+)?/)?(\\w+([\\.-]\\w+)*)(/\\w+([\\.-]\\w+)*)*$",
                    "type": "string"
                  },
                  "semverConstraint": {
                    "description": "SemverConstraint specifies constraints on what new image versions are\npermissible. The value in this field only has any effect when the\nImageSelectionStrategy is SemVer or left unspecified (which is implicitly\nthe same as SemVer). This field is also optional. When left unspecified,\n(and the ImageSelectionStrategy is SemVer or unspecified), there will be no\nconstraints, which means the latest semantically tagged version of an image\nwill always be used. Care should be taken with leaving this field\nunspecified, as it can lead to the unanticipated rollout of breaking\nchanges. Refer to Image Updater documentation for more details.\nMore info: https://github.com/masterminds/semver#checking-version-constraints",
                    "type": "string"
                  },
                  "strictSemvers": {
                    "default": true,
                    "description": "StrictSemvers specifies whether only \"strict\" semver tags should be\nconsidered. A \"strict\" semver tag is one containing ALL of major, minor,\nand patch version components. This is enabled by default, but only has any\neffect when the ImageSelectionStrategy is SemVer. This should be disabled\ncautiously, as it is not uncommon to tag container images with short Git\ncommit hashes, which have the potential to contain numeric characters only\nand could be mistaken for a semver string containing the major version\nnumber only.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "repoURL",
                  "strictSemvers"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "interval",
        "subscriptions"
      ],
      "type": "object"
    },
    "status": {
      "description": "Status describes the Warehouse's most recently observed state.",
      "properties": {
        "conditions": {
          "description": "Conditions contains the last observations of the Warehouse's current\nstate.",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "maximum": 9223372036854776000,
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "discoveredArtifacts": {
          "description": "DiscoveredArtifacts holds the artifacts discovered by the Warehouse.",
          "properties": {
            "charts": {
              "description": "Charts holds the charts discovered by the Warehouse for the chart\nsubscriptions.",
              "items": {
                "description": "ChartDiscoveryResult represents the result of a chart discovery operation for\na ChartSubscription.",
                "properties": {
                  "name": {
                    "description": "Name is the name of the Helm chart, as specified in the ChartSubscription.",
                    "type": "string"
                  },
                  "repoURL": {
                    "description": "RepoURL is the repository URL of the Helm chart, as specified in the\nChartSubscription.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "semverConstraint": {
                    "description": "SemverConstraint is the constraint for which versions were discovered.\nThis field is optional, and only populated if the ChartSubscription\nspecifies a SemverConstraint.",
                    "type": "string"
                  },
                  "versions": {
                    "description": "Versions is a list of versions discovered by the Warehouse for the\nChartSubscription. An empty list indicates that the discovery operation was\nsuccessful, but no versions matching the ChartSubscription criteria were\nfound.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "repoURL"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "discoveredAt": {
              "description": "DiscoveredAt is the time at which the Warehouse discovered the artifacts.",
              "format": "date-time",
              "type": "string"
            },
            "git": {
              "description": "Git holds the commits discovered by the Warehouse for the Git\nsubscriptions.",
              "items": {
                "description": "GitDiscoveryResult represents the result of a Git discovery operation for a\nGitSubscription.",
                "properties": {
                  "commits": {
                    "description": "Commits is a list of commits discovered by the Warehouse for the\nGitSubscription. An empty list indicates that the discovery operation was\nsuccessful, but no commits matching the GitSubscription criteria were found.",
                    "items": {
                      "description": "DiscoveredCommit represents a commit discovered by a Warehouse for a\nGitSubscription.",
                      "properties": {
                        "author": {
                          "description": "Author is the author of the commit.",
                          "type": "string"
                        },
                        "branch": {
                          "description": "Branch is the branch in which the commit was found. This field is\noptional, and populated based on the CommitSelectionStrategy of the\nGitSubscription.",
                          "type": "string"
                        },
                        "committer": {
                          "description": "Committer is the person who committed the commit.",
                          "type": "string"
                        },
                        "creatorDate": {
                          "description": "CreatorDate is the commit creation date as specified by the commit, or\nthe tagger date if the commit belongs to an annotated tag.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "id": {
                          "description": "ID is the identifier of the commit. This typically is a SHA-1 hash.",
                          "minLength": 1,
                          "type": "string"
                        },
                        "subject": {
                          "description": "Subject is the subject of the commit (i.e. the first line of the commit\nmessage).",
                          "type": "string"
                        },
                        "tag": {
                          "description": "Tag is the tag that resolved to this commit. This field is optional, and\npopulated based on the CommitSelectionStrategy of the GitSubscription.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "repoURL": {
                    "description": "RepoURL is the repository URL of the GitSubscription.",
                    "minLength": 1,
                    "pattern": "(?:^(https?)://(?:([\\w-]+):(.+)@)?([\\w-]+(?:\\.[\\w-]+)*)(?::(\\d{1,5}))?(/.*)$)|(?:^([\\w-]+)@([\\w+]+(?:\\.[\\w-]+)*):(/?.*))",
                    "type": "string"
                  }
                },
                "required": [
                  "repoURL"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "images": {
              "description": "Images holds the image references discovered by the Warehouse for the\nimage subscriptions.",
              "items": {
                "description": "ImageDiscoveryResult represents the result of an image discovery operation\nfor an ImageSubscription.",
                "properties": {
                  "platform": {
                    "description": "Platform is the target platform constraint of the ImageSubscription\nfor which references were discovered. This field is optional, and\nonly populated if the ImageSubscription specifies a Platform.",
                    "type": "string"
                  },
                  "references": {
                    "description": "References is a list of image references discovered by the Warehouse for\nthe ImageSubscription. An empty list indicates that the discovery\noperation was successful, but no images matching the ImageSubscription\ncriteria were found.",
                    "items": {
                      "description": "DiscoveredImageReference represents an image reference discovered by a\nWarehouse for an ImageSubscription.",
                      "properties": {
                        "createdAt": {
                          "description": "CreatedAt is the time the image was created. This field is optional, and\nnot populated for every ImageSelectionStrategy.",
                          "format": "date-time",
                          "type": "string"
                        },
                        "digest": {
                          "description": "Digest is the digest of the image.",
                          "minLength": 1,
                          "pattern": "^[a-z0-9]+:[a-f0-9]+$",
                          "type": "string"
                        },
                        "gitRepoURL": {
                          "description": "GitRepoURL is the URL of the Git repository that contains the source\ncode for this image. This field is optional, and only populated if the\nImageSubscription specifies a GitRepoURL.",
                          "type": "string"
                        },
                        "tag": {
                          "description": "Tag is the tag of the image.",
                          "maxLength": 128,
                          "minLength": 1,
                          "pattern": "^[\\w.\\-\\_]+$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "digest",
                        "tag"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "repoURL": {
                    "description": "RepoURL is the repository URL of the image, as specified in the\nImageSubscription.",
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "repoURL"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "lastFreightID": {
          "description": "LastFreightID is a reference to the system-assigned identifier (name) of\nthe most recent Freight produced by the Warehouse.",
          "type": "string"
        },
        "lastHandledRefresh": {
          "description": "LastHandledRefresh holds the value of the most recent AnnotationKeyRefresh\nannotation that was handled by the controller. This field can be used to\ndetermine whether the request to refresh the resource has been handled.",
          "type": "string"
        },
        "observedGeneration": {
          "description": "ObservedGeneration represents the .metadata.generation that this Warehouse\nwas reconciled against.",
          "format": "int64",
          "maximum": 9223372036854776000,
          "minimum": -9223372036854776000,
          "type": "integer"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}