-
Notifications
You must be signed in to change notification settings - Fork 290
/
Copy pathcni-plugins.yaml
113 lines (105 loc) · 3.91 KB
/
cni-plugins.yaml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
package:
name: cni-plugins
version: 1.4.0
epoch: 1
description: Some reference and example networking plugins, maintained by the CNI team.
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- build-base
- busybox
- ca-certificates-bundle
- go
pipeline:
- uses: git-checkout
with:
repository: https://github.com/containernetworking/plugins
tag: v${{package.version}}
expected-commit: 1fb5bf669e42cd208008e52d45b41fe2c3eb8dbc
- runs: |
# Ensure we build statically since CNI plugins often get moved onto the
# host machine where we can't guarantee GLIBC verion compatibility
LDFLAGS="-s -w -extldflags '-static'"
LDFLAGS="$LDFLAGS -X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=$(git describe --tags --dirty)"
CGO_ENABLED=0 ./build_linux.sh -ldflags "$LDFLAGS"
mkdir -p "${{targets.destdir}}"/usr/bin
cp -a bin/* "${{targets.destdir}}"/usr/bin/
- uses: strip
data:
- name: plugins
items:
bridge: Creates a bridge, adds the host and the container to it.
ipvlan: Adds an ipvlan interface in the container.
loopback: Set the state of loopback interface to up
macvlan: Creates a new MAC address, forwards all traffic to that to the container.
ptp: Creates a veth pair.
vlan: Allocates a vlan device.
host-device: Move an already-existing device into a container.
dummy: Creates a new Dummy device in the container.
dhcp: Runs a daemon on the host to make DHCP requests on behalf of the container
host-local: Maintains a local database of allocated IPs
static: Allocate a single static IPv4/IPv6 address to container. It's useful in debugging purpose.
tuning: Tweaks sysctl parameters of an existing interface
portmap: An iptables-based portmapping plugin. Maps ports from the host's address space to the container.
bandwidth: Allows bandwidth-limiting through use of traffic control tbf (ingress/egress).
sbr: A plugin that configures source based routing for an interface (from which it is chained).
firewall: A firewall plugin which uses iptables or firewalld to add rules to allow traffic to/from the container.
# CNI Plugins, separated into groups
subpackages:
- name: "cni-plugins-main"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
for f in bridge \
ipvlan \
loopback \
macvlan \
ptp \
vlan \
host-device \
dummy; do
cp bin/$f "${{targets.subpkgdir}}"/usr/bin/
done
- name: "cni-plugins-ipam"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
for f in dhcp \
host-local \
static; do
cp bin/$f "${{targets.subpkgdir}}"/usr/bin/
done
- name: "cni-plugins-meta"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
for f in tuning \
portmap \
bandwidth \
sbr \
firewall; do
cp bin/$f "${{targets.subpkgdir}}"/usr/bin/
done
- range: plugins
name: "cni-plugins-${{range.key}}"
description: ${{range.value}}
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
cp bin/${{range.key}} "${{targets.subpkgdir}}"/usr/bin
- range: plugins
name: cni-plugins-${{range.key}}-compat
dependencies:
runtime:
- "cni-plugins-${{range.key}}"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/opt/cni/bin
ln -s /usr/bin/${{range.key}} "${{targets.subpkgdir}}"/opt/cni/bin/${{range.key}}
update:
enabled: true
github:
identifier: containernetworking/plugins
strip-prefix: v