Files
linuxkit/test/cases/040_packages/023_wireguard/test.yml
Rolf Neugebauer 57034d8a49 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2020-01-30 09:11:32 +00:00

94 lines
2.5 KiB
YAML

kernel:
image: linuxkit/kernel:4.19.99
cmdline: "console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:a4fcf333298f644dfac6adf680b83140927aa85e
- linuxkit/runc:69b4a35eaa22eba4990ee52cccc8f48f6c08ed03
- linuxkit/containerd:09553963ed9da626c25cf8acdf6d62ec37645412
- linuxkit/ca-certificates:v0.7
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.7
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: wg0
image: linuxkit/ip:7b1cf3150bf5d9a0df7ef07572e2d81fe3c0c3d3
net: new
binds:
- /etc/wireguard:/etc/wireguard
command: ["/usr/bin/lk-wg-config", "configure", "/etc/wireguard/wg0.conf"]
runtime:
interfaces:
- name: wg0
add: wireguard
createInRoot: true
bindNS:
net: /run/netns/wg0
- name: wg1
image: linuxkit/ip:7b1cf3150bf5d9a0df7ef07572e2d81fe3c0c3d3
net: new
binds:
- /etc/wireguard:/etc/wireguard
command: ["/usr/bin/lk-wg-config", "configure", "/etc/wireguard/wg1.conf"]
runtime:
interfaces:
- name: wg1
add: wireguard
createInRoot: true
bindNS:
net: /run/netns/wg1
onshutdown:
- name: test2
image: alpine:3.9
binds:
- /tmp:/tmp
- /check.sh:/check.sh
command: ["sh", "./check.sh", "shutdown"]
services:
# We use the non-alpine variant here because it is available as multi-arch
- name: nginx
image: nginx:1.13.7
net: /run/netns/wg0
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETUID
- CAP_SETGID
- CAP_DAC_OVERRIDE
- name: test
image: alpine:3.9
net: /run/netns/wg1
pid: host
capabilities:
- CAP_KILL
binds:
- /tmp:/tmp
- /check.sh:/check.sh
command: ["sh", "./check.sh"]
files:
- path: etc/wireguard/wg0.conf
contents: |
[Interface]
Address = 192.168.2.1/24
PrivateKey = KG7EKkHDkp7THfW5mOXcZzo3RbGAjq+ARMfJGFm5G1s=
ListenPort = 51820
[Peer]
PublicKey = ZP7h1OjA1oIAmsAvMKujp2RAAC/f0kY814b3Xq6j/0Y=
AllowedIPs = 0.0.0.0/0
Endpoint = 127.0.0.1:51821
- path: etc/wireguard/wg1.conf
contents: |
[Interface]
Address = 192.168.2.2/24
PrivateKey = SCGCKDuTm4PMOw+LXdK/2s8mxnv145QHOohKRq3vc2A=
ListenPort = 51821
[Peer]
PublicKey = AcS5t3PC5nL/oj0sYhc3yFpDlRaXoJ0mfEq6iq0rFF4=
AllowedIPs = 0.0.0.0/0
Endpoint = 127.0.0.1:51820
- path: check.sh
source: ./check.sh
trust:
org:
- linuxkit
- library