Code and Documentation Generation

    If you make any change to , you can re-generate the code by invoking .

    Antrea extends Kubernetes API with an extension APIServer and Custom Resource Definitions, and uses to generate clients, informers, conversions, protobuf codecs and other helpers. The resource definitions and their generated codes are located in the conventional paths: pkg/apis/<resource group> for internal types and pkg/apis/<resource group>/<version> for versioned types and pkg/client/clientset for clients.

    Antrea uses the framework for its unit tests.

    If you add or modify interfaces that need to be mocked, please add or update MOCKGEN_TARGETS in update-codegen-dockerized.sh accordingly. All the mocks for a given package will typically be generated in a sub-package called testing. For example, the mock code for the interface defined in the package pkg/foo/bar will be generated to pkg/foo/bar/testing/mock_bar.go, and you can import it via pkg/foo/bar/testing.

    Prometheus integration document contains a list of supported metrics, which could be affected by third party component changes. The collection of metrics is done from a running Kind deployment, in order to reflect the current list of metrics which is exposed by Antrea Controller and Agents.

    To regenerate the metrics list within the document, use with document location as a parameter.