https://github.com/yowenter/claude-ipam
Just another simple & reliable CNI IPAM, better than whereabouts
https://github.com/yowenter/claude-ipam
bridge cloud-native cni cni-plugins ipam macvlan
Last synced: 3 months ago
JSON representation
Just another simple & reliable CNI IPAM, better than whereabouts
- Host: GitHub
- URL: https://github.com/yowenter/claude-ipam
- Owner: yowenter
- Created: 2024-09-29T10:00:52.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-01-16T12:11:59.000Z (4 months ago)
- Last Synced: 2025-01-16T13:10:59.836Z (4 months ago)
- Topics: bridge, cloud-native, cni, cni-plugins, ipam, macvlan
- Language: Go
- Homepage:
- Size: 66.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Claude: A Simple Etcd Backend CNI IPAM
Just another simple CNI IPAM!
You can use it as macvlan, bridge .. cni ipam backend.
I've tried [whereabouts](https://github.com/k8snetworkplumbingwg/whereabouts) before, it’s easy to use but there are more bugs and performance issues, such as IP conflict.The whereabouts ipam has several bad design patterns:
1 use a large configmap maintaining ip assign records, which doesn’t work good in large network.
2 use daemonset instance for leader election, and iterate for the whole ip ranges to allocate just one ip. which may lead to ip conflict in a high concurrent case.
IP conflict is unacceptable, So I write my own!
## Features
### 1 Node Network Management
You can manually setup network for each node or just specify a `/16` pod cidr, it will slice subnet for each node.### 2 No IP Conflict Issue
Since we maintain the IP state machine, there will be no ip conflict bug.
### 3 Works good with Multus CNI
Best practice `Multus CNI + Macvlan|Bridge + Claude IPAM`
```
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
annotations:
k8s.v1.cni.cncf.io/resourceName: mellanox.com/rocename: roce-macvlan
namespace: default
spec:
config: '{ "type": "macvlan", "cniVersion": "0.3.1", "name": "roce-macvlan",
"ipam": { "type": "claude", "range": "172.10.0.0/16" } }'```
## Build
```
export DOCKER_IMAGE=/claude-cni
make docker-build
make docker-push```
## Deploy
```
# dependency: you should deploy your own etcd.
# modify the claude-config cm, speciy the etcdEndpoints.cd deploy/base
kustomize build | kubectl apply -f -```