Skip to content

Commit d4cd3c0

Browse files
Birdrockgnovvdavewaltermatt-royal
authored andcommitted
Rename project to Korifi and update references
Co-authored-by: Akira Wong <wakira@vmware.com> Co-authored-by: Dave Walter <walterda@vmware.com> Co-authored-by: Matt Royal <mroyal@vmware.com> Co-authored-by: Akira Wong <wakira@vmware.com> Co-authored-by: Dave Walter <walterda@vmware.com> Co-authored-by: Matt Royal <mroyal@vmware.com>
1 parent d6e41bc commit d4cd3c0

File tree

308 files changed

+1086
-1095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+1086
-1095
lines changed

.github/workflows/test-build-push-main.yml

+24-24
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
CC_TEST_REPORTER_ID: eac10b59cb33cb6a2ae137260587e43e3e148c72f0d2a3b7cca35761cfe257ee
179179
with:
180180
coverageLocations: "**/cover.out:gocov"
181-
prefix: "code.cloudfoundry.org/cf-k8s-controllers"
181+
prefix: "code.cloudfoundry.org/korifi"
182182

183183
build-api:
184184
runs-on: ubuntu-latest
@@ -195,16 +195,16 @@ jobs:
195195
context: .
196196
file: ./api/Dockerfile
197197
push: false
198-
tags: cloudfoundry/cf-k8s-api:${{ github.sha }},cloudfoundry/cf-k8s-api:latest
198+
tags: cloudfoundry/korifi-api:${{ github.sha }},cloudfoundry/korifi-api:latest
199199
cache-from: type=gha,scope=api-${{ matrix.buildx_version }}
200200
cache-to: type=gha,scope=api-${{ matrix.buildx_version }}
201-
outputs: type=docker,dest=/tmp/cf-k8s-api.image.tar
201+
outputs: type=docker,dest=/tmp/korifi-api.image.tar
202202

203203
- name: Upload artifact
204204
uses: actions/upload-artifact@v3
205205
with:
206-
name: cf-k8s-api.image
207-
path: /tmp/cf-k8s-api.image.tar
206+
name: korifi-api.image
207+
path: /tmp/korifi-api.image.tar
208208

209209
build-controllers:
210210
runs-on: ubuntu-latest
@@ -221,16 +221,16 @@ jobs:
221221
context: .
222222
file: ./controllers/Dockerfile
223223
push: false
224-
tags: cloudfoundry/cf-k8s-controllers:${{ github.sha }},cloudfoundry/cf-k8s-controllers:latest
224+
tags: cloudfoundry/korifi-controllers:${{ github.sha }},cloudfoundry/korifi-controllers:latest
225225
cache-from: type=gha,scope=controllers-${{ matrix.buildx_version }}
226226
cache-to: type=gha,scope=controllers-${{ matrix.buildx_version }}
227-
outputs: type=docker,dest=/tmp/cf-k8s-controllers.image.tar
227+
outputs: type=docker,dest=/tmp/korifi-controllers.image.tar
228228

229229
- name: Upload artifact
230230
uses: actions/upload-artifact@v3
231231
with:
232-
name: cf-k8s-controllers.image
233-
path: /tmp/cf-k8s-controllers.image.tar
232+
name: korifi-controllers.image
233+
path: /tmp/korifi-controllers.image.tar
234234

235235
e2e-tests:
236236
needs:
@@ -244,7 +244,7 @@ jobs:
244244
steps:
245245
- uses: actions/checkout@v3
246246
with:
247-
path: cf-k8s-controllers
247+
path: korifi
248248

249249
- uses: actions/checkout@v3
250250
with:
@@ -256,7 +256,7 @@ jobs:
256256
path: |
257257
~/.cache/go-build
258258
~/go/pkg/mod
259-
key: ${{ runner.os }}-go-${{ hashFiles('cf-k8s-controllers/**/go.sum') }}
259+
key: ${{ runner.os }}-go-${{ hashFiles('korifi/**/go.sum') }}
260260
restore-keys: |
261261
${{ runner.os }}-go-
262262
@@ -270,30 +270,30 @@ jobs:
270270
- name: Download API image
271271
uses: actions/download-artifact@v3
272272
with:
273-
name: cf-k8s-api.image
273+
name: korifi-api.image
274274
path: /tmp
275275

276276
- name: Load API image
277277
run: |
278-
docker load --input /tmp/cf-k8s-api.image.tar
278+
docker load --input /tmp/korifi-api.image.tar
279279
280280
- name: Download controllers image
281281
uses: actions/download-artifact@v3
282282
with:
283-
name: cf-k8s-controllers.image
283+
name: korifi-controllers.image
284284
path: /tmp
285285

286286
- name: Load controllers image
287287
run: |
288-
docker load --input /tmp/cf-k8s-controllers.image.tar
288+
docker load --input /tmp/korifi-controllers.image.tar
289289
290290
- name: Run e2e tests
291291
env:
292292
SKIP_DOCKER_BUILD: true
293-
IMG_API: cloudfoundry/cf-k8s-api:${{ github.sha }}
294-
IMG_CONTROLLERS: cloudfoundry/cf-k8s-controllers:${{ github.sha }}
293+
IMG_API: cloudfoundry/korifi-api:${{ github.sha }}
294+
IMG_CONTROLLERS: cloudfoundry/korifi-controllers:${{ github.sha }}
295295
run: make test-e2e
296-
working-directory: ./cf-k8s-controllers
296+
working-directory: ./korifi
297297

298298
push-latest-docker-images:
299299
needs:
@@ -319,27 +319,27 @@ jobs:
319319
- name: Download API image
320320
uses: actions/download-artifact@v3
321321
with:
322-
name: cf-k8s-api.image
322+
name: korifi-api.image
323323
path: /tmp
324324

325325
- name: Load API image
326326
run: |
327-
docker load --input /tmp/cf-k8s-api.image.tar
327+
docker load --input /tmp/korifi-api.image.tar
328328
329329
- name: Download controllers image
330330
uses: actions/download-artifact@v3
331331
with:
332-
name: cf-k8s-controllers.image
332+
name: korifi-controllers.image
333333
path: /tmp
334334

335335
- name: Load controllers image
336336
run: |
337-
docker load --input /tmp/cf-k8s-controllers.image.tar
337+
docker load --input /tmp/korifi-controllers.image.tar
338338
339339
- name: Push API image
340340
run: |
341-
docker push cloudfoundry/cf-k8s-api:latest
341+
docker push cloudfoundry/korifi-api:latest
342342
343343
- name: Push Controller image
344344
run: |
345-
docker push cloudfoundry/cf-k8s-controllers:latest
345+
docker push cloudfoundry/korifi-controllers:latest

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Image URL to use all building/pushing image targets
2-
IMG_CONTROLLERS ?= cloudfoundry/cf-k8s-controllers:latest
3-
IMG_API ?= cloudfoundry/cf-k8s-api:latest
2+
IMG_CONTROLLERS ?= cloudfoundry/korifi-controllers:latest
3+
IMG_API ?= cloudfoundry/korifi-api:latest
44
CRD_OPTIONS ?= "crd"
55

66
# Run controllers tests with two nodes by default to (potentially) minimise
@@ -165,13 +165,13 @@ undeploy-api: ## Undeploy api from the K8s cluster specified in ~/.kube/config.
165165

166166
build-reference: build-reference-controllers build-reference-api
167167

168-
build-reference-controllers: manifests-controllers install-kustomize ## Generate reference yaml and output to ./reference/cf-k8s-controllers.yaml
169-
cd controllers/config/manager && $(KUSTOMIZE) edit set image cloudfoundry/cf-k8s-controllers=${IMG_CONTROLLERS}
170-
$(KUSTOMIZE) build controllers/config/default -o controllers/reference/cf-k8s-controllers.yaml
168+
build-reference-controllers: manifests-controllers install-kustomize ## Generate reference yaml and output to ./reference/korifi-controllers.yaml
169+
cd controllers/config/manager && $(KUSTOMIZE) edit set image cloudfoundry/korifi-controllers=${IMG_CONTROLLERS}
170+
$(KUSTOMIZE) build controllers/config/default -o controllers/reference/korifi-controllers.yaml
171171

172172
build-reference-api: manifests-api install-kustomize
173-
cd api/config/base && $(KUSTOMIZE) edit set image cloudfoundry/cf-k8s-api=${IMG_API}
174-
$(KUSTOMIZE) build api/config/base -o api/reference/cf-k8s-api.yaml
173+
cd api/config/base && $(KUSTOMIZE) edit set image cloudfoundry/korifi-api=${IMG_API}
174+
$(KUSTOMIZE) build api/config/base -o api/reference/korifi-api.yaml
175175

176176
CONTROLLER_GEN = $(shell pwd)/controllers/bin/controller-gen
177177
install-controller-gen: ## Download controller-gen locally if necessary.

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cf-k8s-controllers
1+
korifi
22

33
Copyright (c) 2016-Present CloudFoundry.org Foundation, Inc. All Rights Reserved.
44

README.md

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Build Status](https://github.com/cloudfoundry/cf-k8s-controllers/actions/workflows/test-build-push-main.yml/badge.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/f8dff20cd9bab4fb4117/maintainability)](https://codeclimate.com/github/cloudfoundry/cf-k8s-controllers/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/f8dff20cd9bab4fb4117/test_coverage)](https://codeclimate.com/github/cloudfoundry/cf-k8s-controllers/test_coverage)
1+
![Build Status](https://github.com/cloudfoundry/korifi/actions/workflows/test-build-push-main.yml/badge.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/f8dff20cd9bab4fb4117/maintainability)](https://codeclimate.com/github/cloudfoundry/korifi/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/f8dff20cd9bab4fb4117/test_coverage)](https://codeclimate.com/github/cloudfoundry/korifi/test_coverage)
22

33
# Introduction
44
This repository contains an experimental implementation of the [V3 Cloud Foundry API](http://v3-apidocs.cloudfoundry.org) that is backed entirely by Kubernetes [custom resources](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/).
@@ -17,13 +17,13 @@ Before installing, ensure that you have the following:
1717
- A cloned copy of this repository:
1818
```sh
1919
cd ~/workspace
20-
git clone git@github.com:cloudfoundry/cf-k8s-controllers.git
21-
cd cf-k8s-controllers
20+
git clone git@github.com:cloudfoundry/korifi.git
21+
cd korifi
2222
```
2323

2424
# Dependencies
2525
## Install Cert-Manager
26-
To deploy cf-k8s-controller and run it in a cluster, you must first [install cert-manager](https://cert-manager.io/docs/installation/).
26+
To deploy Korifi and run it in a cluster, you must first [install cert-manager](https://cert-manager.io/docs/installation/).
2727
```sh
2828
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.3/cert-manager.yaml
2929
```
@@ -33,7 +33,7 @@ kubectl apply -f dependencies/cert-manager.yaml
3333
```
3434
---
3535
## Install Kpack
36-
To deploy cf-k8s-controller and run it in a cluster, you must first [install kpack](https://github.com/pivotal/kpack/blob/main/docs/install.md).
36+
To deploy Korifi and run it in a cluster, you must first [install kpack](https://github.com/pivotal/kpack/blob/main/docs/install.md).
3737
```sh
3838
kubectl apply -f https://github.com/pivotal/kpack/releases/download/v0.5.2/release-0.5.2.yaml
3939
```
@@ -63,7 +63,7 @@ kubectl apply -f dependencies/kpack/service_account.yaml \
6363
> note: Edit `cluster_builder.yaml` to specify an image tag that you have write access to using the credentials above.
6464
---
6565
## Install Contour and Envoy
66-
To deploy cf-k8s-controller and run it in a cluster, you must first [install contour](https://projectcontour.io/getting-started/).
66+
To deploy Korifi and run it in a cluster, you must first [install contour](https://projectcontour.io/getting-started/).
6767
```sh
6868
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
6969
```
@@ -85,7 +85,7 @@ To be able to create workload routes via the CF API in the absence of the domain
8585
### Configuring Default Domain
8686

8787
At the time of installation, platform operators can configure a default domain so that app developers can push an application without specifying domain information.
88-
Operator can do so by setting the `defaultDomainName` at `api/config/base/apiconfig/cf_k8s_api_config.yaml`. The value should match `spec.name` on the `CFDomain` resource.
88+
Operator can do so by setting the `defaultDomainName` at `api/config/base/apiconfig/korifi_api_config.yaml`. The value should match `spec.name` on the `CFDomain` resource.
8989

9090
Note: Platform operators are responsible for creating the required `CFDomain` resource. See `controllers/config/samples/cfdomain.yaml` for an example.
9191

@@ -167,7 +167,7 @@ kubectl hns config set-resource secrets --mode Propagate
167167
## Optional: Install Service Bindings Controller
168168

169169
Cloud Native Buildpacks and other app frameworks (such as [Spring Cloud Bindings](https://github.com/spring-cloud/spring-cloud-bindings)) are adopting the [K8s ServiceBinding spec](https://github.com/servicebinding/spec#workload-projection) model of volume mounted secrets.
170-
We currently are providing apps access to these via the `VCAP_SERVICES` environment variable ([see this issue](https://github.com/cloudfoundry/cf-k8s-controllers/issues/462)) for backwards compatibility reasons.
170+
We currently are providing apps access to these via the `VCAP_SERVICES` environment variable ([see this issue](https://github.com/cloudfoundry/korifi/issues/462)) for backwards compatibility reasons.
171171
We would also want to support the newer developments in the ServiceBinding ecosystem as well.
172172

173173
We are not implementing this ourselves but allowing controller that adopts the [ServiceBinding Spec](https://github.com/servicebinding/spec) that volume mounts secrets to workload containers to be used.
@@ -181,26 +181,26 @@ kubectl apply -f https://github.com/vmware-tanzu/servicebinding/releases/downloa
181181
# Installation
182182

183183
## Create the root namespace
184-
Create your root namespace. The default name is `cf`, but you can override this in the configuration files for cf-k8s-controller and cf-k8s-api (see below).
184+
Create your root namespace. The default name is `cf`, but you can override this in the configuration files for korifi-controllers and korifi-api (see below).
185185

186186
Example: `kubectl create namespace cf`
187187

188-
## Configure cf-k8s-controllers
189-
Configuration file for cf-k8s-controllers is at `controllers/config/base/controllersconfig/cf_k8s_controllers_config.yaml`
188+
## Configure korifi-controllers
189+
Configuration file for korifi-controllers is at `controllers/config/base/controllersconfig/korifi_controllers_config.yaml`
190190

191191
### Configure kpack
192192
Edit the configuration file
193193
- (required) set the `kpackImageTag` to be the registry location you want for storing the images.
194194
- (optional) set the `clusterBuilderName`, if you want to use a different cluster builder with kpack.
195195

196-
## Configure cf-k8s-api
197-
Configuration file for cf-k8s-api is at `api/config/base/apiconfig/cf_k8s_api_config.yaml`
196+
## Configure korifi-api
197+
Configuration file for korifi-api is at `api/config/base/apiconfig/korifi_api_config.yaml`
198198

199-
Edit the file `api/config/base/apiconfig/cf_k8s_api_config.yaml` and set the `packageRegistryBase` field to be the registry location to which you want your source package image uploaded.
199+
Edit the file `api/config/base/apiconfig/korifi_api_config.yaml` and set the `packageRegistryBase` field to be the registry location to which you want your source package image uploaded.
200200
Edit the file `api/config/base/api_url_patch.yaml` to specify the desired URL for the deployed API.
201201

202-
## Install cf-k8s-controllers and cf-k8s-api
203-
From the `cf-k8s-controllers` directory use the Makefile to deploy the controllers and API shim:
202+
## Install korifi-controllers and korifi-api
203+
From the `korifi` directory use the Makefile to deploy the controllers and API shim:
204204
```
205205
make deploy
206206
```
@@ -209,9 +209,9 @@ make deploy
209209

210210
### Create a role binding for your cluster admin user
211211
To grant your kubernetes user admin-level access to the Cloud Foundry API,
212-
they need the `cf-k8s-controllers-admin` role binding in your root namespace (i.e `cf`).
212+
they need the `korifi-controllers-admin` role binding in your root namespace (i.e `cf`).
213213

214-
Example: `kubectl create rolebinding default-admin-binding -n cf --role cf-k8s-controllers-admin --user <YOUR USER>`
214+
Example: `kubectl create rolebinding default-admin-binding -n cf --role korifi-controllers-admin --user <YOUR USER>`
215215

216216
### Configure Image Registry Credentials Secret
217217
Run the command below, substituting the values for the Docker credentials to the registry where source package images will be uploaded to.
@@ -220,7 +220,7 @@ Run the command below, substituting the values for the Docker credentials to the
220220
kubectl create secret docker-registry image-registry-secret \
221221
--docker-username="<DOCKER_USERNAME>" \
222222
--docker-password="<DOCKER_PASSWORD>" \
223-
--docker-server="<DOCKER_SERVER>" --namespace cf-k8s-api-system
223+
--docker-server="<DOCKER_SERVER>" --namespace korifi-api-system
224224
```
225225

226226
### Configure API Ingress TLS Certificate Secret
@@ -242,13 +242,13 @@ openssl req -x509 -newkey rsa:4096 \
242242
-days 365
243243
```
244244

245-
Create a TLS secret called `cf-k8s-api-ingress-cert` using the self-signed
245+
Create a TLS secret called `korifi-api-ingress-cert` using the self-signed
246246
certificate generated above, or from your own existing certificate:
247247
```
248248
kubectl create secret tls \
249-
cf-k8s-api-ingress-cert \
249+
korifi-api-ingress-cert \
250250
--cert=./tls.crt --key=./tls.key \
251-
-n cf-k8s-api-system
251+
-n korifi-api-system
252252
```
253253

254254
**NOTE**: If you choose to generate a self-signed certificate, you will need to
@@ -273,13 +273,13 @@ openssl req -x509 -newkey rsa:4096 \
273273
-days 365
274274
```
275275

276-
Create a TLS secret called `cf-k8s-workloads-ingress-cert` using the self-signed
276+
Create a TLS secret called `korifi-workloads-ingress-cert` using the self-signed
277277
certificate generated above, or from your own existing certificate:
278278
```
279279
kubectl create secret tls \
280-
cf-k8s-workloads-ingress-cert \
280+
korifi-workloads-ingress-cert \
281281
--cert=./tls.crt --key=./tls.key \
282-
-n cf-k8s-controllers-system
282+
-n korifi-controllers-system
283283
```
284284

285285
**NOTE**: If you choose to generate a self-signed certificate, you will need to
@@ -351,8 +351,8 @@ scripts/install-dependencies.sh -g "<PATH_TO_GCR_CREDENTIALS>"
351351
## Build, Install and Deploy to a K8s cluster
352352
Set the $IMG_CONTROLLERS and $IMG_API environment variables to locations where you have push/pull access. For example:
353353
```sh
354-
export IMG_CONTROLLERS=foo/cf-k8s-controllers:bar #Replace this with your image ref
355-
export IMG_API=foo/cf-k8s-api:bar #Replace this with your image ref
354+
export IMG_CONTROLLERS=foo/korifi-controllers:bar #Replace this with your image ref
355+
export IMG_API=foo/korifi-api:bar #Replace this with your image ref
356356
make generate-controllers docker-build docker-push deploy
357357
```
358358
*This will generate the CRD bases, build and push images with the repository and tags specified by the environment variables, install CRDs and deploy the controller manager and API Shim.*
@@ -379,15 +379,15 @@ make run-controllers
379379
make run-api
380380
```
381381

382-
To specify a custom configuration file, set the `APICONFIG` environment variable to its path when running the web server. Refer to the [default config](api/config/base/apiconfig/cf_k8s_api_config.yaml) for the config file structure and options.
382+
To specify a custom configuration file, set the `APICONFIG` environment variable to its path when running the web server. Refer to the [default config](api/config/base/apiconfig/korifi_api_config.yaml) for the config file structure and options.
383383

384384
### Set image respository and tag for controller manager
385385
```sh
386-
export IMG_CONTROLLERS=foo/cf-k8s-controllers:bar #Replace this with your image ref
386+
export IMG_CONTROLLERS=foo/korifi-controllers:bar #Replace this with your image ref
387387
```
388388
### Set image respository and tag for API
389389
```sh
390-
export IMG_API=foo/cf-k8s-api:bar #Replace this with your image ref
390+
export IMG_API=foo/korifi-api:bar #Replace this with your image ref
391391
```
392392
### Generate CRD bases
393393
```sh

api/actions/apply_manifest.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
"fmt"
77
"strings"
88

9-
"code.cloudfoundry.org/cf-k8s-controllers/api/apierrors"
10-
"code.cloudfoundry.org/cf-k8s-controllers/api/authorization"
11-
"code.cloudfoundry.org/cf-k8s-controllers/api/payloads"
12-
"code.cloudfoundry.org/cf-k8s-controllers/api/repositories"
9+
"code.cloudfoundry.org/korifi/api/apierrors"
10+
"code.cloudfoundry.org/korifi/api/authorization"
11+
"code.cloudfoundry.org/korifi/api/payloads"
12+
"code.cloudfoundry.org/korifi/api/repositories"
1313
)
1414

1515
type ApplyManifest struct {

api/actions/apply_manifest_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import (
55
"errors"
66
"fmt"
77

8-
. "code.cloudfoundry.org/cf-k8s-controllers/api/actions"
9-
"code.cloudfoundry.org/cf-k8s-controllers/api/actions/fake"
10-
"code.cloudfoundry.org/cf-k8s-controllers/api/apierrors"
11-
"code.cloudfoundry.org/cf-k8s-controllers/api/authorization"
12-
"code.cloudfoundry.org/cf-k8s-controllers/api/payloads"
13-
"code.cloudfoundry.org/cf-k8s-controllers/api/repositories"
14-
"code.cloudfoundry.org/cf-k8s-controllers/tests/matchers"
8+
. "code.cloudfoundry.org/korifi/api/actions"
9+
"code.cloudfoundry.org/korifi/api/actions/fake"
10+
"code.cloudfoundry.org/korifi/api/apierrors"
11+
"code.cloudfoundry.org/korifi/api/authorization"
12+
"code.cloudfoundry.org/korifi/api/payloads"
13+
"code.cloudfoundry.org/korifi/api/repositories"
14+
"code.cloudfoundry.org/korifi/tests/matchers"
1515
"k8s.io/apimachinery/pkg/types"
1616

1717
. "github.com/onsi/ginkgo/v2"

0 commit comments

Comments
 (0)