{"id":13839315,"url":"https://github.com/ZTE/Knitter","last_synced_at":"2025-07-11T03:32:07.786Z","repository":{"id":57577058,"uuid":"125000269","full_name":"ZTE/Knitter","owner":"ZTE","description":"Kubernetes network solution","archived":false,"fork":false,"pushed_at":"2020-09-16T02:55:43.000Z","size":4748,"stargazers_count":151,"open_issues_count":11,"forks_count":29,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-21T04:30:59.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZTE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-13T06:01:34.000Z","updated_at":"2024-10-28T05:47:23.000Z","dependencies_parsed_at":"2022-09-11T23:41:51.928Z","dependency_job_id":null,"html_url":"https://github.com/ZTE/Knitter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ZTE/Knitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZTE%2FKnitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZTE%2FKnitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZTE%2FKnitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZTE%2FKnitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZTE","download_url":"https://codeload.github.com/ZTE/Knitter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZTE%2FKnitter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264721337,"owners_count":23653921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T17:00:18.847Z","updated_at":"2025-07-11T03:32:02.776Z","avatar_url":"https://github.com/ZTE.png","language":"Go","funding_links":[],"categories":["Networking \u0026 Connectivity","NetWork"],"sub_categories":[],"readme":"# Knitter\r\n[![Build Status](https://api.travis-ci.org/ZTE/Knitter.svg?style=flat-square)](https://travis-ci.org/ZTE/Knitter)\r\n[![Go Report Card](https://goreportcard.com/badge/github.com/ZTE/Knitter?style=flat-square)](https://goreportcard.com/report/github.com/ZTE/Knitter)\r\n[![Coverage Status](https://coveralls.io/repos/github/ZTE/Knitter/badge.svg?branch=master)](https://coveralls.io/github/ZTE/Knitter?branch=master)\r\n\u003cdiv\u003e\u003cimg src='./docs/images/knitter.png' align=center width='400' height='108'\u003e\u003c/div\u003e\r\n\r\n## Overview\r\n- is a [CNI](https://github.com/containernetworking/cni) plugin to support multiple network interfaces in a [Kubernetes](https://github.com/kubernetes/kubernetes) pod.\r\n- provides the ability for a pod (e.g., VNF in pod) to attach to high-performance networks. \r\n- allows users specifying customized networks according to their infrastructure.\r\n- can run on public clouds, private clouds and hybrid clouds.\r\n- supports both VM and bare-metal cloud environments.\r\n\r\n## Architecture\r\n\r\nKnitter includes four components:\r\n- **Knitter-manager**: it runs on a central controller node (which can be K8S master or a separate host). It interactives with network infrastructure and manages the network(s) that used by the cluster. `Knitter-manager` serves as an API server.\r\n- **Knitter-plugin**: it's a CNI plugin which is invoked by kubelet with CNI API. It forwards the network setting up request from kubelet to `Knitter-agent` and sends the result back.\r\n- **Knitter-agent**: it runs on each node of the K8S cluster. It processes the forwarded request from `Knitter-plugin`. It queries networks configured in annotations of pod spec from kube-apiserver. Then it requests `Knitter-manager` to allocate all the needed resources. Once all things are ready, it sets up the network stack for the pod. Once it finishes, it sends the result back to `Knitter-plugin`.\r\n- **Knitter-monitor**: it also runs on a central controller node(which can be K8S master or a a separate host).It Mainly reponsible for parsing the configuration and managing logical resources.\r\n\r\n\r\n![components](./docs/images/knitter-components.png)\r\n\r\nOne of the topology of K8S management network and pod networks is as below. It can vary depending on the mode of Knitter.\r\n\r\n![topology](./docs/images/knitter-network-topology.png)\r\n\r\n## Build\r\nIt is easy to build all knitter commponents, just need to run make build or make all commands.\r\n```bash\r\nmake build \r\nor\r\nmake all\r\n```\r\nAll knitter related binaries are placed into temp directory \"_output\", normally you will see 4 components(knitter-manager/knitter-monitor/knitter-agent/knitter-plugin). Knitter only surpport linux platform currently.\r\n\r\n## Usage\r\nKnitter is not a only CNI plugin, but it is a full network solutions.So if you'd like run knitter, you should install all related compontents of knitter including knitter-manger、knitter-monitor、knitter-agent、knitter-plugin.\r\nAll knitter binaries have a seperated configuration(use json formation currently), and you can check a full description from [knitter docs](https://github.com/ZTE/Knitter/tree/master/docs).\r\n\r\n## Contributing\r\nContributions should be made via pull requests. Pull requests will be reviewed by one or more maintainers and merged when acceptable.\r\nAll contributions are welcome - Knitter uses the Apache 2 license and does not require any contributor agreement to submit patches. Please open issues for any bugs or problems you encounter. We hope that before contributing, please make the effort to coordinate with the maintainers of the project before submitting high impact PRs. This will prevent you from doing extra work that may or may not be merged.Larger changes typically work best with design documents , similar to those found in [knitter docs](https://github.com/ZTE/Knitter/tree/master/docs) . These are focused on providing context of the design at the time the feature was conceived and can inform future documentation contributions . Make sure that new tests are added for bugs in order to catch regressions and tests for new features to exercise the new functionality that is added .\r\n\r\n\r\nIf you want to run the test suite(especially e2e test), make sure you have your environment set up, and from the origin directory run:\r\n```bash\r\nmake verify\r\n```\r\nAfter excute this command, it wili run verify process including check and unit test processes.\r\n```bash\r\nmake test-ut\r\n```\r\nAs you can see, it will only run unit test process.\r\n\r\n```bash\r\nmake test-e2e\r\n```\r\nThis will run knitter e2e test cases, but now we have't finish this process. We will finish this in next weeks.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZTE%2FKnitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZTE%2FKnitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZTE%2FKnitter/lists"}