As a cf CLI user
I want to receive an error message when I select a stack other than io.buildpacks.stacks.bionic (or whatever the current supported stack is)
So that I understand that I cannot build images based on that stack (right now we silently ignore the requested stack)
Acceptance Criteria
GIVEN a korifi cluster
WHEN I run cf push -s no-such-stackTHEN I should see that the build fails with an error explaining that no stack with that name exists
WHEN I run cf push -s io.buildpacks.stacks.bionic or cf pushTHEN I should see that the build succeeds
AND that cf app <AppName> shows stack io.buildpacks.stacks.bionic
Dev Notes
This story spans korifi/api, korifi/controllers, and korifi/kpack-image-builder.
In korifi/api:
The API, payload and BuildRepository must respect the user-specified stack
When no stack is specified, the stack should be left blank on CFBuild
In korifi/controllers:
The BuildWorkload CRD now has a spec.stack field, which can be blank
The CFBuildReconciler sets BuildWorkload.spec.stack based on the value in CFBuild.spec.lifecycle.data.stack
In korifi/kpack-image-builder:
If the BuildWorkload.spec.stack doesn't match a supported stack (at the moment, only io.buildpacks.stacks.bionic is supported), then the Succeeded status condition becomes false with a message that explains that the requests stack doesn't exist.
When a stack is specified to cf push, the manifest will look like this:
Blockers/Dependencies
1054
Background
As a cf CLI user I want to receive an error message when I select a stack other than io.buildpacks.stacks.bionic (or whatever the current supported stack is) So that I understand that I cannot build images based on that stack (right now we silently ignore the requested stack)
Acceptance Criteria
GIVEN a korifi cluster WHEN I run
cf push -s no-such-stack
THEN I should see that the build fails with an error explaining that no stack with that name existsWHEN I run
cf push -s io.buildpacks.stacks.bionic
orcf push
THEN I should see that the build succeeds AND thatcf app <AppName>
shows stackio.buildpacks.stacks.bionic
Dev Notes
This story spans
korifi/api
,korifi/controllers
, andkorifi/kpack-image-builder
.In
korifi/api
:CFBuild
In
korifi/controllers
:BuildWorkload
CRD now has aspec.stack
field, which can be blankCFBuildReconciler
setsBuildWorkload.spec.stack
based on the value inCFBuild.spec.lifecycle.data.stack
In
korifi/kpack-image-builder
:BuildWorkload.spec.stack
doesn't match a supported stack (at the moment, onlyio.buildpacks.stacks.bionic
is supported), then theSucceeded
status condition becomes false with a message that explains that the requests stack doesn't exist.When a stack is specified to
cf push
, the manifest will look like this: