Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.65 KB

stack.md

File metadata and controls

49 lines (34 loc) · 1.65 KB

Stacks

A stack resource is the specification for a cloud native buildpacks stack used during build and in the resulting app image.

The stack will be referenced by a builder resource.

At this time only a Cluster scoped ClusterStack is available.

Corresponding kp cli command docs here.

Cluster Stack Configuration

apiVersion: kpack.io/v1alpha2
kind: ClusterStack
metadata:
  name: base
spec:
  id: "io.buildpacks.stacks.bionic"
  buildImage:
    image: "paketobuildpacks/build:base-cnb"
  runImage:
    image: "paketobuildpacks/run:base-cnb"
  • id: The 'id' of the stack
  • buildImage.image: The build image of stack.
  • runImage.image: The run image of stack.

Using a private registry

To use stack images from a private registry, you have to add a serviceAccountRef referencing a serviceaccount with the secrets needed to pull from this registry.

spec:
 serviceAccountRef:
    name: private
    namespace: private
  • serviceAccountRef: An object reference to a service account in any namespace. The object reference must contain name and namespace.

Updating a stack

The stack resource will not poll for updates. A CI/CD tool is needed to update the resource with new digests when new stack images are available.

Suggested stacks

The pack CLI command: pack stack suggest will display a list of recommended stacks that can be used. We recommend starting with the io.buildpacks.stacks.bionic base stack.