This repository holds the API definitions for Kong's Kubernetes configuration.
👷 🚧 This is currently a work in progress which is heavily based on Kong's Ingress Controller CRDs Before KIC starts using these CRDs this repo should contain only additive, non-breaking changes on top of KIC's types.
api/
directory contains Go types that are the source for generatingpkg/clientset
: Go clientsets for users who want to interact with Kong's Kubernetes configuration in Goconfig/crd
: Kubernetes CRDs for Kong configuration
test/
directory contains Go teststest/crdsvalidation
directory contains Go tests which perform operations against a live Kubernetes cluster, testing CEL rules set on API typestest/unit
directory contains Go unit tests for generated Go types
docs/
directory contains generated API reference markdown files
In order to install the CRDs from this repo:
kustomize build github.com/kong/kubernetes-configuration/config/crd | kubectl apply -f -
In order to run code generation in this repo you can use make generate
.
When you add a new CRD make sure to
- Add it to CRD kustomization.yaml
- Add unit tests in
test/unit
- Add CRD validation tests in
test/crdsvalidation
- If you want
GetItems() []T
helper to be generated for your type, add it to supported type list. - If this CRD is meant to have Konnect helpers functions generated for it, add it in supported type list.
- Annotate the CRD and any new type it depends on with the right markers to make sure it will be included in the generated documentation. See [available markers](#Available custom markers).
Currently in order to make a new release/tag available for users to use is to create a new tag and push it to the repository.
Name | Applies to | Meaning |
---|---|---|
+apireference:kgo:exclude |
Fields | Any field annotated with this marker will be excluded from the KGO's generated CRDs reference. |
+apireference:kgo:include |
Types | Any type annotated with this marker will be included in the KGO's generated CRDs reference. |
+apireference:kic:exclude |
Fields | Any type annotated with this marker will be excluded from the KIC's generated CRDs reference. |
+apireference:kic:include |
Types | Any type annotated with this marker will be included in the KIC's generated CRDs reference. |