kubernetes-configuration

module
v0.0.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: MIT

README

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.

Directories

Path Synopsis
api
configuration/v1
Package v1 contains API Schema definitions for the konghq.com v1 API group.
Package v1 contains API Schema definitions for the konghq.com v1 API group.
configuration/v1alpha1
Package v1alpha1 contains API Schema definitions for the configuration.konghq.com v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the configuration.konghq.com v1alpha1 API group.
configuration/v1beta1
Package v1beta1 contains API Schema definitions for the configuration.konghq.com v1beta1 API group.
Package v1beta1 contains API Schema definitions for the configuration.konghq.com v1beta1 API group.
incubator
Package incubator contains API Schema definitions for the incubator.ingress-controller.konghq.com API group.
Package incubator contains API Schema definitions for the incubator.ingress-controller.konghq.com API group.
incubator/v1alpha1
Package v1alpha1 contains API Schema definitions for the incubator.ingress-controller.konghq.com v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the incubator.ingress-controller.konghq.com v1alpha1 API group.
konnect/v1alpha1
Package v1alpha1 contains API Schema definitions for the konnect.konghq.com v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the konnect.konghq.com v1alpha1 API group.
pkg
clientset/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/typed/configuration/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/typed/configuration/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
clientset/typed/configuration/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/typed/configuration/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
clientset/typed/configuration/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/typed/configuration/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
clientset/typed/incubator/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/typed/incubator/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
clientset/typed/konnect/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/typed/konnect/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
scripts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL