Repository navigation
Conversation
johha
force-pushed
the
custom-stacks
branch
from
September 29, 2026 07:19
4559c0a to
e067283
Compare
johha
force-pushed
the
custom-stacks
branch
10 times, most recently
from
October 23, 2026 12:17
423f2ae to
15f6b1c
Compare
johha
marked this pull request as ready for review
October 28, 2026 14:57
Add custom container-image stacks for buildpack and CNB lifecycle apps behind the diego_custom_stacks feature flag. - Accept and validate docker:// stack image URIs without creating Stack records or persisting the deprecated stack_id field. - Use custom root filesystems for staging, runtime LRPs, and tasks, with lifecycle-bundle fallback for droplets whose original stack was removed. - Support custom buildpacks and stackless admin buildpacks, including buildpack auto-detection. - Store registry credentials encrypted, redact them from app events, reject credentials embedded in stack URIs, and pass only complete matching username/password pairs to Diego. - Reject unsupported token credentials for custom stack registries while retaining token support for CNB buildpack images. - Derive CF_STACK and CNB_STACK_ID from the final image repository component, excluding tags and digests. - Skip stack-record validation and buildpack-cache handling where they do not apply to remote custom stack images. - Document custom stack syntax, credentials, buildpack restrictions, stack identifiers, and image-layer disk quota behavior. - Add coverage for validation, lifecycle staging, desired LRPs, tasks, credentials, feature-flag enforcement, manifests, and event redaction. Co-authored-by: FloThinksPi <5863788+FloThinksPi@users.noreply.github.com>
Contributor
|
Tested on a bbl environment with a default CF deployment, works! But I also tested some error scenarios and found a few confusing error messages and a few minor issues:
Maybe better: "You must either specify a custom buildpack URL or your platform operator must provide an enabled buildpack not pinned to a stack."
Shouldn't the error say something like "404 not found"?
|
Member
Author
|
Thanks for the feedback @jochenehret . I addressed the points as follows:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
A short explanation of the proposed change:
Implements RFC-0046 behind the disabled-by-default
diego_custom_stacksfeature flag. Buildpack and CNB apps can use adocker://image URI as their stack without requiring aStackdatabase record.Custom stacks are used for staging, runtime LRPs, and tasks. They support custom buildpacks or admin buildpacks without a stack association. Registry credentials are stored encrypted and only complete username/password pairs are passed to Diego. Embedded credentials are rejected.
Public registry example:
The stack can also be provided directly to
cf push:Private registry example:
During staging, the final image repository component is exposed as
CF_STACKorCNB_STACK_ID. Custom stack image layers count toward the app instance disk quota.An explanation of the use cases your change solves
Operators can allow apps to use patched, specialized, or independently maintained root filesystems without registering platform stacks. This also supports private registries and apps that must continue using an image after its corresponding platform stack has been removed.
Manual test coverage
CF_STACKandCNB_STACK_IDderivation, a modified/etc/os-release, and the expected staging failure when image and buildpack ABIs were incompatible.I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests