Strimzi client-go package for use with kubernetes controllers.
This is a work in progress and hopefully the generation of this package will be fully automated soon.
At the moment, the partially-automated process is:
- Download the strimzi CRD yaml
- Edit the openAPI schemas to remove any 'oneOf' statements, since the GoLang type generator we use does not handle those.
- Use crd-codegen to generate types from the CRD YAML.
- Edit the top-level type definitions so that they implement the runtime.Object interfaces and
add kubebuilder annotations. You may also see some of the "misc properties" type attributes defined
as
type <name> map[string]interface{}
-- these must be changed to typeapiextensions.JSON
(example). The python scriptconvert.py
can be used to help with this. - Convert int types to int32:
sed -i 's/int `json/int32 `json'/g *
- Finally run
controller-gen object paths=./...
is run to generateDeepCopy
implementations