Skip to content

Commit

Permalink
re-org code, support dynamic host gateway address
Browse files Browse the repository at this point in the history
  • Loading branch information
travishegner committed Feb 16, 2022
1 parent 7bfc229 commit 59a99f1
Show file tree
Hide file tree
Showing 11 changed files with 332 additions and 212 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bin
build/
Empty file removed bin/.gitkeep
Empty file.
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

CGO_ENABLED=0 go build -o bin/vxlan vxlan/main.go
mkdir -p build || true
CGO_ENABLED=0 go build -o build/vxlan .
9 changes: 4 additions & 5 deletions const.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package vxlan
package main

import "time"

const (
//DefaultIPAMTimeout is how long to wait for the IPAM plugin
DefaultIPAMTimeout = 10
DefaultIPAMTimeout = 10 * time.Second

//DefaultLockPath is the default path to store vxlan locks
DefaultLockPath = "/tmp"

//DefaultLockExt is the default extension of the lock file
DefaultLockExt = ".lock"

//DefaultVxlanRouteTable is the route table number used to store routes that override the /32 routes
DefaultVxlanRouteTable = 192

//NetworkAnnotation is the string key where we search for the name of the vxlan to join
NetworkAnnotation = "vxlan-cni.travishegner.com/NetworkName"

Expand Down
82 changes: 0 additions & 82 deletions functions.go

This file was deleted.

Loading

0 comments on commit 59a99f1

Please sign in to comment.