Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/generate-release/scripts/kfsystems-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ spec:
#
# Use images tagged with SHAs to improve build caching.
spaceStacksV2:
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3
- name: cflinuxfs5
image: cloudfoundry/cflinuxfs5
# spaceStacksV3 contains list of default stacks to be used for cloud native
# buildpack builds. The value must be a valid JSON or YAML string.
Expand Down
22 changes: 17 additions & 5 deletions config/config-defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ data:
#
# Use images tagged with SHAs to improve build caching.
spaceStacksV2: |
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3
- name: cflinuxfs5
image: cloudfoundry/cflinuxfs5

# spaceStacksV3 contains list of default stacks to be used for cloud native
# buildpack builds. The value must be a valid JSON or YAML string.
Expand Down Expand Up @@ -225,8 +225,12 @@ data:
- name: nginx_buildpack
url: https://github.com/cloudfoundry/nginx-buildpack
spaceStacksV2: |
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
- name: cflinuxfs4
image: cloudfoundry/cflinuxfs4@sha256:118249de04f4f7543bc8118a9943c86d1c30504e687f468c4342d22b1e3d713b
- name: cflinuxfs5
image: cloudfoundry/cflinuxfs5@sha256:206c68c5753abd24beb85565e9ed525d1f1be24bdab252193793b49b44d4b69e
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3
spaceStacksV3: |
- name: kf-v2-to-v3-shim
description: A V3 stack that wraps the V2 buildpacks.
Expand All @@ -236,8 +240,16 @@ data:
description: Google buildpacks (https://github.com/GoogleCloudPlatform/buildpacks)
buildImage: gcr.io/buildpacks/builder:v1
runImage: gcr.io/buildpacks/gcp/run:v1
- name: org.cloudfoundry.stacks.cflinuxfs4
description: A large Cloud Foundry stack based on Ubuntu 22.04 (Jammy Jellyfish)
buildImage: paketobuildpacks/builder-jammy-full@sha256:25efe93f3afa866e058f1bf6f72b5734dbd270a4b60e344a0df2d613bc19074c
runImage: paketobuildpacks/run-jammy-full@sha256:43f13c88b7ed100a34520e907fba396c2879605efd14012aa9a696caeff43f9d
- name: org.cloudfoundry.stacks.cflinuxfs5
description: A large Cloud Foundry stack based on Ubuntu 24.04 (Noble)
buildImage: paketobuildpacks/ubuntu-noble-builder@sha256:fc86fdc15593f47178073b682c75c4991f27b4a2a62d78417fdf505307bb92ae
runImage: paketobuildpacks/ubuntu-noble-run@sha256:013d949ebb61d4771a77f44511eb0de723d092ef4904a83ffa1fee0bdb703275
- name: org.cloudfoundry.stacks.cflinuxfs3
description: A large Cloud Foundry stack based on Ubuntu 18.04
description: (Legacy) A large Cloud Foundry stack based on Ubuntu 18.04
buildImage: cloudfoundry/cnb:cflinuxfs3@sha256:f96b6e3528185368dd6af1d9657527437cefdaa5fa135338462f68f9c9db3022
runImage: cloudfoundry/run:full-cnb@sha256:dbe17be507b1cc6ffae1e9edf02806fe0e28ffbbb89a6c7ef41f37b69156c3c2
spaceDefaultToV3Stack: "false"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/docs/v2.11/cli/generated/kf-push.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description: "Create a new App or apply updates to an existing one."
kf push myapp
kf push myapp --buildpack my.special.buildpack # Discover via kf buildpacks
kf push myapp --env FOO=bar --env BAZ=foo
kf push myapp --stack cloudfoundry/cflinuxfs3 # Use a cflinuxfs3 runtime
kf push myapp --stack cloudfoundry/cflinuxfs5 # Use a cflinuxfs5 runtime
kf push myapp --health-check-http-endpoint /myhealthcheck # Specify a healthCheck for the app
</pre>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ kf push java-v2 --path target/helloworld-0.0.1-SNAPSHOT.jar
Use [spring initializr](https://start.spring.io/) to create a Java 8 maven project with a spring web dependency and JAR packaging. Download it, extract it, and once extracted, push to Kf with the cloud native buildpack.

```sh
kf push java-v3 --stack org.cloudfoundry.stacks.cflinuxfs3
kf push java-v3 --stack org.cloudfoundry.stacks.cflinuxfs5
```

## Python (v2) buildpack
Expand Down Expand Up @@ -85,7 +85,7 @@ kf push python --buildpack python\_buildpack
Push the Python flask app using cloud native buildpacks.

```sh
kf push pythonv3 --stack org.cloudfoundry.stacks.cflinuxfs3
kf push pythonv3 --stack org.cloudfoundry.stacks.cflinuxfs5
```

## Staticfile (v2) buildpack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ The output shows both V2 and V3 Stacks:
```
Getting stacks in Space: myspace
Version Name Build Image Run Image
V2 cflinuxfs3 cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5 cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
V2 cflinuxfs5 cloudfoundry/cflinuxfs5@sha256:206c68c5753abd24beb85565e9ed525d1f1be24bdab252193793b49b44d4b69e cloudfoundry/cflinuxfs5@sha256:206c68c5753abd24beb85565e9ed525d1f1be24bdab252193793b49b44d4b69e
V3 kf-v2-to-v3-shim gcr.io/kf-releases/v2-to-v3:v2.7.0 gcr.io/buildpacks/gcp/run:v1 This is a stack added by the integration tests to assert that v2->v3 shim works
V3 google gcr.io/buildpacks/builder:v1 gcr.io/buildpacks/gcp/run:v1 Google buildpacks (https://github.com/GoogleCloudPlatform/buildpacks)
V3 org.cloudfoundry.stacks.cflinuxfs3 cloudfoundry/cnb:cflinuxfs3@sha256:f96b6e3528185368dd6af1d9657527437cefdaa5fa135338462f68f9c9db3022 cloudfoundry/run:full-cnb@sha256:dbe17be507b1cc6ffae1e9edf02806fe0e28ffbbb89a6c7ef41f37b69156c3c2 A large Cloud Foundry stack based on Ubuntu 18.04
V3 org.cloudfoundry.stacks.cflinuxfs5 cloudfoundry/cflinuxfs5@sha256:206c68c5753abd24beb85565e9ed525d1f1be24bdab252193793b49b44d4b69e A large Cloud Foundry stack based on Ubuntu 24.04
```


Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/docs/v2.11/examples/spring-music/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Music](https://github.com/cloudfoundry-samples/spring-music) reference App using
cd spring-music
```

1. Edit `manifest.yml`, and replace `path: build/libs/spring-music-1.0.jar` with `stack: org.cloudfoundry.stacks.cflinuxfs3`. This instructs Kf to build from source using [cloud native buildpacks](https://cloud.google.com/blog/products/containers-kubernetes/google-cloud-now-supports-buildpacks) so you don't have to compile locally.
1. Edit `manifest.yml`, and replace `path: build/libs/spring-music-1.0.jar` with `stack: org.cloudfoundry.stacks.cflinuxfs5`. This instructs Kf to build from source using [cloud native buildpacks](https://cloud.google.com/blog/products/containers-kubernetes/google-cloud-now-supports-buildpacks) so you don't have to compile locally.

```sh
---
Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/docs/v2.11/migrating/builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Best practices for container runtimes differ from Cloud Foundry's application be

In Cloud Foundry and Kf it's common to `push` in every environment which produces a separate build and image. This is a common source of errors if an application development team hasn't pinned the dependencies for their application correctly.

In Cloud Foundry and Kf this pushing provides an additional purpose, a platform operations team can change buildpacks or base images in an environment to patch applications on the fly. This has always been risky, but large base images like `cflinuxfs3`, come with many security vulnerabilities.
In Cloud Foundry and Kf this pushing provides an additional purpose, a platform operations team can change buildpacks or base images in an environment to patch applications on the fly. This has always been risky, but large base images like `cflinuxfs*`, come with many security vulnerabilities.

**Things to consider:**

* Applications should be built with the dependencies they need for all environments. They shouldn't depend on the environment like the [Spring Autoreconfiguration buildpack](https://github.com/cloudfoundry/java-buildpack-auto-reconfiguration).
* Teams should be able to patch and promote an image quickly up through environments as the preferred method of patching.
* Building on smaller base images than `cflinuxfs3` may leave teams without tools they expect to use when using `ssh` to debug containers or may expose hidden dependencies.
* Building on smaller base images than `cflinuxfs*` may leave teams without tools they expect to use when using `ssh` to debug containers or may expose hidden dependencies.
* Cloud Foundry and Kf add a [launcher process](https://github.com/cloudfoundry/buildpackapplifecycle/tree/main/launcher) responsible for reading Procfiles and certain environment variables. Applications will need to stop using these, or you should create a drop-in replacement launcher.
* Operations teams should monitor deployed images for vulnerabilities.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
- name: ruby_buildpack
url: https://github.com/cloudfoundry/ruby-buildpack
spaceStacksV2:
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
- name: cflinuxfs5
image: cloudfoundry/cflinuxfs5@sha256:206c68c5753abd24beb85565e9ed525d1f1be24bdab252193793b49b44d4b69e
```
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ To configure the `nodeSelector` on a stack:
.....
.....
spaceStacksV2: |
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3
- name: cflinuxfs5
image: cloudfoundry/cflinuxfs5
nodeSelector:
OS_KERNEL: LINUX_4.4.1
OS_KERNEL: LINUX_6.12.68
.....
.....
```
Expand Down
22 changes: 17 additions & 5 deletions operator/cmd/manager/kodata/kf/2.11/v2.11.5_kf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7768,8 +7768,8 @@ data:
#
# Use images tagged with SHAs to improve build caching.
spaceStacksV2: |
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3
- name: cflinuxfs5
image: cloudfoundry/cflinuxfs5

# spaceStacksV3 contains list of default stacks to be used for cloud native
# buildpack builds. The value must be a valid JSON or YAML string.
Expand Down Expand Up @@ -7849,8 +7849,12 @@ data:
- name: nginx_buildpack
url: https://github.com/cloudfoundry/nginx-buildpack
spaceStacksV2: |
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
- name: cflinuxfs4
image: cloudfoundry/cflinuxfs4@sha256:118249de04f4f7543bc8118a9943c86d1c30504e687f468c4342d22b1e3d713b
- name: cflinuxfs5
image: cloudfoundry/cflinuxfs5@sha256:206c68c5753abd24beb85565e9ed525d1f1be24bdab252193793b49b44d4b69e
- name: cflinuxfs3
image: cloudfoundry/cflinuxfs3
spaceStacksV3: |
- name: kf-v2-to-v3-shim
description: A V3 stack that wraps the V2 buildpacks.
Expand All @@ -7860,8 +7864,16 @@ data:
description: Google buildpacks (https://github.com/GoogleCloudPlatform/buildpacks)
buildImage: gcr.io/buildpacks/builder:v1
runImage: gcr.io/buildpacks/gcp/run:v1
- name: org.cloudfoundry.stacks.cflinuxfs4
description: A large Cloud Foundry stack based on Ubuntu 22.04 (Jammy Jellyfish)
buildImage: paketobuildpacks/builder-jammy-full@sha256:25efe93f3afa866e058f1bf6f72b5734dbd270a4b60e344a0df2d613bc19074c
runImage: paketobuildpacks/run-jammy-full@sha256:43f13c88b7ed100a34520e907fba396c2879605efd14012aa9a696caeff43f9d
- name: org.cloudfoundry.stacks.cflinuxfs5
description: A large Cloud Foundry stack based on Ubuntu 24.04 (Noble)
buildImage: paketobuildpacks/ubuntu-noble-builder@sha256:fc86fdc15593f47178073b682c75c4991f27b4a2a62d78417fdf505307bb92ae
runImage: paketobuildpacks/ubuntu-noble-run@sha256:013d949ebb61d4771a77f44511eb0de723d092ef4904a83ffa1fee0bdb703275
- name: org.cloudfoundry.stacks.cflinuxfs3
description: A large Cloud Foundry stack based on Ubuntu 18.04
description: (Legacy) A large Cloud Foundry stack based on Ubuntu 18.04
buildImage: cloudfoundry/cnb:cflinuxfs3@sha256:f96b6e3528185368dd6af1d9657527437cefdaa5fa135338462f68f9c9db3022
runImage: cloudfoundry/run:full-cnb@sha256:dbe17be507b1cc6ffae1e9edf02806fe0e28ffbbb89a6c7ef41f37b69156c3c2
spaceDefaultToV3Stack: "false"
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/kf/config/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ func TestStoreLoadWithContext(t *testing.T) {

testutil.AssertEqual(t, "SpaceStacksV2", StackV2List{
{
Name: "cflinuxfs3",
Image: "cloudfoundry/cflinuxfs3",
Name: "cflinuxfs5",
Image: "cloudfoundry/cflinuxfs5",
},
}, configDefaults.SpaceStacksV2)

Expand Down
32 changes: 16 additions & 16 deletions pkg/apis/kf/config/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ func TestStackV2List_Validate(t *testing.T) {
"happy path": {
Context: context.Background(),
Input: StackV2List{
{Name: "some-stack", Image: "cloudfoundry/cflinuxfs3"},
{Name: "some-stack", Image: "cloudfoundry/cflinuxfs5"},
},
Want: nil,
},
"duplicate name": {
Context: context.Background(),
Input: StackV2List{
{Name: "some-stack", Image: "cloudfoundry/cflinuxfs3"},
{Name: "some-stack", Image: "cloudfoundry/cflinuxfs3"},
{Name: "some-stack", Image: "cloudfoundry/cflinuxfs5"},
{Name: "some-stack", Image: "cloudfoundry/cflinuxfs5"},
},
Want: &apis.FieldError{
Message: "duplicate name",
Expand All @@ -124,7 +124,7 @@ func TestStackV2_Validate(t *testing.T) {
Context: context.Background(),
Input: &StackV2Definition{
Name: "some-stack",
Image: "cloudfoundry/cflinuxfs3",
Image: "cloudfoundry/cflinuxfs5",
},
Want: nil,
},
Expand All @@ -138,7 +138,7 @@ func TestStackV2_Validate(t *testing.T) {
"missing name": {
Context: context.Background(),
Input: &StackV2Definition{
Image: "cloudfoundry/cflinuxfs3",
Image: "cloudfoundry/cflinuxfs5",
},
Want: apis.ErrMissingField("name"),
},
Expand Down Expand Up @@ -171,7 +171,7 @@ func TestStackV3List_Validate(t *testing.T) {
"recurses to children": {
Context: context.Background(),
Input: StackV3List{
{Name: "some-stack", RunImage: "cloudfoundry/cflinuxfs3:run"},
{Name: "some-stack", RunImage: "cloudfoundry/cflinuxfs5:run"},
},
Want: apis.ErrMissingField("[0].buildImage"),
},
Expand All @@ -186,32 +186,32 @@ func TestStackV3_Validate(t *testing.T) {
Context: context.Background(),
Input: &StackV3Definition{
Name: "some-stack",
BuildImage: "cloudfoundry/cflinuxfs3:build",
RunImage: "cloudfoundry/cflinuxfs3:run",
BuildImage: "cloudfoundry/cflinuxfs5:build",
RunImage: "cloudfoundry/cflinuxfs5:run",
},
Want: nil,
},
"missing build image": {
Context: context.Background(),
Input: &StackV3Definition{
Name: "some-stack",
RunImage: "cloudfoundry/cflinuxfs3:run",
RunImage: "cloudfoundry/cflinuxfs5:run",
},
Want: apis.ErrMissingField("buildImage"),
},
"missing run image": {
Context: context.Background(),
Input: &StackV3Definition{
Name: "some-stack",
BuildImage: "cloudfoundry/cflinuxfs3:build",
BuildImage: "cloudfoundry/cflinuxfs5:build",
},
Want: apis.ErrMissingField("runImage"),
},
"missing name": {
Context: context.Background(),
Input: &StackV3Definition{
BuildImage: "cloudfoundry/cflinuxfs3:build",
RunImage: "cloudfoundry/cflinuxfs3:run",
BuildImage: "cloudfoundry/cflinuxfs5:build",
RunImage: "cloudfoundry/cflinuxfs5:run",
},
Want: apis.ErrMissingField("name"),
},
Expand All @@ -223,16 +223,16 @@ func TestStackV3_Validate(t *testing.T) {
func ExampleStackV2List_FindStackByName() {
list := StackV2List{
{
Name: "cflinuxfs3",
Image: "cloudfoundry/cflinuxfs3",
Name: "cflinuxfs5",
Image: "cloudfoundry/cflinuxfs5",
},
}

fmt.Println("doesn't exist:", list.FindStackByName("does-not-exist"))
fmt.Println("exists image:", list.FindStackByName("cflinuxfs3").Image)
fmt.Println("exists image:", list.FindStackByName("cflinuxfs5").Image)

// Output: doesn't exist: <nil>
// exists image: cloudfoundry/cflinuxfs3
// exists image: cloudfoundry/cflinuxfs5
}

func ExampleBuildpackV2List_WithoutDisabled() {
Expand Down
10 changes: 6 additions & 4 deletions pkg/kf/commands/apps/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ func setupSimpleChineseApp() acceptance.SourceCode {
}
}

func setupSpringMusic() acceptance.SourceCode {
func setupSpringMusic(cflinuxfsVersion string) acceptance.SourceCode {
return acceptance.SourceCode{
Name: "spring-music",
Name: "spring-music-" + cflinuxfsVersion,
Repo: "http://github.com/cloudfoundry-samples/spring-music",
Setup: func(t *testing.T) {
man, err := manifest.NewFromFile(context.Background(), "manifest.yml", nil)
Expand All @@ -80,7 +80,7 @@ func setupSpringMusic() acceptance.SourceCode {
man.Applications[0].Path = ""
delete(man.Applications[0].Env, "JBP_CONFIG_SPRING_AUTO_RECONFIGURATION")
man.Applications[0].Env["BP_AUTO_RECONFIGURATION_ENABLED"] = "false"
man.Applications[0].Stack = "org.cloudfoundry.stacks.cflinuxfs3"
man.Applications[0].Stack = "org.cloudfoundry.stacks." + cflinuxfsVersion

yamlData, err := yaml.Marshal(man)
testutil.AssertNil(t, "yaml.Marshal", err)
Expand All @@ -104,7 +104,9 @@ func TestAcceptance_Get200(t *testing.T) {
setupCfPhpInfo(),
setupDotnetCoreHelloWorld(),
setupSimpleChineseApp(),
setupSpringMusic(),
setupSpringMusic("cflinuxfs3"),
setupSpringMusic("cflinuxfs4"),
setupSpringMusic("cflinuxfs5"),
setupTestApp(),
},
func(ctx context.Context, t *testing.T, kf *integration.Kf, appPath string) {
Expand Down
Loading