代码拉取完成,页面将自动刷新
package main
import (
"os"
entry "github.com/stackanetes/kubernetes-entrypoint/entrypoint"
_ "github.com/stackanetes/kubernetes-entrypoint/dependencies/config"
_ "github.com/stackanetes/kubernetes-entrypoint/dependencies/container"
_ "github.com/stackanetes/kubernetes-entrypoint/dependencies/daemonset"
_ "github.com/stackanetes/kubernetes-entrypoint/dependencies/job"
_ "github.com/stackanetes/kubernetes-entrypoint/dependencies/pod"
_ "github.com/stackanetes/kubernetes-entrypoint/dependencies/service"
_ "github.com/stackanetes/kubernetes-entrypoint/dependencies/socket"
"github.com/stackanetes/kubernetes-entrypoint/logger"
command "github.com/stackanetes/kubernetes-entrypoint/util/command"
"github.com/stackanetes/kubernetes-entrypoint/util/env"
)
func main() {
var comm []string
var entrypoint *entry.Entrypoint
var err error
if entrypoint, err = entry.New(nil); err != nil {
logger.Error.Printf("Creating entrypoint failed: %v", err)
os.Exit(1)
}
entrypoint.Resolve()
if comm = env.SplitCommand(); len(comm) == 0 {
// TODO(DTadrzak): we should consider other options to handle whether pod
// is an init-container
logger.Warning.Printf("COMMAND env is empty")
os.Exit(0)
}
if err = command.Execute(comm); err != nil {
logger.Error.Printf("Cannot execute command: %v", err)
os.Exit(1)
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。