-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathflannel.patch
More file actions
66 lines (56 loc) · 2.36 KB
/
flannel.patch
File metadata and controls
66 lines (56 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This patch is for the k3s build system to use the flannel package.
--- build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel.go
+++ build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel.go
@@ -16,7 +16,7 @@
// the data from flannel generated subnet file and then invokes a plugin
// like bridge or ipvlan to do the real work.
-package main
+package flannel
import (
"bufio"
@@ -325,7 +325,7 @@
return doCmdDel(args, nc)
}
-func main() {
+func Main() {
fullVer := fmt.Sprintf("CNI Plugin %s version %s (%s/%s) commit %s built on %s", Program, Version, runtime.GOOS, runtime.GOARCH, Commit, buildDate)
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, cni.All, fullVer)
}
--- build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_linux.go
+++ build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_linux.go
@@ -16,7 +16,7 @@
// the data from flannel generated subnet file and then invokes a plugin
// like bridge or ipvlan to do the real work.
-package main
+package flannel
import (
"context"
--- build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_linux_test.go
+++ build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_linux_test.go
@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-package main
+package flannel
import (
"encoding/json"
--- build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_suite_test.go
+++ build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_suite_test.go
@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-package main
+package flannel
import (
. "github.com/onsi/ginkgo/v2"
--- build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_windows.go
+++ build/src/github.com/containernetworking/plugins/plugins/meta/flannel/flannel_windows.go
@@ -16,7 +16,7 @@
// the data from flannel generated subnet file and then invokes a plugin
// like bridge or ipvlan to do the real work.
-package main
+package flannel
import (
"context"