{"id":20263618,"url":"https://github.com/springerpe/kubefoundry","last_synced_at":"2026-05-16T18:01:59.352Z","repository":{"id":80987301,"uuid":"390987018","full_name":"SpringerPE/KubeFoundry","owner":"SpringerPE","description":"PoC. Deploy Cloudfoudry Apps to Kubevela (and kubernetes) by running local staging process in Docker with standard buildpacks!","archived":false,"fork":false,"pushed_at":"2021-09-09T13:15:30.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T00:42:33.311Z","etag":null,"topics":["buildpacks","cf","cloudfoundry","go","golang","k8s","kubernetes","kubevela"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpringerPE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-30T08:18:15.000Z","updated_at":"2022-05-14T16:09:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5dc5eee-7a90-4e18-a535-7ebc4cd7b0a6","html_url":"https://github.com/SpringerPE/KubeFoundry","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SpringerPE/KubeFoundry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2FKubeFoundry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2FKubeFoundry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2FKubeFoundry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2FKubeFoundry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpringerPE","download_url":"https://codeload.github.com/SpringerPE/KubeFoundry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpringerPE%2FKubeFoundry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33113509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buildpacks","cf","cloudfoundry","go","golang","k8s","kubernetes","kubevela"],"created_at":"2024-11-14T11:35:43.824Z","updated_at":"2026-05-16T18:01:59.308Z","avatar_url":"https://github.com/SpringerPE.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"KubeFoundry\n===========\n\nKubernetes/KubeVela + CloudFoundry staging. It stages applications in the same way as CloudFoundry (traditional buildpacks, non Cloud Native) generating a runable Docker Image (also pushing it to the remote registry)\nIt also generates manifests for Kubevela and Kubernetes (StatefulSet) and it pushes those definitions to the PaaS. \n\nUsage\n=====\n\n```\nDeploy CloudFoundry applications to Kubevela with style\n\nUsage:\n   [command]\n\nAvailable Commands:\n  build       Build Kubevela application container image\n  config      Shows digested configuration\n  help        Help about any command\n  manifest    Generate Kubevela manifest(s)\n  push        Push application to the PaaS\n  run         Run application locally using docker\n  stage       Build and Push Kubevela application container image\n  version     Show build and version\n\nFlags:\n      --cf.api string                          cf api\n      --cf.manifest string                     cf manifest\n      --cf.org string                          cf org\n      --cf.readmanifest string                 cf read manifest\n      --cf.space string                        cf space\n      --config string                          yaml config file (default /home/jriguera/.kubefoundry/config.yml)\n      --deployment.appname string              app\n      --deployment.apppath string              app path\n      --deployment.approutes string            routes\n      --deployment.appversion string           version\n      --deployment.args string                 args\n      --deployment.defaults.cpu string         default cpu\n      --deployment.defaults.disk string        default disk\n      --deployment.defaults.domain string      default domain\n      --deployment.defaults.mem string         default mem\n      --deployment.defaults.port string        default port\n      --deployment.manifest.appfile string     kubevela appfile\n      --deployment.manifest.generate string    manifest generate\n      --deployment.manifest.overwrite string   manifest overwrite\n      --deployment.path string                 path\n      --deployment.registry string             registry prefix\n      --deployment.stagingdriver string        staging\n      --docker.api string                      docker api\n  -h, --help                                   help for this command\n      --log.level string                       program log level\n      --team string                            team\n\nUse \" [command] --help\" for more information about a command.\n```\n\n\nConfiguration\n-------------\n\nSee example `config.yml`  and for all options `internal/config/config.go`\nYou can put the file `config.yml` in the same folder where the binary is executed or place it in `~/.kubefoundry/config.yml`. You may need to provide the Docker Registry settings in order to be able to push the images to it. Also, you may\nneed to update the `Deployment` settings: `Registry` and `Domain`.\n\nFor now, the only staging implementation is `DockerStaging`.\n\nYou can check the configuration by running `kubefoundry config`\n\n\nUsage\n-----\n\nOnce you have the correct configuration file. Go to the repository where you execute `cf push` and run:\n\n1. Run `kubefoundry build`  to generate the Docker image with the application ready to run. If the process is successful you should see the image with `docker images`.\n2. Run `kubefoundry run` to get the application running with the same memory settings as in the manifest (and 1 cpu per 1G).\nYou can also run the image with `docker run -ti --rm -p 8080:8080 \u003capp-name\u003e`.\n3. Run `kubefoundry manifest` to generate Kubevela and K8S manifests to pass to `vela` (`vela up`) or `kubectl` (`kubectl apply -f deploy.yml`).\n\nYou can also use `kubefoundry stage` to build and push the image to the remote registry.\n\nThe push functionality is not ready yet.\n\nExample:\n```\n$ kubefoundry --cf.manifest manifest-test.yml  --deployment.apppath searchdirect-ci.zip stage\n9098-09-09/13:19:27 Configuration loaded from file: /home/jriguera/.kubefoundry/config.yml\n9098-09-09/13:19:27 Pulling Docker image 'cloudfoundry/cflinuxfs3:latest' ...\n9098-09-09/13:19:29 Packaging application context file 'searchdirect-ci.zip' ...\n9098-09-09/13:19:29 Building Docker container image 'searchdirect-qa' (searchdirect-qa:82214d95e072) ...\n9098-09-09/13:19:39 Staging application in Docker container ...                                                                                                                                                                               \n9098-09-09/13:19:39 Application 'searchdirect-qa' buildpacks: ['https://github.com/cloudfoundry/java-buildpack.git#v4.41']\n9098-09-09/13:19:39 Downloading buildpack 'https://github.com/cloudfoundry/java-buildpack.git#v4.41' (https://github.com/cloudfoundry/java-buildpack.git) ...\n9098-09-09/13:19:41 Running staging process with buildpack #0: https://github.com/cloudfoundry/java-buildpack.git#v4.41\n9098-09-09/13:19:42 [STG.fin]  -----\u003e Java Buildpack v4.41\n9098-09-09/13:19:43 [STG.fin]  -----\u003e Downloading Jvmkill Agent 1.16.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/bionic/x86_64/jvmkill-1.16.0-RELEASE.so (0.3s)\n9098-09-09/13:19:46 [STG.fin]  -----\u003e Downloading Open Jdk JRE 16.0.2_7 from https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/bellsoft-jre16.0.2%2B7-linux-amd64.tar.gz (3.2s)\n9098-09-09/13:19:47 [STG.fin]         Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.1s)\n9098-09-09/13:19:47 [STG.fin]  -----\u003e Downloading Open JDK Like Memory Calculator 3.13.0_RELEASE from https://java-buildpack.cloudfoundry.org/memory-calculator/bionic/x86_64/memory-calculator-3.13.0-RELEASE.tar.gz (0.1s)\n9098-09-09/13:19:48 [STG.fin]         Loaded Classes: 21102, Threads: 250\n9098-09-09/13:19:48 [STG.fin]  -----\u003e Downloading Client Certificate Mapper 1.11.0_RELEASE from https://java-buildpack.cloudfoundry.org/client-certificate-mapper/client-certificate-mapper-1.11.0-RELEASE.jar (0.0s)\n9098-09-09/13:19:48 [STG.fin]  -----\u003e Downloading Container Security Provider 1.18.0_RELEASE from https://java-buildpack.cloudfoundry.org/container-security-provider/container-security-provider-1.18.0-RELEASE.jar (0.1s)\n9098-09-09/13:19:50 Application 'searchdirect-qa' successfully staged/compiled\n9098-09-09/13:19:50 Application 'searchdirect-qa' startup command: JAVA_OPTS=\"-agentpath:$PWD/.java-buildpack/open_jdk_jre/bin/jvmkill-1.16.0_RELEASE=printHeapHistogram=1 -Djava.io.tmpdir=$TMPDIR -XX:ActiveProcessorCount=$(nproc) -Djava.ext.dirs= -Djava.security.properties=$PWD/.java-buildpack/java_security/java.security $JAVA_OPTS\" \u0026\u0026 CALCULATED_MEMORY=$($PWD/.java-buildpack/open_jdk_jre/bin/java-buildpack-memory-calculator-3.13.0_RELEASE -totMemory=$MEMORY_LIMIT -loadedClasses=21231 -poolType=metaspace -stackThreads=250 -vmOptions=\"$JAVA_OPTS\") \u0026\u0026 echo JVM Memory Configuration: $CALCULATED_MEMORY \u0026\u0026 JAVA_OPTS=\"$JAVA_OPTS $CALCULATED_MEMORY\" \u0026\u0026 MALLOC_ARENA_MAX=2 JAVA_OPTS=$JAVA_OPTS JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre exec $PWD/bin/searchdirect\n9098-09-09/13:19:51 Finished Cloudfoundry staging process.                                                                                                                                                                                    \n9098-09-09/13:19:54 Creating final Docker container image ...                                                                                                                                                                                 \n9098-09-09/13:20:12 Created Docker container image for application                                                                                                                                                                            \n9098-09-09/13:20:14 Successfully built 676c1d333268                                                                                                                                                                                           \n9098-09-09/13:20:14 Successfully tagged searchdirect-qa:latest                                                                                                                                                                                \n9098-09-09/13:20:14 Pushing image 'searchdirect-qa' to 'eu.gcr.io/halfpipe-io/engineering-enablement/searchdirect-qa:82214d95e072' ...\n\n\n$ kubefoundry run\n3098-09-03/14:48:09 Configuration loaded from file: /home/jriguera/.kubefoundry/config.yml\n3098-09-03/14:48:09 Running image 'test-app' tailing output, in container 'test-app' ...\n3098-09-03/14:48:09 Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.\n3098-09-03/14:48:10 Application running on container 'test-app', internal port 8080/tcp availabe at http://0.0.0.0:49153\n2021-09-03T12:48:10.224237324Z Loading /home/vcap/app/.profile.d/000_multi-supply.sh\n2021-09-03T12:48:10.225623672Z Loading /home/vcap/app/.profile.d/0_python.fixeggs.sh\n2021-09-03T12:48:10.244251494Z Loading /home/vcap/app/.profile.d/0_python.sh\n2021-09-03T12:48:10.528340652Z  * Serving Flask app 'app' (lazy loading)\n2021-09-03T12:48:10.528364696Z  * Environment: production\n2021-09-03T12:48:10.528369181Z    WARNING: This is a development server. Do not use it in a production deployment.\n2021-09-03T12:48:10.528374339Z    Use a production WSGI server instead.\n2021-09-03T12:48:10.528377252Z  * Debug mode: off\n2021-09-03T12:48:10.530638918Z  * Running on all addresses.\n2021-09-03T12:48:10.530659106Z    WARNING: This is a development server. Do not use it in a production deployment.\n2021-09-03T12:48:10.530738543Z  * Running on http://172.17.0.2:8080/ (Press CTRL+C to quit)\n2021-09-03T12:48:25.056898258Z 172.17.0.1 - - [03/Sep/2021 12:48:25] \"GET / HTTP/1.1\" 200 -\n2021-09-03T12:48:25.308732846Z 172.17.0.1 - - [03/Sep/2021 12:48:25] \"GET /favicon.ico HTTP/1.1\" 404 -\n^C3098-09-03/14:48:34 context canceled\n\n$ docker images\nREPOSITORY                                                            TAG                    IMAGE ID       CREATED         SIZE\ntest-app                                                              latest                 0c1529c67b3e   5 minutes ago   1.24GB\n\u003cnone\u003e                                                                \u003cnone\u003e                 db3aa34f24cd   5 minutes ago   1.61GB\nmongo                                                                 latest                 0bcbeb494bed   3 days ago      684MB\ncloudfoundry/cflinuxfs3                                               latest                 75b472ce7452   7 days ago      1.06GB\n\n$ docker run -ti --rm -p 8080:8080 test-app\nLoading /home/vcap/app/.profile.d/000_multi-supply.sh\nLoading /home/vcap/app/.profile.d/0_python.fixeggs.sh\nLoading /home/vcap/app/.profile.d/0_python.sh\n * Serving Flask app 'app' (lazy loading)\n * Environment: production\n   WARNING: This is a development server. Do not use it in a production deployment.\n   Use a production WSGI server instead.\n * Debug mode: off\n * Running on all addresses.\n   WARNING: This is a development server. Do not use it in a production deployment.\n * Running on http://172.17.0.2:8080/ (Press CTRL+C to quit)\n^CPropagating signal '2' to all children ...\nApplication 0_test-app (pid=10) exited with code 0\n\n```\n\nYou can also generate manifests and deploy to Kubernetes using `kubectl` directly. The manifest needed to deploy directly to kubernetes is `deploy.yml`:\n\n```\n$ kubefoundry --cf.manifest manifest-test.yml  --deployment.apppath searchdirect-ci.zip manifest\n9098-09-09/13:21:55 Configuration loaded from file: /home/jriguera/.kubefoundry/config.yml\n9098-09-09/13:21:55 Generating AppFile manifest: /home/jriguera/devel/work/oscar/searchdirect/jose-searchdirect/vela.yml\n9098-09-09/13:21:55 Generating KubeFoundry manifest: /home/jriguera/devel/work/oscar/searchdirect/jose-searchdirect/app.yml\n9098-09-09/13:21:55 Generating K8S manifest: /home/jriguera/devel/work/oscar/searchdirect/jose-searchdirect/deploy.yml\n$ kubectl apply --validate=true -f deploy.yml \nservice/jose-searchdirect created\nvirtualservice.networking.istio.io/jose-searchdirect created\nstatefulset.apps/jose-searchdirect created\n```\n\n\n\n\nDevelopment\n===========\n\nGolang \u003e= 1.16 . There is a `Makefile` to manage the development actions, releases\nand binaries. `make build` generates binaries for Linux, Darwin and Windows architectures.\n\nGolang Modules\n--------------\n\n```\ngo mod init         # If you are not using git, type `go mod init $(basename `pwd`)`\ngo mod vendor       # if you have vendor/ folder, will automatically integrate\ngo build\n```\n\nThis method creates a file called `go.mod` in your projects directory. You can\nthen build your project with `go build`.\n\n\nAuthor\n======\n\n(c) 2021 Springer Nature, Engineering Enablement, Jose Riguera\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fkubefoundry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspringerpe%2Fkubefoundry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspringerpe%2Fkubefoundry/lists"}