Skip to content

dadjeibaah/smi-sdk-go

 
 

Repository files navigation

SMI SDK for Golang

Shared code and example implementations for SMI Spec

API

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)

Codegen

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.

Regenerating the Client Code

To regenerate the client code, follow these steps:

  1. Install the code-generator tool: go get k8s.io/code-generator
  2. Ensure the group name does not contain any hypen characters (see note below)
  3. Run hack/update-codegen.sh

Note

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.

Contributing

Please refer to CONTRIBUTING.md for more information on contributing to the specification.

About

SMI SDK for Golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.3%
  • Shell 1.2%
  • Makefile 0.5%