INNER CODE UNIT · Go
main
aws/amazon-vpc-cni-k8s · cmd/aws-vpc-cni-init/main.go:144
func main() {
os.Exit(_main())
}
func _main() int {
log.Debug("Started Initialization")
var err error
log.Infof("Copying CNI plugin binaries ...")
hostCNIBinPath := utils.GetEnv(envHostCniBinPath, defaultHostCNIBinPath)
excludeBins := map[string]bool{"aws-vpc-cni-init": true}
// Copy all binaries from workdir to host bin dir except container init binary
err = cp.InstallBinariesFromDir(".", hostCNIBinPath, excludeBins)
if err != nil {
log.WithError(err).Errorf("Failed to install binaries")
return 1
}
log.Infof("Copied all CNI plugin binaries to %s", hostCNIBinPath)