package warehouse import ociv1 "github.com/opencontainers/image-spec/specs-go/v1" // Warehouse OCI schema version. When the schema version is incremented, this // package version should be incremented, creating distinct Go packages for each // Warehouse schema version. // // Note that while pallet/ and cluster/ share this version today, they can be // versioned independently under the v1 Warehouse spec as necessary, so long as // the changes are still compatible with the Warehouse spec. const ( Schema1 = "v1" ) // Artifact (OCI Image Index / OCI Image) annotations. const ( // AnnotationSchemaVersion communicates to registry clients what version // of the Warehouse schema is used to define this artifact. // // This annotation MUST be present on all Warehouse artifacts. AnnotationSchemaVersion = "com.ncr.warehouse.schema.version" // AnnotationKind describes what kind of Warehouse artifact an OCI manifest // represents. // // This annotation MUST be added to all Warehouse artifacts. // Any values other than "pallet" are ignored by clients. AnnotationKind = "com.ncr.warehouse.kind" // AnnotationRefName contains the name of the target being referenced in a // v1.Descriptor. // // For example, external-secrets is the name of the pallet being referenced // in this descriptor, embedded in a v1.ImageIndex: // // "manifests": [ // { // "mediaType": "application/vnd.docker.distribution.manifest.v2+json", // "size": 1421, // "digest": "sha256:87545f3257ce454d1a39361fd82ae0e9e1058b4e838747ae47a4fb62ed083592", // "annotations": { // "com.ncr.pallet.cluster.providers": "gke", // "com.ncr.warehouse.ref.name": "external-secrets" // } // }, // ... // ] // // This annotation MUST be added to all v1.Descriptors in v1.ImageIndexes. AnnotationRefName = "com.ncr.warehouse.ref.name" // AnnotationName contains the globally unique Warehouse package name. AnnotationName = "com.ncr.warehouse.name" // AnnotationClusterProviders contains information about what cluster providers // this specific artifact supports. // // For Pallets, this annotation MUST be present and contain a comma separated // list of K8s providers, e.g., "gke,sds". AnnotationClusterProviders = "com.ncr.warehouse.cluster.providers" ) // Layer annotations used by Warehouse clients when processing OCI Artifacts. // // These annotations MUST be present on all Warehouse layers. const ( // AnnotationLayerType indicates what "kind" of contents are in an OCI Layer. // This is used to separate runtime manifests from infrastructure manifests // during packing and unpacking of Warehouse artifacts (e.g., Pallets). // // This annotation MUST be present on all valid Warehouse layers. AnnotationLayerType = "com.ncr.warehouse.layer.type" ) // Annotations for Pallet artifacts. // // These annotations MUST be present for all Pallet artifacts in addition to the // required Warehouse v1 annotations. const ( // AnnotationTeam contains the GitHub team name that is responsible // for the Pallet. This data could be used for labeling monitoring data // to identify billing costs incurred by teams, or reporting for manifest // linting errors and other actions that the package owner needs to take. AnnotationTeam = "com.ncr.warehouse.pallet.meta.team" // AnnotationRevision is an alias for the official OCI revision annotation: // https://github.com/opencontainers/image-spec/blob/main/annotations.md#annotations // // The source control revision that produced the artifact, e.g., a commit hash. AnnotationRevision = ociv1.AnnotationRevision // AnnotationSource is an alias for the official OCI source annotation: // https://github.com/opencontainers/image-spec/blob/main/annotations.md#annotations // // A fully qualified URL to the revision, e.g., `https://github.com/golang/go/tree/c81b6d8bf807eb5d01e72c02a3fd3d044d7b681a` AnnotationSource = ociv1.AnnotationSource // AnnotationVersion is an alias for the official OCI version annotation: // https://github.com/opencontainers/image-spec/blob/main/annotations.md#annotations // // It MUST be a valid SemVer string. AnnotationVersion = ociv1.AnnotationVersion // AnnotationCreated is an alias for the official OCI created annotation: // https://github.com/opencontainers/image-spec/blob/main/annotations.md#annotations // // A RFC3339-formatted date that the revision was authored, per the OCI spec. // // For example: // // `2022-04-29T22:40:28Z` AnnotationCreated = ociv1.AnnotationCreated // AnnotationVendor is an alias for the official OCI software vendor annotation. AnnotationVendor = ociv1.AnnotationVendor ) // Optional annotations for Pallet artifacts. const ( // AnnotationTitle is an alias for the official OCI title annotation. // https://github.com/opencontainers/image-spec/blob/main/annotations.md#annotations // // It should be generally be set to the same value as warehouse.AnnotationName, // but it able to be set independently to allow flexibility for interop with // future OCI ecosystem uses for the annotation. AnnotationTitle = ociv1.AnnotationTitle // AnnotationDescription is an alias for the official OCI description annotation: // https://github.com/opencontainers/image-spec/blob/main/annotations.md#annotations // // It should be a short description of the package. AnnotationDescription = ociv1.AnnotationDescription // AnnotationDocumentation is an alias for the official OCI documentation annotation: // https://github.com/opencontainers/image-spec/blob/main/annotations.md#annotations // // It should contain a link to the documentation for the package. AnnotationDocumentation = ociv1.AnnotationDocumentation // AnnotationRender determines whether or not environment variable // substitution will occur for a package. // // If not present, it is assumed to be true. To disable rendering, the // annotation must be present and contain the string "false". AnnotationRender = "com.ncr.warehouse.pallet.render" // AnnotationCapabilities contains information about which cluster // capabilities this specific Pallet integrates with. // // If the Pallet integrates with any capabilities, this value MUST be a comma // separated list of capabilities made available via capability provider packages. AnnotationCapabilities = "com.ncr.warehouse.pallet.capabilities" // AnnotationParameters contains the rendering parameters used. // The parameters of any dependencies are also included here. AnnotationParameters = "com.ncr.warehouse.pallet.parameters" ) // Pallet-specific OCI Layer annotations const ( // AnnotationLayerRuntimeCapability contains the name of the runtime capability // that is associated with a specific OCI Layer. // // Any non-default runtime layer MUST have this annotation. AnnotationLayerRuntimeCapability = "com.ncr.warehouse.pallet.layer.runtime.capability" )