fix(init): don't create CRI-O CNI configurations (#36)

This commit is contained in:
Andrew Rynhard 2018-04-01 17:37:15 -07:00 committed by GitHub
parent 0095227553
commit 8a7c42441c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,41 +176,11 @@ const crioPolicy = `
]
}
`
const crioBridgeNetwork = `
{
"cniVersion": "0.3.0",
"name": "crio-bridge",
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
}
`
const crioLoopbackNetwork = `
{
"cniVersion": "0.3.0",
"type": "loopback"
}
`
type CRIO struct{}
func init() {
if err := ioutil.WriteFile("/etc/crio/crio.conf", []byte(crioConf), 0644); err != nil {
}
if err := ioutil.WriteFile("/etc/cni/net.d/10-crio-bridge.conf", []byte(crioBridgeNetwork), 0644); err != nil {
}
if err := ioutil.WriteFile("/etc/cni/net.d/99-loopback.conf", []byte(crioLoopbackNetwork), 0644); err != nil {
}
if err := ioutil.WriteFile("/etc/containers/policy.json", []byte(crioPolicy), 0644); err != nil {