Shared code and example implementations for SMI Spec
API objects are found at the following locations:
pkg/apis/access
- Traffic Access Control API (access.smi-spec.io)pkg/apis/metrics
- Traffic Metrics API (metrics.smi-spec.io)pkg/apis/spec
- Traffic Specs API (spec.smi-spec.io)pkg/apis/split
- Traffic Split API (split.smi-spec.io)
Client code for the API CRDs is autogenerated and can be found at the following location:
pkg/gen/access
pkg/gen/spec
pkg/gen/split
In addition to generating client code at the above locations the generator will
also generate zz_generated.deepcopy.go
inside the API object folder.
To regenerate the client code, follow these steps:
- Install the code-generator tool:
go get k8s.io/code-generator
- Ensure the group name does not contain any hypen characters (see note below)
- Run
hack/update-codegen.sh
The code-generator does not support groupNames with hyphen characters.
Therefore, before running the code generator, you must rename all instances of
"smi-spec.io" in the project to "smispec.io". The update-codegen.sh
script
will rename these back to "smi-spec.io" after code generation is complete.
Please refer to CONTRIBUTING.md for more information on contributing to the specification.