You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RFC0046] Provide optional Custom Stacks Functionality in Cloud Foundry #1336
Status: feature-complete per RFC, with a few deliberate refinements. Marked experimental; subject to change in the API docs.
Matches the RFC
New diego_custom_stacks feature flag (disabled by default) gates docker:// stacks for the buildpack and CNB lifecycles.
Apps, manifests, and cf push accept a container-image reference in stack / lifecycle.data.stack.
lifecycle.data.credentials (host-keyed username/password) is passed through to Diego BBS as ImageUsername / ImagePassword on LRPs and tasks.
token-only credentials are ignored for stack pulls (CNB buildpack-only), per the RFC’s BBS constraint.
Custom stacks require a stackless admin buildpack or a user-supplied buildpack; otherwise the request is rejected with a clear error.
No Diego BBS changes required: rootfs + existing staging actions are reused.
Refinements beyond the RFC
Credential routing by workload lifecycle: app lifecycle for LRPs, droplet lifecycle for tasks, requested lifecycle for staging — so build-only credentials authenticate that build’s staging while runtime/tasks require app-level credentials.
Hardened validation: reject URIs with embedded userinfo, empty path segments, and non-string username/password values.
Staging asset-cache keys use the resolved platform stack to match runtime/task builders.
Disk accounting: custom-stack image layers count toward the app/task disk quota (documented).
No Stack DB row is created for custom stacks; they live only on the lifecycle data.
CF_STACK / CNB_STACK_ID are derived from the final image repository component during staging only; runtime behavior is unchanged.
Activity
johha commentedon Nov 4, 2026
PRs for custom stack implementation in Cloud Controller
johha commentedon Nov 4, 2026
RFC-0046 vs. current implementation
Status: feature-complete per RFC, with a few deliberate refinements. Marked experimental; subject to change in the API docs.
Matches the RFC
diego_custom_stacksfeature flag (disabled by default) gatesdocker://stacks for the buildpack and CNB lifecycles.cf pushaccept a container-image reference instack/lifecycle.data.stack.lifecycle.data.credentials(host-keyedusername/password) is passed through to Diego BBS asImageUsername/ImagePasswordon LRPs and tasks.token-only credentials are ignored for stack pulls (CNB buildpack-only), per the RFC’s BBS constraint.rootfs+ existing staging actions are reused.Refinements beyond the RFC
StackDB row is created for custom stacks; they live only on the lifecycle data.CF_STACK/CNB_STACK_IDare derived from the final image repository component during staging only; runtime behavior is unchanged.CustomStackCredentialResolverisolates registry credential lookup and returns{ image_username:, image_password: }.Open