From 6416f50e4d00507bdb37e6852e63f7889abafc68 Mon Sep 17 00:00:00 2001 From: Kashyap Vedurmudi Date: Thu, 18 Jun 2020 16:54:09 -0500 Subject: [PATCH] Updates RFC to add examples --- text/0000-stack-metadata.md | 45 +++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/text/0000-stack-metadata.md b/text/0000-stack-metadata.md index c81d79ba3..8cbc9f915 100644 --- a/text/0000-stack-metadata.md +++ b/text/0000-stack-metadata.md @@ -21,6 +21,44 @@ Exposing additional metadata in stack images will make it easier for end users t - What is the expected outcome? We converge on metadata we want to expose in stack images via labels, and all stack authors eventually support these. +Here's the current output of the `pack inspect-image` command on a sample app: +``` +Inspecting image: go-mod-simple-app +................... +LOCAL: + +Stack: io.buildpacks.stacks.bionic + +Base Image: + Reference: 610caf01e85e5da52c6a99b42fed80858c153de6d25b120940266846bec0872a + Top Layer: sha256:b6aadae5b30af0345f0ab82add7ed5b951d78230e86693c08f5c1ae8470a0ffb + +Run Images: + gcr.io/paketo-buildpacks/run:base-cnb +................... +``` + +By adding the proposed metadata, `pack inspect-image` output of this app could eventually look like: +``` +Inspecting image: go-mod-simple-app +................... +LOCAL: + +Stack: io.buildpacks.stacks.bionic +Stack Metadata: + Maintainer: "Paketo Buildpacks" + Homepage: "https://github.com/paketo-buildpacks/stacks" + OS Distro: "unbuntu 18.04" + +Base Image: + Reference: 610caf01e85e5da52c6a99b42fed80858c153de6d25b120940266846bec0872a + Top Layer: sha256:b6aadae5b30af0345f0ab82add7ed5b951d78230e86693c08f5c1ae8470a0ffb + +Run Images: + gcr.io/paketo-buildpacks/run:base-cnb +................... +``` + # What it is [what-it-is]: #what-it-is @@ -28,7 +66,7 @@ This provides a high level overview of the feature. - Define the target persona: stack author - Explaining the feature largely in terms of examples. -The following labels will be added to stack images: +The following labels can **optionally** be added by stack maintainers to stack images: `io.buildpacks.stack.maintainer`: Name of Stack Maintainer `io.buildpacks.stack.homepage`: URL for the stack (i.e repo link) `io.buildpacks.stack.distro.name`: Name of OS Distribution @@ -92,4 +130,7 @@ Stack authors will define their own custom labels to surface the metadata above. # Spec. Changes (OPTIONAL) [spec-changes]: #spec-changes -None. + +The platform spec should be updated to indicate that these keys can **optionally** be added on the build/run stack image. + +PR - https://github.com/buildpacks/spec/pull/89