Skip to content

dadjeibaah/smi-sdk-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMI SDK for Golang

Shared code and example implementations

API

API objects are found at the following locations:

  • pkg/apis/metrics - Metrics API
  • pkg/apis/traffcispec - TrafficSpec API
  • pkg/apis/trafficsplit - TrafficSplit API

Codegen

Client code for the API CRDs is autogenerated and can be found at the following location:

  • pkg/gen/trafficspec
  • pkg/gen/trafficsplit

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.

About

SMI SDK for Golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

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