Skip to content

Commit 5fe9b82

Browse files
authored
Update cflinuxfs from version 3 to version 4 with optional 5 (#1104)
## Proposed Changes * Update code and documentation `cflinuxfs3` references to `cflinuxfs4` and `cflinuxfs5`. KF now defaults to `cflinuxfs4` instead of `cflinuxfs3`. ## Release Notes ```release-note `Changed` default cflinuxfs version to 4 `Added` support of `cflinuxfs5` ``` ## Before updating The new stack is based on `Ubuntu 22.04` by default, or `Ubuntu 24.04` if you opt into `cflinuxfs5`, which is significantly newer than the current `Ubuntu 18.04`. Before updating, ensure your application does not depend on utilities or libraries that behave differently in newer Ubuntu versions. Newer stack means newer buildpacks platforms, kf now uses `CNB_PLATFORM_API=0.15` for all builds (unless running on legacy stack). You can override this behavior during push `kf push (...) -env CNB_PLATFORM_API=0.15`. Furthermore, newer stacks contain fewer pre-installed packages (for example, `python` is no longer included) and fewer default buildpacks (for example, `cflinuxfs5` does not contain the Go buildpack). Legacy stacks are still available but must be manually specified (via `kf push --stack cflinuxfs3 ...`); otherwise, `cflinuxfs4` is used by default. We recommend manually specifying the legacy stack, updating to the latest KF release, and testing the application build and runtime in a separate space. Once verified, migrate away from the legacy stacks entirely.
1 parent 9b6817b commit 5fe9b82

32 files changed

Lines changed: 273 additions & 132 deletions

File tree

cmd/generate-release/scripts/kfsystems-cr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ spec:
8888
# used for CF compatible builds. The value must be a valid JSON or YAML
8989
# string.
9090
#
91-
# Each entry in the list must be an object with `name` and `url` propreties
91+
# Each entry in the list must be an object with `name` and `url` properties
9292
# indicating the human readable name of the buildpack and the URL to
9393
# fetch it from at runtime. An additional `disabled` property can be used
9494
# to disable a single buildpack.
@@ -101,13 +101,13 @@ spec:
101101
# builds. The value must be a valid JSON or YAML string.
102102
#
103103
# Each entry in the list must be an object with `name` and `image`
104-
# propreties indicating the human readable name of the stack and the docker
104+
# properties indicating the human readable name of the stack and the docker
105105
# image that will be used by the apps/buildpacks that run on it.
106106
#
107107
# Use images tagged with SHAs to improve build caching.
108108
spaceStacksV2:
109-
- name: cflinuxfs3
110-
image: cloudfoundry/cflinuxfs3
109+
- name: cflinuxfs5
110+
image: cloudfoundry/cflinuxfs5
111111
112112
# spaceStacksV3 contains list of default stacks to be used for cloud native
113113
# buildpack builds. The value must be a valid JSON or YAML string.

config/config-defaults.yaml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ data:
9494
# used for CF compatible builds. The value must be a valid JSON or YAML
9595
# string.
9696
#
97-
# Each entry in the list must be an object with `name` and `url` propreties
97+
# Each entry in the list must be an object with `name` and `url` properties
9898
# indicating the human readable name of the buildpack and the URL to
9999
# fetch it from at runtime. An additional `disabled` property can be used
100100
# to disable a single buildpack.
@@ -107,13 +107,13 @@ data:
107107
# builds. The value must be a valid JSON or YAML string.
108108
#
109109
# Each entry in the list must be an object with `name` and `image`
110-
# propreties indicating the human readable name of the stack and the docker
110+
# properties indicating the human readable name of the stack and the docker
111111
# image that will be used by the apps/buildpacks that run on it.
112112
#
113113
# Use images tagged with SHAs to improve build caching.
114114
spaceStacksV2: |
115-
- name: cflinuxfs3
116-
image: cloudfoundry/cflinuxfs3
115+
- name: cflinuxfs5
116+
image: cloudfoundry/cflinuxfs5
117117
118118
# spaceStacksV3 contains list of default stacks to be used for cloud native
119119
# buildpack builds. The value must be a valid JSON or YAML string.
@@ -225,8 +225,12 @@ data:
225225
- name: nginx_buildpack
226226
url: https://github.com/cloudfoundry/nginx-buildpack
227227
spaceStacksV2: |
228-
- name: cflinuxfs3
229-
image: cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
228+
- name: cflinuxfs4
229+
image: cloudfoundry/cflinuxfs4
230+
- name: cflinuxfs5
231+
image: cloudfoundry/cflinuxfs5
232+
- name: cflinuxfs3
233+
image: cloudfoundry/cflinuxfs3
230234
spaceStacksV3: |
231235
- name: kf-v2-to-v3-shim
232236
description: A V3 stack that wraps the V2 buildpacks.
@@ -236,8 +240,16 @@ data:
236240
description: Google buildpacks (https://github.com/GoogleCloudPlatform/buildpacks)
237241
buildImage: gcr.io/buildpacks/builder:v1
238242
runImage: gcr.io/buildpacks/gcp/run:v1
243+
- name: org.cloudfoundry.stacks.cflinuxfs4
244+
description: A large Cloud Foundry stack based on Ubuntu 22.04 (Jammy Jellyfish)
245+
buildImage: paketobuildpacks/builder-jammy-full@sha256:25efe93f3afa866e058f1bf6f72b5734dbd270a4b60e344a0df2d613bc19074c
246+
runImage: paketobuildpacks/run-jammy-full@sha256:43f13c88b7ed100a34520e907fba396c2879605efd14012aa9a696caeff43f9d
247+
- name: org.cloudfoundry.stacks.cflinuxfs5
248+
description: A large Cloud Foundry stack based on Ubuntu 24.04 (Noble)
249+
buildImage: paketobuildpacks/ubuntu-noble-builder@sha256:fc86fdc15593f47178073b682c75c4991f27b4a2a62d78417fdf505307bb92ae
250+
runImage: paketobuildpacks/ubuntu-noble-run@sha256:013d949ebb61d4771a77f44511eb0de723d092ef4904a83ffa1fee0bdb703275
239251
- name: org.cloudfoundry.stacks.cflinuxfs3
240-
description: A large Cloud Foundry stack based on Ubuntu 18.04
252+
description: (Legacy) A large Cloud Foundry stack based on Ubuntu 18.04
241253
buildImage: cloudfoundry/cnb:cflinuxfs3@sha256:f96b6e3528185368dd6af1d9657527437cefdaa5fa135338462f68f9c9db3022
242254
runImage: cloudfoundry/run:full-cnb@sha256:dbe17be507b1cc6ffae1e9edf02806fe0e28ffbbb89a6c7ef41f37b69156c3c2
243255
spaceDefaultToV3Stack: "false"

docs/content/en/docs/v2.11/cli/generated/kf-push.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ description: "Create a new App or apply updates to an existing one."
1717
kf push myapp
1818
kf push myapp --buildpack my.special.buildpack # Discover via kf buildpacks
1919
kf push myapp --env FOO=bar --env BAZ=foo
20-
kf push myapp --stack cloudfoundry/cflinuxfs3 # Use a cflinuxfs3 runtime
20+
kf push myapp --stack cloudfoundry/cflinuxfs5 # Use a cflinuxfs5 runtime
2121
kf push myapp --health-check-http-endpoint /myhealthcheck # Specify a healthCheck for the app
2222
</pre>
2323

docs/content/en/docs/v2.11/developer/build-and-deploy/buildpacks-getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ kf push java-v2 --path target/helloworld-0.0.1-SNAPSHOT.jar
3131
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.
3232

3333
```sh
34-
kf push java-v3 --stack org.cloudfoundry.stacks.cflinuxfs3
34+
kf push java-v3 --stack org.cloudfoundry.stacks.cflinuxfs5
3535
```
3636

3737
## Python (v2) buildpack
@@ -85,7 +85,7 @@ kf push python --buildpack python\_buildpack
8585
Push the Python flask app using cloud native buildpacks.
8686
8787
```sh
88-
kf push pythonv3 --stack org.cloudfoundry.stacks.cflinuxfs3
88+
kf push pythonv3 --stack org.cloudfoundry.stacks.cflinuxfs5
8989
```
9090
9191
## Staticfile (v2) buildpack

docs/content/en/docs/v2.11/developer/build-and-deploy/v2-vs-v3-buildpacks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ The output shows both V2 and V3 Stacks:
8080
```
8181
Getting stacks in Space: myspace
8282
Version Name Build Image Run Image
83-
V2 cflinuxfs3 cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5 cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
83+
V2 cflinuxfs5 cloudfoundry/cflinuxfs5 cloudfoundry/cflinuxfs5
8484
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
8585
V3 google gcr.io/buildpacks/builder:v1 gcr.io/buildpacks/gcp/run:v1 Google buildpacks (https://github.com/GoogleCloudPlatform/buildpacks)
86-
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
86+
V3 org.cloudfoundry.stacks.cflinuxfs5 cloudfoundry/cflinuxfs5 A large Cloud Foundry stack based on Ubuntu 24.04
8787
```
8888

8989

docs/content/en/docs/v2.11/examples/spring-music/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Music](https://github.com/cloudfoundry-samples/spring-music) reference App using
3434
cd spring-music
3535
```
3636

37-
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.
37+
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.
3838
3939
```sh
4040
---

docs/content/en/docs/v2.11/migrating/builds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ Best practices for container runtimes differ from Cloud Foundry's application be
2323

2424
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.
2525

26-
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.
26+
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.
2727

2828
**Things to consider:**
2929

3030
* 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).
3131
* Teams should be able to patch and promote an image quickly up through environments as the preferred method of patching.
32-
* 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.
32+
* 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.
3333
* 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.
3434
* Operations teams should monitor deployed images for vulnerabilities.
3535

docs/content/en/docs/v2.11/operator/buildpacks/configure-stacks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
- name: ruby_buildpack
3939
url: https://github.com/cloudfoundry/ruby-buildpack
4040
spaceStacksV2:
41-
- name: cflinuxfs3
42-
image: cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
41+
- name: cflinuxfs5
42+
image: cloudfoundry/cflinuxfs5
4343
4444
```

docs/content/en/docs/v2.11/operator/security/compute-isolation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ To configure the `nodeSelector` on a stack:
7575
.....
7676
.....
7777
spaceStacksV2: |
78-
- name: cflinuxfs3
79-
image: cloudfoundry/cflinuxfs3
78+
- name: cflinuxfs5
79+
image: cloudfoundry/cflinuxfs5
8080
nodeSelector:
81-
OS_KERNEL: LINUX_4.4.1
81+
OS_KERNEL: LINUX_6.12.68
8282
.....
8383
.....
8484
```

operator/cmd/manager/kodata/kf/2.11/v2.11.5_kf.yaml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7750,7 +7750,7 @@ data:
77507750
# used for CF compatible builds. The value must be a valid JSON or YAML
77517751
# string.
77527752
#
7753-
# Each entry in the list must be an object with `name` and `url` propreties
7753+
# Each entry in the list must be an object with `name` and `url` properties
77547754
# indicating the human readable name of the buildpack and the URL to
77557755
# fetch it from at runtime. An additional `disabled` property can be used
77567756
# to disable a single buildpack.
@@ -7763,13 +7763,13 @@ data:
77637763
# builds. The value must be a valid JSON or YAML string.
77647764
#
77657765
# Each entry in the list must be an object with `name` and `image`
7766-
# propreties indicating the human readable name of the stack and the docker
7766+
# properties indicating the human readable name of the stack and the docker
77677767
# image that will be used by the apps/buildpacks that run on it.
77687768
#
77697769
# Use images tagged with SHAs to improve build caching.
77707770
spaceStacksV2: |
7771-
- name: cflinuxfs3
7772-
image: cloudfoundry/cflinuxfs3
7771+
- name: cflinuxfs5
7772+
image: cloudfoundry/cflinuxfs5
77737773

77747774
# spaceStacksV3 contains list of default stacks to be used for cloud native
77757775
# buildpack builds. The value must be a valid JSON or YAML string.
@@ -7849,8 +7849,12 @@ data:
78497849
- name: nginx_buildpack
78507850
url: https://github.com/cloudfoundry/nginx-buildpack
78517851
spaceStacksV2: |
7852-
- name: cflinuxfs3
7853-
image: cloudfoundry/cflinuxfs3@sha256:5219e9e30000e43e5da17906581127b38fa6417f297f522e332a801e737928f5
7852+
- name: cflinuxfs4
7853+
image: cloudfoundry/cflinuxfs4
7854+
- name: cflinuxfs5
7855+
image: cloudfoundry/cflinuxfs5
7856+
- name: cflinuxfs3
7857+
image: cloudfoundry/cflinuxfs3
78547858
spaceStacksV3: |
78557859
- name: kf-v2-to-v3-shim
78567860
description: A V3 stack that wraps the V2 buildpacks.
@@ -7860,8 +7864,16 @@ data:
78607864
description: Google buildpacks (https://github.com/GoogleCloudPlatform/buildpacks)
78617865
buildImage: gcr.io/buildpacks/builder:v1
78627866
runImage: gcr.io/buildpacks/gcp/run:v1
7867+
- name: org.cloudfoundry.stacks.cflinuxfs4
7868+
description: A large Cloud Foundry stack based on Ubuntu 22.04 (Jammy Jellyfish)
7869+
buildImage: paketobuildpacks/builder-jammy-full@sha256:25efe93f3afa866e058f1bf6f72b5734dbd270a4b60e344a0df2d613bc19074c
7870+
runImage: paketobuildpacks/run-jammy-full@sha256:43f13c88b7ed100a34520e907fba396c2879605efd14012aa9a696caeff43f9d
7871+
- name: org.cloudfoundry.stacks.cflinuxfs5
7872+
description: A large Cloud Foundry stack based on Ubuntu 24.04 (Noble)
7873+
buildImage: paketobuildpacks/ubuntu-noble-builder@sha256:fc86fdc15593f47178073b682c75c4991f27b4a2a62d78417fdf505307bb92ae
7874+
runImage: paketobuildpacks/ubuntu-noble-run@sha256:013d949ebb61d4771a77f44511eb0de723d092ef4904a83ffa1fee0bdb703275
78637875
- name: org.cloudfoundry.stacks.cflinuxfs3
7864-
description: A large Cloud Foundry stack based on Ubuntu 18.04
7876+
description: (Legacy) A large Cloud Foundry stack based on Ubuntu 18.04
78657877
buildImage: cloudfoundry/cnb:cflinuxfs3@sha256:f96b6e3528185368dd6af1d9657527437cefdaa5fa135338462f68f9c9db3022
78667878
runImage: cloudfoundry/run:full-cnb@sha256:dbe17be507b1cc6ffae1e9edf02806fe0e28ffbbb89a6c7ef41f37b69156c3c2
78677879
spaceDefaultToV3Stack: "false"

0 commit comments

Comments
 (0)