2020-07-06 18:40:48 +00:00
|
|
|
/*
|
|
|
|
Copyright 2020 VMware, Inc.
|
|
|
|
SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2020-07-03 00:05:59 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2020-07-08 17:06:44 +00:00
|
|
|
"os"
|
2020-07-07 19:54:14 +00:00
|
|
|
|
2020-07-23 15:05:21 +00:00
|
|
|
genericapiserver "k8s.io/apiserver/pkg/server"
|
2020-07-20 04:21:47 +00:00
|
|
|
"k8s.io/client-go/pkg/version"
|
|
|
|
"k8s.io/client-go/rest"
|
2020-07-23 15:05:21 +00:00
|
|
|
"k8s.io/component-base/logs"
|
2020-07-20 04:21:47 +00:00
|
|
|
"k8s.io/klog/v2"
|
|
|
|
|
2020-08-20 17:54:15 +00:00
|
|
|
"github.com/suzerain-io/pinniped/internal/server"
|
2020-07-03 00:05:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2020-07-23 15:05:21 +00:00
|
|
|
logs.InitLogs()
|
|
|
|
defer logs.FlushLogs()
|
|
|
|
|
2020-07-20 04:21:47 +00:00
|
|
|
klog.Infof("Running %s at %#v", rest.DefaultKubernetesUserAgent(), version.Get())
|
2020-07-23 15:05:21 +00:00
|
|
|
|
|
|
|
ctx := genericapiserver.SetupSignalContext()
|
|
|
|
|
2020-07-27 20:32:14 +00:00
|
|
|
if err := server.New(ctx, os.Args[1:], os.Stdout, os.Stderr).Run(); err != nil {
|
2020-07-23 15:05:21 +00:00
|
|
|
klog.Fatal(err)
|
2020-07-08 17:06:44 +00:00
|
|
|
}
|
2020-07-03 00:05:59 +00:00
|
|
|
}
|