Skip to content

eirini-forks/cf-k8s-api

 
 

Repository files navigation

cf-k8s-api

This repository contains what we call the "CF API Shim", an experimental implementation of the V3 Cloud Foundry API that is backed entirely by Kubernetes custom resources.

For more information about what we're building, check out the Vision for CF on Kubernetes document.

Documentation

While this project seeks to faithfully reproduce the V3 CF APIs as much as is feasible, not all APIs have been implemented and not all features are supported.

We maintain our own set of API Endpoint docs for tracking what is currently supported by the Shim.

Installation

Dependencies

This project relies on the controllers and CRDs of the cf-k8s-controllers repo. Install it by following the instructions in its README.

Running Locally

make

make run

shell

go run main.go

Contributing

Running Tests

make

make test

shell (testbin must be sourced first if using this method)

KUBEBUILDER_ASSETS=$PWD/testbin/bin go test ./... -coverprofile cover.out

Updating CRDs for Tests

Some tests run a real Kubernetes API/etcd via the envtest package. These tests rely on the CRDs from cf-k8s-controllers which we have vendored in. To update these CRDs you'll need to install vendir and run vendir sync in the repositories/fixtures directory.

Editing Local Configuration

To specify a custom configuration file, set the CONFIG environment variable to its path when running the web server. Refer to the default config for the config file structure and options.

Regenerate kubernetes resources after making changes

To regenerate the kubernetes resources under ./config, run make generate or go generate ./... from the root of the project.

Generate reference yaml

make build-reference

Deploying the app to your cluster

Note Supports ingress with only GKE

Using make

You can deploy the app to your cluster by running make deploy from the project root.

Using Kubectl

You can deploy the app to your cluster by running kubectl apply -f reference/cf-k8s-api.yaml from the project root.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.3%
  • Makefile 1.4%
  • Dockerfile 0.3%