Skip to content

Kong/kubernetes-configuration

Repository files navigation

kubernetes-configuration

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.

Repository structure

  • api/ directory contains Go types that are the source for generating
    • pkg/clientset: Go clientsets for users who want to interact with Kong's Kubernetes configuration in Go
    • config/crd: Kubernetes CRDs for Kong configuration
  • test/ directory contains Go tests
    • test/crdsvalidation directory contains Go tests which perform operations against a live Kubernetes cluster, testing CEL rules set on API types
    • test/unit directory contains Go unit tests for generated Go types
  • docs/ directory contains generated API reference markdown files

Install CRDs

In order to install the CRDs from this repo:

kustomize build github.com/kong/kubernetes-configuration/config/crd | kubectl apply -f -

Generate code

In order to run code generation in this repo you can use make generate.

Adding new CRDs

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).

How to release?

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.

Available custom markers

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages