forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cni-plugins.yaml
120 lines (111 loc) · 4.46 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
114
115
116
117
118
119
120
package:
name: cni-plugins
version: 1.6.1
epoch: 0
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: 7f756b411efc3d3730c707e2cc1f2baf1a66e28c
- 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.
tap: Creates a tap device inside the container namespace.
vrf: Creates a VRF in the network namespace and assigns it the interface passed in the arguments.
vars:
plugins-all: bridge bandwidth dhcp dummy firewall host-device host-local ipvlan loopback macvlan ptp portmap sbr static tap tuning vrf vlan
plugins-main: bridge dummy host-device ipvlan loopback macvlan ptp tap vlan
plugins-ipam: dhcp host-local static
plugins-meta: bandwidth firewall portmap sbr tuning vrf
# CNI Plugins, separated into groups
subpackages:
- name: "cni-plugins-main"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
for binary in ${{vars.plugins-main}}; do
cp bin/$binary "${{targets.subpkgdir}}"/usr/bin/
done
- name: "cni-plugins-ipam"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
for binary in ${{vars.plugins-ipam}}; do
cp bin/$binary "${{targets.subpkgdir}}"/usr/bin/
done
- name: "cni-plugins-meta"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
for binary in ${{vars.plugins-meta}}; do
cp bin/$binary "${{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
test:
pipeline:
- runs: |
${{range.key}} --version
- 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}}
- name: "cni-plugins-aws-k8s-compat"
description: "Compatibility package for aws-k8s-cni"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/init
for binary in ${{vars.plugins-all}}; do
cp bin/${binary} "${{targets.subpkgdir}}"/init/
done
update:
enabled: true
github:
identifier: containernetworking/plugins
strip-prefix: v